1 PACKAGE PO_XML_DELIVERY AUTHID CURRENT_USER AS
2 /* $Header: POXWXMLS.pls 120.3.12010000.2 2008/08/04 08:37:20 rramasam ship $ */
3
4 /*=======================================================================+
5 | FILENAME
6 | POXWXMLS.pls
7 |
8 | DESCRIPTION
9 | PL/SQL spec for package: PO_XML_DELIVERY
10 |
11 | NOTES
12 | MODIFIED Created jbalakri (05/03/2001)
13 *=====================================================================*/
14
15
16 procedure call_txn_delivery ( itemtype in varchar2,
17 itemkey in varchar2,
18 actid in number,
19 funcmode in varchar2,
20 resultout out nocopy varchar2);
21 procedure set_delivery_data ( itemtype in varchar2,
22 itemkey in varchar2,
23 actid in number,
24 funcmode in varchar2,
25 resultout out nocopy varchar2);
26 procedure is_partner_setup ( itemtype in varchar2,
27 itemkey in varchar2,
28 actid in number,
29 funcmode in varchar2,
30 resultout out nocopy varchar2);
31 /* XML Delivery Project, FPG+ */
32 procedure is_xml_chosen ( itemtype in varchar2,
33 itemkey in varchar2,
34 actid in number,
35 funcmode in varchar2,
36 resultout out nocopy varchar2);
37
38 /* XML Delivery Project, FPG+ */
39 procedure xml_time_stamp ( p_header_id in varchar2,
40 p_release_id varchar2,
41 p_org_id in number,
42 p_txn_type in varchar2,
43 p_document_type in varchar2);
44 /* XML Delivery Project, FPG+ */
45 procedure get_line_requestor( p_header_id in varchar2,
46 p_line_id in varchar2,
47 p_release_num in number,
48 p_document_type in varchar2,
49 p_revision_num in varchar2,
50 p_requestor out nocopy varchar2);
51 /* XML Delivery Project, FPG+ */
52 procedure get_xml_send_date( p_header_id in varchar2,
53 p_release_id in varchar2,
54 p_document_type in varchar2,
55 out_date out nocopy date);
56 /* XML Delivery Project, FPG+ */
57 function get_max_line_revision(
58 p_header_id varchar2,
59 p_line_id varchar2,
60 p_line_revision_num number,
61 p_revision_num number)
62 return number;
63
64 /* XML Delivery Project, FPG+ */
65 function get_max_location_revision( p_header_id varchar2,
66 p_line_id varchar2,
67 p_location_id varchar2,
68 p_location_revision_num number,
69 p_revision_num number)
70 return number;
71
72
73 procedure get_card_info( p_header_id in varchar2,
74 p_document_type in varchar2,
75 p_release_id in varchar2,
76 p_card_num out nocopy varchar2,
77 p_card_name out nocopy varchar2,
78 p_card_exp_date out nocopy date,
79 p_card_brand out nocopy varchar2);
80
81 -- procedure to get the ship_to info in cXML address format.
82 -- In OAG we've 3 address lines, and cXML has 1 address line.
83 -- This procedure calls get_shipt_info internally.
84
85 /*Modified the signature, bug#6912518*/
86 procedure get_cxml_shipto_info( p_header_id in number, p_line_location_id in number,
87 p_ship_to_location_id in number,
88 p_ECE_TP_LOCATION_CODE out nocopy varchar2,
89 p_ADDRESS_LINE_1 out nocopy varchar2,
90 p_ADDRESS_LINE_2 out nocopy varchar2,
91 p_ADDRESS_LINE_3 out nocopy varchar2,
92 p_TOWN_OR_CITY out nocopy varchar2,
93 p_COUNTRY out nocopy varchar2, p_POSTAL_CODE out nocopy varchar2,
94 p_STATE out nocopy varchar2, p_TELEPHONE_NUMBER_1 out nocopy varchar2,
95 p_TELEPHONE_NUMBER_2 out nocopy varchar2,
96 p_TELEPHONE_NUMBER_3 out nocopy varchar2,
97 p_iso_country_code out nocopy varchar2);
98
99 -- procedure to get the ship_to info from hr_lcoations or hz_locations depending upon
100 -- the given location_id for the po_header_id is drop-ship or not.
101
102 procedure get_shipto_info( p_header_id in number, p_line_location_id in number,
103 p_ship_to_location_id in number,
104 p_ECE_TP_LOCATION_CODE out nocopy varchar2,
105 p_ADDRESS_LINE_1 out nocopy varchar2, p_ADDRESS_LINE_2 out nocopy varchar2,
106 p_ADDRESS_LINE_3 out nocopy varchar2, p_TOWN_OR_CITY out nocopy varchar2,
107 p_COUNTRY out nocopy varchar2, p_POSTAL_CODE out nocopy varchar2,
108 p_STATE out nocopy varchar2, p_TELEPHONE_NUMBER_1 out nocopy varchar2,
109 p_TELEPHONE_NUMBER_2 out nocopy varchar2, p_TELEPHONE_NUMBER_3 out nocopy varchar2);
110
111 procedure setXMLEventKey ( itemtype in varchar2,
112 itemkey in varchar2,
113 actid in number,
114 funcmode in varchar2,
115 resultout out nocopy varchar2);
116
117
118
119 procedure setwfUserKey ( itemtype in varchar2,
120 itemkey in varchar2,
121 actid in number,
122 funcmode in varchar2,
123 resultout out nocopy varchar2);
124
125 --sets some session values like session language
126 procedure initTransaction (p_header_id in number,
127 p_vendor_id varchar2,
128 p_vendor_site_id varchar2,
129 transaction_type varchar2 ,
130 transaction_subtype varchar2,
131 p_release_id varchar2 default null, /*parameter1*/
132 p_revision_num varchar2 default null, /*parameter2*/
133 p_parameter3 varchar2 default null,
134 p_parameter4 varchar2 default null,
135 p_parameter5 varchar2 default null);
136
137 --Initializes wf item attributes with the PO information.
138 Procedure initialize_wf_parameters (
139 itemtype in varchar2,
140 itemkey in varchar2,
141 actid in number,
142 funcmode in varchar2,
143 resultout out nocopy varchar2);
144
145
146 /*
147 In cXML the deliverto information is provided as
148 <DELIVERTO>
149 QUANTITY: PO_cXML_DELIVERTO_ARCH_V.QUANTITY ||
150 NAME: || PO_cXML_DELIVERTO_ARCH_V.REQUESTOR ||
151 ADDRESS: || PO_cXML_DELIVERTO_ARCH_V.all the address tags
152 </DELIVERTO>
153 This is a helper function to concatinate all these values.
154 */
155 Procedure get_cxml_deliverto_info(p_QUANTITY in number, p_REQUESTOR in varchar2,
156 p_LOCATION_CODE in varchar2, p_ADDRESS_LINE in varchar2,
157 p_COUNTRY in varchar2, p_POSTAL_CODE in varchar2,
158 p_TOWN_OR_CITY in varchar2, p_STATE in varchar2,
159 p_deliverto out nocopy varchar2);
160
161 --Start of the comment
162 --
163 -- End of the comment
164 Procedure get_cxml_header_info (p_tp_id IN number,
165 p_tp_site_id IN number,
166 x_from_domain OUT nocopy varchar2,
167 x_from_identity OUT nocopy varchar2,
168 x_to_domain OUT nocopy varchar2,
169 x_to_identity OUT nocopy varchar2,
170 x_sender_domain OUT nocopy varchar2,
171 x_sender_identity OUT nocopy varchar2,
172 x_sender_sharedsecret OUT nocopy varchar2,
173 x_user_agent OUT nocopy varchar2,
174 x_deployment_mode OUT nocopy varchar2
175 );
176
177
178 procedure IS_XML_CHN_REQ_SOURCE(itemtype in varchar2,
179 itemkey in varchar2,
180 actid in number,
181 funcmode in varchar2,
182 resultout out NOCOPY varchar2);
183
184 -- For use in OAG Process/Change PO XML generation
185 -- bug 46115474
186 -- populate state, region, county tags of xml based on address style.
187 -- API called from process, change PO OAG xgms.
188 PROCEDURE get_oag_shipto_info(
189 p_header_id in number,
190 p_line_location_id in number,
191 p_ship_to_location_id in number,
192 p_ECE_TP_LOCATION_CODE out nocopy varchar2,
193 p_ADDRESS_LINE_1 out nocopy varchar2,
194 p_ADDRESS_LINE_2 out nocopy varchar2,
195 p_ADDRESS_LINE_3 out nocopy varchar2,
196 p_TOWN_OR_CITY out nocopy varchar2,
197 p_COUNTRY out nocopy varchar2,
198 P_COUNTY out nocopy varchar2,
199 p_POSTAL_CODE out nocopy varchar2,
200 p_STATE out nocopy varchar2,
201 p_REGION out nocopy varchar2,
202 p_TELEPHONE_NUMBER_1 out nocopy varchar2,
203 p_TELEPHONE_NUMBER_2 out nocopy varchar2,
204 p_TELEPHONE_NUMBER_3 out nocopy varchar2);
205
206
207 -- For use in OAG Process/Change PO XML generation
208 -- bug 46115474
209 -- populate state, region, county tags of xml based on address style.
210 -- API called from process, change PO OAG xgms.
211 -- and from get_oag_shipto
212 PROCEDURE get_hrloc_address(
213 p_location_id in varchar2,
214 addrline1 out NOCOPY VARCHAR2,
215 addrline2 out NOCOPY VARCHAR2,
216 addrline3 out NOCOPY VARCHAR2,
217 city out NOCOPY VARCHAR2,
218 country out NOCOPY VARCHAR2,
219 county out NOCOPY VARCHAR2,
220 postalcode out NOCOPY VARCHAR2,
221 region out NOCOPY VARCHAR2,
222 stateprovn out NOCOPY VARCHAR2);
223 procedure set_user_context ( itemtype in varchar2,
224 itemkey in varchar2,
225 actid in number,
226 funcmode in varchar2,
227 resultout out nocopy varchar2);
228
229 /*bug#6912518*/
230 Procedure get_header_shipto_info (p_po_header_id IN number,
231 p_po_release_id IN number,
232 x_partner_id out nocopy number,
233 x_partner_id_x out nocopy varchar2,
234 x_address_line_1 out nocopy varchar2,
235 x_address_line_2 out nocopy varchar2,
236 x_address_line_3 out nocopy varchar2,
237 x_city out nocopy varchar2,
238 x_country out nocopy varchar2,
239 x_county out nocopy varchar2,
240 x_postalcode out nocopy varchar2,
241 x_region out nocopy varchar2,
242 x_stateprovn out nocopy varchar2,
243 x_telephone_1 out nocopy varchar2,
244 x_telephone_2 out nocopy varchar2,
245 x_telephone_3 out nocopy varchar2
246 );
247
248
249 Procedure get_cxml_header_shipto_info (p_po_header_id IN number,
250 p_po_release_id IN number,
251 x_address_line_1 out nocopy varchar2,
252 x_address_line_2 out nocopy varchar2,
253 x_address_line_3 out nocopy varchar2,
254 x_city out nocopy varchar2,
255 x_country out nocopy varchar2,
256 x_postalcode out nocopy varchar2,
257 x_stateprovn out nocopy varchar2,
258 x_telephone_1 out nocopy varchar2,
259 x_deliverto out nocopy varchar2
260 );
261 /*bug#6912518*/
262 PROCEDURE get_cXML_Header_Shipto_Name(p_org_name in varchar2,
263 x_shipto_name out nocopy varchar2);
264
265
266 end PO_XML_DELIVERY;