1 PACKAGE HZ_GNR_PUB AS
2 /*$Header: ARHGNRPS.pls 120.7 2006/06/16 18:33:51 nsinghai noship $ */
3
4 PROCEDURE process_gnr (
5 p_location_table_name IN VARCHAR2,
6 p_location_id IN NUMBER,
7 p_call_type IN VARCHAR2, -- supported values ("C" and "U")
8 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
9 x_return_status OUT NOCOPY VARCHAR2,
10 x_msg_count OUT NOCOPY NUMBER,
11 x_msg_data OUT NOCOPY VARCHAR2);
12
13 /*
14 This procedure will validate the location record against geography data.
15 Input Parameters:
16 p_location_id : Location Id from HZ_LOCATIONS table to be validated
17 p_create_gnr_record : parameter that indicates if GNR record for the passed
18 in location needs to be created or not. Default is Y.
19 If only needs to test the validity of location and GNR
20 record creation is not desired, then N can be passed.
21 Output Parameters:
22 x_addr_val_level : Address Validation Level as determined by the program and
23 it used to do address validation
24 x_addr_warn_msg : Message Text when address validation level is Warning and
25 x_addr_val_status returns W i.e. not success.
26 x_addr_val_status: Address validation Status. It can have 4 values:
27 S (Success): Address validation is successful
28 W (Warning): Validation Level is WARNING and address validation
29 is not successful
30 E (Error) : Address validation is NOT successful
31 U (Unexpected Error) : System Error
32 x_return_status : Return Status of API. It can have 3 values:
33 S (Success): Address validation is successful (Even if x_addr_val_status
34 is W (Warning), this will return S.
35 E (Error) : Address validation is NOT successful
36 U (Unexpected Error) : System Error
37 x_msg_count : No. of messages stacked.
38 x_msg_data : Message Text for the messages stacked by validateLoc API.
39 It will return message for both E as well as W status
40 of x_addr_val_status.
41
42 Usage of API: If purpose is to only validate location id and get the error
43 message text for that location, then read x_addr_val_status
44 for status and x_msg_data for message text.
45 If used in plsql API flow, to read all the stacked messages,
46 use FND_MSG_PUB utility to read message stack.
47
48 */
49 PROCEDURE validateLoc (
50 p_location_id IN NUMBER,
51 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
52 x_addr_val_level OUT NOCOPY VARCHAR2,
53 x_addr_warn_msg OUT NOCOPY VARCHAR2,
54 x_addr_val_status OUT NOCOPY VARCHAR2,
55 x_return_status OUT NOCOPY VARCHAR2,
56 x_msg_count OUT NOCOPY NUMBER,
57 x_msg_data OUT NOCOPY VARCHAR2,
58 p_create_gnr_record IN VARCHAR2 DEFAULT 'Y'
59 );
60
61 PROCEDURE validateLoc(
62 p_location_id IN NUMBER DEFAULT NULL,
63 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
64 p_usage_code IN VARCHAR2 DEFAULT 'GEOGRAPHY',
65 p_address_style IN VARCHAR2 DEFAULT NULL,
66 p_country IN VARCHAR2,
67 p_state IN VARCHAR2 DEFAULT NULL,
68 p_province IN VARCHAR2 DEFAULT NULL,
69 p_county IN VARCHAR2 DEFAULT NULL,
70 p_city IN VARCHAR2 DEFAULT NULL,
71 p_postal_code IN VARCHAR2 DEFAULT NULL,
72 p_postal_plus4_code IN VARCHAR2 DEFAULT NULL,
73 p_attribute1 IN VARCHAR2 DEFAULT NULL,
74 p_attribute2 IN VARCHAR2 DEFAULT NULL,
75 p_attribute3 IN VARCHAR2 DEFAULT NULL,
76 p_attribute4 IN VARCHAR2 DEFAULT NULL,
77 p_attribute5 IN VARCHAR2 DEFAULT NULL,
78 p_attribute6 IN VARCHAR2 DEFAULT NULL,
79 p_attribute7 IN VARCHAR2 DEFAULT NULL,
80 p_attribute8 IN VARCHAR2 DEFAULT NULL,
81 p_attribute9 IN VARCHAR2 DEFAULT NULL,
82 p_attribute10 IN VARCHAR2 DEFAULT NULL,
83 x_addr_val_level OUT NOCOPY VARCHAR2,
84 x_addr_warn_msg OUT NOCOPY VARCHAR2,
85 x_addr_val_status OUT NOCOPY VARCHAR2,
86 x_return_status OUT NOCOPY VARCHAR2,
87 x_msg_count OUT NOCOPY NUMBER,
88 x_msg_data OUT NOCOPY VARCHAR2);
89
90 FUNCTION get_addr_val_level(p_country_code IN VARCHAR2) RETURN VARCHAR2;
91
92 PROCEDURE get_addr_val_status(
93 p_location_table_name IN VARCHAR2,
94 p_location_id IN NUMBER,
95 p_usage_code IN VARCHAR2,
96 x_is_validated OUT NOCOPY VARCHAR2,
97 x_address_status OUT NOCOPY VARCHAR2);
98
99
100 END HZ_GNR_PUB;