1 PACKAGE PO_XML_DELIVERY AUTHID CURRENT_USER AS
2 /* $Header: POXWXMLS.pls 120.7.12020000.2 2013/02/10 21:14:00 vegajula 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_SHIP_TO_LOCATION_CODE OUT NOCOPY VARCHAR2,
90 p_ADDRESS_LINE_1 out nocopy varchar2,
91 p_ADDRESS_LINE_2 out nocopy varchar2,
92 p_ADDRESS_LINE_3 out nocopy varchar2,
93 p_TOWN_OR_CITY out nocopy varchar2,
94 p_COUNTRY out nocopy varchar2, p_POSTAL_CODE out nocopy varchar2,
95 p_STATE out nocopy varchar2, p_TELEPHONE_NUMBER_1 out nocopy varchar2,
96 p_TELEPHONE_NUMBER_2 out nocopy varchar2,
97 p_TELEPHONE_NUMBER_3 out nocopy varchar2,
98 p_iso_country_code out nocopy varchar2);
99
100 -- procedure to get the ship_to info from hr_lcoations or hz_locations depending upon
101 -- the given location_id for the po_header_id is drop-ship or not.
102
103 procedure get_shipto_info( p_header_id in number, p_line_location_id in number,
104 p_ship_to_location_id in number,
105 p_ECE_TP_LOCATION_CODE out nocopy varchar2,
106 P_SHIP_TO_LOCATION_CODE OUT NOCOPY VARCHAR2,
107 p_ADDRESS_LINE_1 out nocopy varchar2, p_ADDRESS_LINE_2 out nocopy varchar2,
108 p_ADDRESS_LINE_3 out nocopy varchar2, p_TOWN_OR_CITY out nocopy varchar2,
109 p_COUNTRY out nocopy varchar2, p_POSTAL_CODE out nocopy varchar2,
110 p_STATE out nocopy varchar2, p_TELEPHONE_NUMBER_1 out nocopy varchar2,
111 p_TELEPHONE_NUMBER_2 out nocopy varchar2, p_TELEPHONE_NUMBER_3 out nocopy varchar2);
112
113 procedure setXMLEventKey ( itemtype in varchar2,
114 itemkey in varchar2,
115 actid in number,
116 funcmode in varchar2,
117 resultout out nocopy varchar2);
118
119
120
121 procedure setwfUserKey ( itemtype in varchar2,
122 itemkey in varchar2,
123 actid in number,
124 funcmode in varchar2,
125 resultout out nocopy varchar2);
126
127 --sets some session values like session language
128 procedure initTransaction (p_header_id in number,
129 p_vendor_id varchar2,
130 p_vendor_site_id varchar2,
131 transaction_type varchar2 ,
132 transaction_subtype varchar2,
133 p_release_id varchar2 default null, /*parameter1*/
134 p_revision_num varchar2 default null, /*parameter2*/
135 p_parameter3 varchar2 default null,
136 p_parameter4 varchar2 default null,
137 p_parameter5 varchar2 default null);
138
139 --Initializes wf item attributes with the PO information.
140 Procedure initialize_wf_parameters (
141 itemtype in varchar2,
142 itemkey in varchar2,
143 actid in number,
144 funcmode in varchar2,
145 resultout out nocopy varchar2);
146
147
148 /*
149 In cXML the deliverto information is provided as
150 <DELIVERTO>
151 QUANTITY: PO_cXML_DELIVERTO_ARCH_V.QUANTITY ||
152 NAME: || PO_cXML_DELIVERTO_ARCH_V.REQUESTOR ||
153 ADDRESS: || PO_cXML_DELIVERTO_ARCH_V.all the address tags
154 </DELIVERTO>
155 This is a helper function to concatinate all these values.
156 */
157 Procedure get_cxml_deliverto_info(p_QUANTITY in number, p_REQUESTOR in varchar2,
158 p_LOCATION_CODE in varchar2, p_ADDRESS_LINE in varchar2,
159 p_COUNTRY in varchar2, p_POSTAL_CODE in varchar2,
160 p_TOWN_OR_CITY in varchar2, p_STATE in varchar2,
161 p_deliverto out nocopy varchar2);
162
163 --Start of the comment
164 --
165 -- End of the comment
166 Procedure get_cxml_header_info (p_tp_id IN number,
167 p_tp_site_id IN number,
168 x_from_domain OUT nocopy varchar2,
169 x_from_identity OUT nocopy varchar2,
170 x_to_domain OUT nocopy varchar2,
171 x_to_identity OUT nocopy varchar2,
172 x_sender_domain OUT nocopy varchar2,
173 x_sender_identity OUT nocopy varchar2,
174 x_sender_sharedsecret OUT nocopy varchar2,
175 x_user_agent OUT nocopy varchar2,
176 x_deployment_mode OUT nocopy varchar2
177 );
178
179
180 procedure IS_XML_CHN_REQ_SOURCE(itemtype in varchar2,
181 itemkey in varchar2,
182 actid in number,
183 funcmode in varchar2,
184 resultout out NOCOPY varchar2);
185
186 -- For use in OAG Process/Change PO XML generation
187 -- bug 46115474
188 -- populate state, region, county tags of xml based on address style.
189 -- API called from process, change PO OAG xgms.
190 PROCEDURE get_oag_shipto_info(
191 p_header_id in number,
192 p_line_location_id in number,
193 p_ship_to_location_id in number,
194 p_ECE_TP_LOCATION_CODE out nocopy varchar2,
195 p_ADDRESS_LINE_1 out nocopy varchar2,
196 p_ADDRESS_LINE_2 out nocopy varchar2,
197 p_ADDRESS_LINE_3 out nocopy varchar2,
198 p_TOWN_OR_CITY out nocopy varchar2,
199 p_COUNTRY out nocopy varchar2,
200 P_COUNTY out nocopy varchar2,
201 p_POSTAL_CODE out nocopy varchar2,
202 p_STATE out nocopy varchar2,
203 p_REGION out nocopy varchar2,
204 p_TELEPHONE_NUMBER_1 out nocopy varchar2,
205 p_TELEPHONE_NUMBER_2 out nocopy varchar2,
206 p_TELEPHONE_NUMBER_3 out nocopy varchar2);
207
208
209 -- For use in OAG Process/Change PO XML generation
210 -- bug 46115474
211 -- populate state, region, county tags of xml based on address style.
212 -- API called from process, change PO OAG xgms.
213 -- and from get_oag_shipto
214 PROCEDURE get_hrloc_address(
215 p_location_id in varchar2,
216 addrline1 out NOCOPY VARCHAR2,
217 addrline2 out NOCOPY VARCHAR2,
218 addrline3 out NOCOPY VARCHAR2,
219 city out NOCOPY VARCHAR2,
220 country out NOCOPY VARCHAR2,
221 county out NOCOPY VARCHAR2,
222 postalcode out NOCOPY VARCHAR2,
223 region out NOCOPY VARCHAR2,
224 stateprovn out NOCOPY VARCHAR2);
225 procedure set_user_context ( itemtype in varchar2,
226 itemkey in varchar2,
227 actid in number,
228 funcmode in varchar2,
229 resultout out nocopy varchar2);
230
231 /*bug#6912518*/
232 Procedure get_header_shipto_info (p_po_header_id IN number,
233 p_po_release_id IN number,
234 x_partner_id out nocopy number,
235 x_partner_id_x out nocopy varchar2,
236 x_address_line_1 out nocopy varchar2,
237 x_address_line_2 out nocopy varchar2,
238 x_address_line_3 out nocopy varchar2,
239 x_city out nocopy varchar2,
240 x_country out nocopy varchar2,
241 x_county out nocopy varchar2,
242 x_postalcode out nocopy varchar2,
243 x_region out nocopy varchar2,
244 x_stateprovn out nocopy varchar2,
245 x_telephone_1 out nocopy varchar2,
246 x_telephone_2 out nocopy varchar2,
247 x_telephone_3 out nocopy varchar2
248 );
249
250
251 Procedure get_cxml_header_shipto_info (p_po_header_id IN number,
252 p_po_release_id IN number,
253 x_address_line_1 out nocopy varchar2,
254 x_address_line_2 out nocopy varchar2,
255 x_address_line_3 out nocopy varchar2,
256 x_city out nocopy varchar2,
257 x_country out nocopy varchar2,
258 x_postalcode out nocopy varchar2,
259 x_stateprovn out nocopy varchar2,
260 x_telephone_1 out nocopy varchar2,
261 x_deliverto out nocopy varchar2,
262 x_requestor_email OUT NOCOPY VARCHAR2
263 );
264 /*bug#6912518*/
265 PROCEDURE get_cXML_Header_Shipto_Name(p_org_name in varchar2,
266 x_shipto_name out nocopy varchar2);
267
268 procedure getSupplierSiteLanguage (p_vendor_id in varchar2,
269 p_vendor_site_id in varchar2,
270 lang_name out nocopy varchar2 );
271
272
273 end PO_XML_DELIVERY;