[Home] [Help]
PACKAGE BODY: APPS.CUG_ADDRESS_CREATION_PKG
Source
1 Package Body CUG_ADDRESS_CREATION_PKG AS
2 /* $Header: CUGADRCB.pls 120.1 2006/03/27 14:36:07 appldev noship $ */
3 --
4 -- To modify this template, edit file PKGBODY.TXT in TEMPLATE
5 -- directory of SQL Navigator
6 --
7 -- Purpose: Briefly explain the functionality of the package body
8 --
9 -- MODIFICATION HISTORY
10 -- Person Date Comments
11 -- --------- -------- ------------------------------------------
12 -- dejoseph 12-05-02 Replaced reference to install_site_use_id with
13 -- install_site_id. ER# 2695480.
14 -- aneemuch 11-Feb-04 To fix bug 2657648 changed hz_location_pub to hz_location_v2pub
15 --
16 --
17 -- Enter procedure, function bodies as shown below
18
19
20 G_PKG_NAME CONSTANT VARCHAR2(25):= 'CUG_ADDRESS_CREATION_PKG';
21
22 PROCEDURE Create_Incident_Address (
23 p_incident_id IN NUMBER,
24 p_address_rec IN INCIDENT_ADDRESS_REC_TYPE,
25 x_msg_count OUT NOCOPY NUMBER,
26 x_msg_data OUT NOCOPY VARCHAR2,
27 x_return_status OUT NOCOPY VARCHAR2,
28 x_location_id OUT NOCOPY NUMBER) Is
29
30 -- To fix bug 2657648 changed hz_location_pub to hz_location_v2pub, aneemuch 11-Feb-2004
31 l_location_rec HZ_LOCATION_V2PUB.LOCATION_REC_TYPE;
32 l_return_status VARCHAR2(1);
33 l_msg_count NUMBER;
34 l_msg_data VARCHAR2(2000);
35 l_location_id NUMBER;
36 l_incident_id NUMBER;
37
38 Begin
39
40 l_incident_id := p_incident_id;
41
42 l_location_rec.address1 := p_address_rec.address1;
43 l_location_rec.address2 := p_address_rec.address2;
44 l_location_rec.address3 := p_address_rec.address3;
45 l_location_rec.address4 := p_address_rec.address4;
46 l_location_rec.city := p_address_rec.city;
47 l_location_rec.state := p_address_rec.state;
48 l_location_rec.county := p_address_rec.county;
49 l_location_rec.country := p_address_rec.country;
50 l_location_rec.postal_code := p_address_rec.postal_code;
51 l_location_rec.province := p_address_rec.province;
52 l_location_rec.county := p_address_rec.county;
53 l_location_rec.po_box_number := p_address_rec.po_box_number;
54 l_location_rec.street := p_address_rec.street;
55 l_location_rec.house_number := p_address_rec.house_number;
56 -- l_location_rec.apartment_number := p_address_rec.apartment_number;
57 -- l_location_rec.building := p_address_rec.building;
58 l_location_rec.street_number := p_address_rec.street_number;
59 -- l_location_rec.room := p_address_rec.room;
60 l_location_rec.floor := p_address_rec.floor;
61 l_location_rec.suite := p_address_rec.suite;
62 l_location_rec.position := p_address_rec.position;
63
64
65 -- To fix bug 2657648 changed hz_location_pub to hz_location_v2pub, aneemuch 11-Feb-2004
66 /*
67 HZ_LOCATION_V2PUB.create_location (
68 p_api_version => 1.0,
69 p_init_msg_list => FND_API.G_FALSE,
70 p_commit => FND_API.G_TRUE,
71 p_location_rec => l_location_rec,
72 x_return_status => l_return_status,
73 x_msg_count => l_msg_count,
74 x_msg_data => l_msg_data,
75 x_location_id => l_location_id,
76 p_validation_level => FND_API.G_VALID_LEVEL_FULL);
77 */
78 HZ_LOCATION_V2PUB.create_location (
79 p_init_msg_list => FND_API.G_FALSE,
80 p_location_rec => l_location_rec,
81 x_location_id => l_location_id,
82 x_return_status => l_return_status,
83 x_msg_count => l_msg_count,
84 x_msg_data => l_msg_data);
85 -- end of changes for bug 2657648, aneemuch 11-Feb-2004
86
87
88 x_return_status := l_return_status;
89 x_msg_count := l_msg_count;
90 x_msg_data := l_msg_data;
91
92 If (x_return_status = CSC_CORE_UTILS_PVT.G_RET_STS_SUCCESS) Then
93 x_location_id := l_location_id;
94 End If;
95 update cs_incidents_all_b set install_site_id = l_location_id
96 where incident_id = l_incident_id;
97
98 End Create_Incident_Address;
99
100
101 END CUG_ADDRESS_CREATION_PKG;