DBA Data[Home] [Help]

PACKAGE: APPS.OE_ORDER_PUB

Source


1 PACKAGE OE_Order_PUB AUTHID CURRENT_USER AS
2 /* $Header: OEXPORDS.pls 120.28.12020000.4 2013/01/17 07:47:06 sujithku ship $ */
3 /*#
4 * This public API allows users to perform various operations on sales orders in the Order Management system. Warning: should be used with care. Please be sure to read full descriptions
5 * of member procedures and functions before generating web services from them.
6 * @rep:scope public
7 * @rep:metalink 91798.1 Order Management Suite Documentation
8 * @rep:product ONT
9 * @rep:lifecycle active
10 * @rep:displayname Process Order API
11 * @rep:category BUSINESS_ENTITY ONT_SALES_ORDER
12 */
13 
14 
15 --  Header record type
16 
17 TYPE Header_Rec_Type IS RECORD
18 (   accounting_rule_id            NUMBER
19 ,   party_type             varchar2(30)
20 ,   agreement_id                  NUMBER
21 ,   attribute1                    VARCHAR2(240)
22 ,   attribute10                   VARCHAR2(240)
23 ,   attribute11                   VARCHAR2(240)
24 ,   attribute12                   VARCHAR2(240)
25 ,   attribute13                   VARCHAR2(240)
26 ,   attribute14                   VARCHAR2(240)
27 ,   attribute15                   VARCHAR2(240)
28 ,   attribute16                   VARCHAR2(240)
29 ,   attribute17                   VARCHAR2(240)
30 ,   attribute18                   VARCHAR2(240)
31 ,   attribute19                   VARCHAR2(240)
32 ,   attribute2                    VARCHAR2(240)
33 ,   attribute20                   VARCHAR2(240)
34 ,   attribute3                    VARCHAR2(240)
35 ,   attribute4                    VARCHAR2(240)
36 ,   attribute5                    VARCHAR2(240)
37 ,   attribute6                    VARCHAR2(240)
38 ,   attribute7                    VARCHAR2(240)
39 ,   attribute8                    VARCHAR2(240)
40 ,   attribute9                    VARCHAR2(240)
41 ,   booked_flag                   VARCHAR2(1)
42 ,   cancelled_flag                VARCHAR2(1)
43 ,   context                       VARCHAR2(30)
44 ,   conversion_rate               NUMBER
45 ,   conversion_rate_date          DATE
46 ,   conversion_type_code          VARCHAR2(30)
47 ,   customer_preference_set_code  VARCHAR2(30)
48 ,   created_by                    NUMBER
49 ,   creation_date                 DATE
50 ,   cust_po_number                VARCHAR2(50)
51 ,   deliver_to_contact_id         NUMBER
52 ,   deliver_to_org_id             NUMBER
53 ,   demand_class_code             VARCHAR2(30)
54 ,   earliest_schedule_limit	  NUMBER
55 ,   expiration_date               DATE
56 ,   fob_point_code                VARCHAR2(30)
57 ,   freight_carrier_code          VARCHAR2(30)
58 ,   freight_terms_code            VARCHAR2(30)
59 ,   global_attribute1             VARCHAR2(240)
60 ,   global_attribute10            VARCHAR2(240)
61 ,   global_attribute11            VARCHAR2(240)
62 ,   global_attribute12            VARCHAR2(240)
63 ,   global_attribute13            VARCHAR2(240)
64 ,   global_attribute14            VARCHAR2(240)
65 ,   global_attribute15            VARCHAR2(240)
66 ,   global_attribute16            VARCHAR2(240)
67 ,   global_attribute17            VARCHAR2(240)
68 ,   global_attribute18            VARCHAR2(240)
69 ,   global_attribute19            VARCHAR2(240)
70 ,   global_attribute2             VARCHAR2(240)
71 ,   global_attribute20            VARCHAR2(240)
72 ,   global_attribute3             VARCHAR2(240)
73 ,   global_attribute4             VARCHAR2(240)
74 ,   global_attribute5             VARCHAR2(240)
75 ,   global_attribute6             VARCHAR2(240)
76 ,   global_attribute7             VARCHAR2(240)
77 ,   global_attribute8             VARCHAR2(240)
78 ,   global_attribute9             VARCHAR2(240)
79 ,   global_attribute_category     VARCHAR2(30)
80 ,   TP_CONTEXT                    VARCHAR2(30)
81 ,   TP_ATTRIBUTE1                 VARCHAR2(240)
82 ,   TP_ATTRIBUTE2                 VARCHAR2(240)
83 ,   TP_ATTRIBUTE3                 VARCHAR2(240)
84 ,   TP_ATTRIBUTE4                 VARCHAR2(240)
85 ,   TP_ATTRIBUTE5                 VARCHAR2(240)
86 ,   TP_ATTRIBUTE6                 VARCHAR2(240)
87 ,   TP_ATTRIBUTE7                 VARCHAR2(240)
88 ,   TP_ATTRIBUTE8                 VARCHAR2(240)
89 ,   TP_ATTRIBUTE9                 VARCHAR2(240)
90 ,   TP_ATTRIBUTE10                VARCHAR2(240)
91 ,   TP_ATTRIBUTE11                VARCHAR2(240)
92 ,   TP_ATTRIBUTE12                VARCHAR2(240)
93 ,   TP_ATTRIBUTE13                VARCHAR2(240)
94 ,   TP_ATTRIBUTE14                VARCHAR2(240)
95 ,   TP_ATTRIBUTE15                VARCHAR2(240)
96 ,   header_id                     NUMBER
97 ,   invoice_to_contact_id         NUMBER
98 ,   invoice_to_org_id             NUMBER
99 ,   invoicing_rule_id             NUMBER
100 ,   last_updated_by               NUMBER
101 ,   last_update_date              DATE
102 ,   last_update_login             NUMBER
103 ,   latest_schedule_limit         NUMBER
104 ,   open_flag                     VARCHAR2(1)
105 ,   order_category_code           VARCHAR2(30)
106 ,   ordered_date                  DATE
107 ,   order_date_type_code	  VARCHAR2(30)
108 ,   order_number                  NUMBER
109 ,   order_source_id               NUMBER
110 ,   order_type_id                 NUMBER
111 ,   org_id                        NUMBER
112 ,   orig_sys_document_ref         VARCHAR2(50)
113 ,   partial_shipments_allowed     VARCHAR2(1)
114 ,   payment_term_id               NUMBER
115 ,   price_list_id                 NUMBER
116 ,   price_request_code            VARCHAR2(240)    --PROMOTIONS SEP/01
117 ,   pricing_date                  DATE
118 ,   program_application_id        NUMBER
119 ,   program_id                    NUMBER
120 ,   program_update_date           DATE
121 ,   request_date                  DATE
122 ,   request_id                    NUMBER
123 ,   return_reason_code		  VARCHAR2(30)
124 ,   salesrep_id			  NUMBER
125 ,   sales_channel_code            VARCHAR2(30)
126 ,   shipment_priority_code        VARCHAR2(30)
127 ,   shipping_method_code          VARCHAR2(30)
128 ,   ship_from_org_id              NUMBER
129 ,   ship_tolerance_above          NUMBER
130 ,   ship_tolerance_below          NUMBER
131 ,   ship_to_contact_id            NUMBER
132 ,   ship_to_org_id                NUMBER
133 ,   sold_from_org_id		  NUMBER
134 ,   sold_to_contact_id            NUMBER
135 ,   sold_to_org_id                NUMBER
136 ,   sold_to_phone_id              NUMBER
137 ,   source_document_id            NUMBER
138 ,   source_document_type_id       NUMBER
139 ,   tax_exempt_flag               VARCHAR2(30)
140 ,   tax_exempt_number             VARCHAR2(80)
141 ,   tax_exempt_reason_code        VARCHAR2(30)
142 ,   tax_point_code                VARCHAR2(30)
143 ,   transactional_curr_code       VARCHAR2(15)
144 ,   version_number                NUMBER
145 ,   return_status                 VARCHAR2(1)
146 ,   db_flag                       VARCHAR2(1)
147 ,   operation                     VARCHAR2(30)
148 ,   first_ack_code                VARCHAR2(30)
149 ,   first_ack_date                DATE
150 ,   last_ack_code                 VARCHAR2(30)
151 ,   last_ack_date                 DATE
152 ,   change_reason                 VARCHAR2(30)
153 ,   change_comments               VARCHAR2(2000)
154 ,   change_sequence 	  	  VARCHAR2(50)
155 ,   change_request_code	  	  VARCHAR2(30)
156 ,   ready_flag		  	  VARCHAR2(1)
157 ,   status_flag		  	  VARCHAR2(1)
158 ,   force_apply_flag		  VARCHAR2(1)
159 ,   drop_ship_flag		  VARCHAR2(1)
160 ,   customer_payment_term_id	  NUMBER
161 ,   payment_type_code             VARCHAR2(30)
162 ,   payment_amount                NUMBER
163 ,   check_number                  VARCHAR2(50)
164 ,   credit_card_code              VARCHAR2(80)
165 ,   credit_card_holder_name       VARCHAR2(80)
166 ,   credit_card_number            VARCHAR2(80)
167 ,   credit_card_expiration_date   DATE
168 ,   credit_card_approval_code     VARCHAR2(80)
169 ,   credit_card_approval_date     DATE
170 ,   shipping_instructions	    VARCHAR2(2000)
171 ,   packing_instructions          VARCHAR2(2000)
172 ,   flow_status_code              VARCHAR2(30)
173 ,   booked_date			    DATE
174 ,   marketing_source_code_id      NUMBER
175 ,   upgraded_flag                VARCHAR2(1)
176 ,   lock_control                 NUMBER
177 ,   ship_to_edi_location_code    VARCHAR2(40)
178 ,   sold_to_edi_location_code    VARCHAR2(40)
179 ,   bill_to_edi_location_code    VARCHAR2(40)
180 ,   ship_from_edi_location_code  VARCHAR2(40)   -- Ship From Bug 2116166
181 ,   SHIP_FROM_ADDRESS_ID         Number
182 ,   SOLD_TO_ADDRESS_ID           Number
183 ,   SHIP_TO_ADDRESS_ID           Number
184 ,   INVOICE_ADDRESS_ID           Number
185 ,   SHIP_TO_ADDRESS_CODE         Varchar2(40)
186 ,   xml_message_id               Number
187 ,   ship_to_customer_id                NUMBER
188 ,   invoice_to_customer_id                NUMBER
189 ,   deliver_to_customer_id                NUMBER
190 ,   accounting_rule_duration     NUMBER
191 ,   xml_transaction_type_code    Varchar2(30)
192 ,   Blanket_Number               NUMBER
193 ,   Line_Set_Name                VARCHAR2(30)
194 ,   Fulfillment_Set_Name         VARCHAR2(30)
195 ,   Default_Fulfillment_Set      VARCHAR2(1)
196 -- Quoting project related fields
197 ,   quote_date                      date
198 ,   quote_number                    number
199 ,   sales_document_name             varchar2(240)
200 ,   transaction_phase_code          varchar2(30)
201 ,   user_status_code                varchar2(30)
202 ,   draft_submitted_flag            varchar2(1)
203 ,   source_document_version_number  number
204 ,   sold_to_site_use_id             number
205 -- End quoting project related fields
206 ,   Minisite_Id                  NUMBER
207 ,   IB_OWNER                     VARCHAR2(60)
208 ,   IB_INSTALLED_AT_LOCATION     VARCHAR2(60)
209 ,   IB_CURRENT_LOCATION          VARCHAR2(60)
210 ,   END_CUSTOMER_ID              NUMBER
211 ,   END_CUSTOMER_CONTACT_ID      NUMBER
212 ,   END_CUSTOMER_SITE_USE_ID     NUMBER
213 ,   SUPPLIER_SIGNATURE           VARCHAR2(240)
214 ,   SUPPLIER_SIGNATURE_DATE      DATE
215 ,   CUSTOMER_SIGNATURE           VARCHAR2(240)
216 ,   CUSTOMER_SIGNATURE_DATE      DATE
217 --automatic account creation
218 ,   sold_to_party_id              NUMBER
219 ,   sold_to_org_contact_id        NUMBER
220 ,   ship_to_party_id              NUMBER
221 ,   ship_to_party_site_id         NUMBER
222 ,   ship_to_party_site_use_id     NUMBER
223 ,   deliver_to_party_id           NUMBER
224 ,   deliver_to_party_site_id      NUMBER
225 ,   deliver_to_party_site_use_id  NUMBER
226 ,   invoice_to_party_id           NUMBER
227 ,   invoice_to_party_site_id      NUMBER
228 ,   invoice_to_party_site_use_id  NUMBER
229     --aac for endcustomer
230 ,   end_customer_party_id        NUMBER
231 ,   end_customer_party_site_id         NUMBER
232 ,   end_customer_party_site_use_id     NUMBER
233 ,   end_customer_party_number varchar2(30)
234 ,   end_customer_org_contact_id NUMBER
235 
236 ,   ship_to_customer_party_id     NUMBER
237 ,   deliver_to_customer_party_id  NUMBER
238 ,   invoice_to_customer_party_id  NUMBER
239 
240 ,   ship_to_org_contact_id      NUMBER
241 ,   deliver_to_org_contact_id	  NUMBER
242 ,   invoice_to_org_contact_id   NUMBER
243 -- Contract template placeholder
244 ,   contract_template_id         NUMBER
245 ,   contract_source_doc_type_code    varchar2(30)
246 ,   contract_source_document_id        number
247 ,   sold_to_party_number        varchar2(30)
248 ,   ship_to_party_number        varchar2(30)
249 ,   invoice_to_party_number        varchar2(30)
250 ,   deliver_to_party_number        varchar2(30)
251 --Key Transaction Dates
252 ,   Order_Firmed_Date            DATE
253 ,   Instrument_Security_Code	  VARCHAR2(10) --R12 CC Encryption
254 ,   CC_INSTRUMENT_ID		 NUMBER
255 ,   CC_INSTRUMENT_ASSIGNMENT_ID    NUMBER --R12 CC Encryption
256 
257 --ER7675548
258 ,   sold_to_customer_ref        Varchar2(50)
259 ,   ship_to_customer_ref        Varchar2(50)
260 ,   invoice_to_customer_ref     Varchar2(50)
261 ,   deliver_to_customer_ref     Varchar2(50)
262 
263 ,   ship_to_address_ref         Varchar2(50)
264 ,   invoice_to_address_ref      Varchar2(50)
265 ,   deliver_to_address_ref      Varchar2(50)
266 ,   sold_to_address_ref         VARCHAR2(50)
267 
268 ,   sold_to_contact_ref          Varchar2(50)
269 ,   ship_to_contact_ref          Varchar2(50)
270 ,   invoice_to_contact_ref       Varchar2(50)
271 ,   deliver_to_contact_ref       Varchar2(50)
272 
273 );
274 
275 TYPE Header_Tbl_Type IS TABLE OF Header_Rec_Type
276     INDEX BY BINARY_INTEGER;
277 
278 --  Header value record type
279 
280 TYPE Header_Val_Rec_Type IS RECORD
281 (   accounting_rule               VARCHAR2(240)
282 ,   agreement                     VARCHAR2(240)
283 ,   conversion_type               VARCHAR2(240)
284 ,   deliver_to_address1           VARCHAR2(240)
285 ,   deliver_to_address2           VARCHAR2(240)
286 ,   deliver_to_address3           VARCHAR2(240)
287 ,   deliver_to_address4           VARCHAR2(240)
288 ,   deliver_to_contact            VARCHAR2(360)
289 ,   deliver_to_location           VARCHAR2(240)
290 ,   deliver_to_org                VARCHAR2(240)
291 ,   deliver_to_state              VARCHAR2(240)
292 ,   deliver_to_city               VARCHAR2(240)
293 ,   deliver_to_zip                VARCHAR2(240)
294 ,   deliver_to_country            VARCHAR2(240)
295 ,   deliver_to_county             VARCHAR2(240)
296 ,   deliver_to_province           VARCHAR2(240)
297 ,   demand_class                  VARCHAR2(240)
298 ,   fob_point                     VARCHAR2(240)
299 ,   freight_terms                 VARCHAR2(240)
300 ,   invoice_to_address1           VARCHAR2(240)
301 ,   invoice_to_address2           VARCHAR2(240)
302 ,   invoice_to_address3           VARCHAR2(240)
303 ,   invoice_to_address4           VARCHAR2(240)
304 ,   invoice_to_state              VARCHAR2(240)
305 ,   invoice_to_city               VARCHAR2(240)
306 ,   invoice_to_zip                VARCHAR2(240)
307 ,   invoice_to_country            VARCHAR2(240)
308 ,   invoice_to_county             VARCHAR2(240)
309 ,   invoice_to_province           VARCHAR2(240)
310 ,   invoice_to_contact            VARCHAR2(360)
311 ,   invoice_to_contact_first_name VARCHAR2(240)
312 ,   invoice_to_contact_last_name VARCHAR2(240)
313 ,   invoice_to_location           VARCHAR2(240)
314 ,   invoice_to_org                VARCHAR2(240)
315 ,   invoicing_rule                VARCHAR2(240)
316 ,   order_source                  VARCHAR2(240)
317 ,   order_type                    VARCHAR2(240)
318 ,   payment_term                  VARCHAR2(240)
319 ,   price_list                    VARCHAR2(240)
320 ,   return_reason          VARCHAR2(240)
321 ,   salesrep               VARCHAR2(240)
322 ,   shipment_priority             VARCHAR2(240)
323 ,   ship_from_address1            VARCHAR2(240)
324 ,   ship_from_address2            VARCHAR2(240)
325 ,   ship_from_address3            VARCHAR2(240)
326 ,   ship_from_address4            VARCHAR2(240)
327 ,   ship_from_location            VARCHAR2(240)
328 ,   SHIP_FROM_CITY               Varchar(60)       -- Ship From Bug 2116166
329 ,   SHIP_FROM_POSTAL_CODE        Varchar(60)
330 ,   SHIP_FROM_COUNTRY            Varchar(60)
331 ,   SHIP_FROM_REGION1            Varchar2(240)
332 ,   SHIP_FROM_REGION2            Varchar2(240)
333 ,   SHIP_FROM_REGION3            Varchar2(240)
334 ,   ship_from_org                 VARCHAR2(240)
335 ,   sold_to_address1              VARCHAR2(240)
336 ,   sold_to_address2              VARCHAR2(240)
337 ,   sold_to_address3              VARCHAR2(240)
338 ,   sold_to_address4              VARCHAR2(240)
339 ,   sold_to_state                 VARCHAR2(240)
340 ,   sold_to_country               VARCHAR2(240)
341 ,   sold_to_zip                   VARCHAR2(240)
342 ,   sold_to_county                VARCHAR2(240)
343 ,   sold_to_province              VARCHAR2(240)
344 ,   sold_to_city                  VARCHAR2(240)
345 ,   sold_to_contact_last_name     VARCHAR2(240)
346 ,   sold_to_contact_first_name    VARCHAR2(240)
347 ,   ship_to_address1              VARCHAR2(240)
348 ,   ship_to_address2              VARCHAR2(240)
349 ,   ship_to_address3              VARCHAR2(240)
350 ,   ship_to_address4              VARCHAR2(240)
351 ,   ship_to_state                 VARCHAR2(240)
352 ,   ship_to_country               VARCHAR2(240)
353 ,   ship_to_zip                   VARCHAR2(240)
354 ,   ship_to_county                VARCHAR2(240)
355 ,   ship_to_province              VARCHAR2(240)
356 ,   ship_to_city                  VARCHAR2(240)
357 ,   ship_to_contact               VARCHAR2(360)
358 ,   ship_to_contact_last_name     VARCHAR2(240)
359 ,   ship_to_contact_first_name    VARCHAR2(240)
360 ,   ship_to_location              VARCHAR2(240)
361 ,   ship_to_org                   VARCHAR2(240)
362 ,   sold_to_contact               VARCHAR2(360)
363 ,   sold_to_org                   VARCHAR2(360)
364 ,   sold_from_org                 VARCHAR2(240)
365 ,   tax_exempt                    VARCHAR2(240)
366 ,   tax_exempt_reason             VARCHAR2(240)
367 ,   tax_point                     VARCHAR2(240)
368 ,   customer_payment_term       VARCHAR2(240)
369 ,   payment_type                  VARCHAR2(240)
370 ,   credit_card                   VARCHAR2(240)
371 ,   status                        VARCHAR2(240)
372 ,   freight_carrier               VARCHAR2(80)
373 ,   shipping_method               VARCHAR2(80)
374 ,   order_date_type               VARCHAR2(80)
375 ,   customer_number               VARCHAR2(30)
376 ,   ship_to_customer_name         VARCHAR2(360)
377 ,   invoice_to_customer_name      VARCHAR2(360)
378 ,   sales_channel                 VARCHAR2(80)
379 ,   ship_to_customer_number       VARCHAR2(50)
380 ,   invoice_to_customer_number    VARCHAR2(50)
381 ,   ship_to_customer_id           NUMBER
382 ,   invoice_to_customer_id        NUMBER
383 ,   deliver_to_customer_id        NUMBER
384 ,   deliver_to_customer_number    VARCHAR2(50)
385 ,   deliver_to_customer_name      VARCHAR2(360)
386 --Kadiraju fix done for bug#13251096 Begin
387 --,   deliver_to_customer_Number_oi    VARCHAR2(30)
388 ,   deliver_to_customer_Number_oi    VARCHAR2(50)
389 --Kadiraju fix done for bug#13251096 End
390 ,   deliver_to_customer_Name_oi      VARCHAR2(360)
391 --Kadiraju fix done for bug#13251096 Begin
392 --,   ship_to_customer_Number_oi    VARCHAR2(30)
393 ,   ship_to_customer_Number_oi    VARCHAR2(50)
394 --Kadiraju fix done for bug#13251096 End
395 ,   ship_to_customer_Name_oi      VARCHAR2(360)
396 --Kadiraju fix done for bug#13251096 Begin
397 --,   invoice_to_customer_Number_oi    VARCHAR2(30)
398 ,   invoice_to_customer_Number_oi    VARCHAR2(50)
399 --Kadiraju fix done for bug#13251096 End
400 ,   invoice_to_customer_Name_oi      VARCHAR2(360)
401 -- QUOTING changes
402 ,   user_status                        VARCHAR2(240)
403 ,   transaction_phase                  VARCHAR2(240)
404 ,   sold_to_location_address1      varchar2(240)
405 ,   sold_to_location_address2      varchar2(240)
406 ,   sold_to_location_address3      varchar2(240)
407 ,   sold_to_location_address4      varchar2(240)
408 ,   sold_to_location               varchar2(240)
409 ,   sold_to_location_city               varchar2(240)
410 ,   sold_to_location_state               varchar2(240)
411 ,   sold_to_location_postal               varchar2(240)
412 ,   sold_to_location_country               varchar2(240)
413 ,   sold_to_location_county               varchar2(240)
414 ,   sold_to_location_province             varchar2(240)
415 -- END QUOTING changes
416 -- distributed orders
417 ,   end_customer_name                VARCHAR2(360)
418 ,   end_customer_number              VARCHAR2(50)
419 ,   end_customer_contact             VARCHAR2(360)
420 ,   end_cust_contact_last_name       VARCHAR2(240)
421 ,   end_cust_contact_first_name      VARCHAR2(240)
422 ,   end_customer_site_address1       VARCHAR2(240)
423 ,   end_customer_site_address2       VARCHAR2(240)
424 ,   end_customer_site_address3       VARCHAR2(240)
425 ,   end_customer_site_address4       VARCHAR2(240)
426 ,   end_customer_site_state          VARCHAR2(240)
427 ,   end_customer_site_country        VARCHAR2(240)
428 ,   end_customer_site_location       VARCHAR2(240)
429 ,   end_customer_site_zip            VARCHAR2(240)
430 ,   end_customer_site_county         VARCHAR2(240)
431 ,   end_customer_site_province       VARCHAR2(240)
432 ,   end_customer_site_city           VARCHAR2(240)
433 ,   end_customer_site_postal_code    VARCHAR2(240)
434 -- distributed orders
435 ,  blanket_agreement_name            VARCHAR2(360)
436 ,  ib_owner_dsp                      VARCHAR2(60)
437 ,  ib_installed_at_location_dsp           VARCHAR2(60)
438 ,  ib_current_location_dsp           VARCHAR2(60)
439 -- word integration
440 ,  contract_template                 VARCHAR2(60)
441 ,  contract_source                   VARCHAR2(60)
442 ,  authoring_party                   VARCHAR2(60)
443 -- Account Desc Project
444 , account_description		     VARCHAR2(240)
445 , registry_id			     VARCHAR2(30)
446 );
447 
448 TYPE Header_Val_Tbl_Type IS TABLE OF Header_Val_Rec_Type
449     INDEX BY BINARY_INTEGER;
450 
451 --  Header_Adj record type
452 
453 TYPE Header_Adj_Rec_Type IS RECORD
454 (   attribute1                    VARCHAR2(240)
455 ,   attribute10                   VARCHAR2(240)
456 ,   attribute11                   VARCHAR2(240)
457 ,   attribute12                   VARCHAR2(240)
458 ,   attribute13                   VARCHAR2(240)
459 ,   attribute14                   VARCHAR2(240)
460 ,   attribute15                   VARCHAR2(240)
461 ,   attribute2                    VARCHAR2(240)
462 ,   attribute3                    VARCHAR2(240)
463 ,   attribute4                    VARCHAR2(240)
464 ,   attribute5                    VARCHAR2(240)
465 ,   attribute6                    VARCHAR2(240)
466 ,   attribute7                    VARCHAR2(240)
467 ,   attribute8                    VARCHAR2(240)
468 ,   attribute9                    VARCHAR2(240)
469 ,   automatic_flag                VARCHAR2(1)
470 ,   context                       VARCHAR2(30)
471 ,   created_by                    NUMBER
472 ,   creation_date                 DATE
473 ,   discount_id                   NUMBER
474 ,   discount_line_id              NUMBER
475 ,   header_id                     NUMBER
476 ,   last_updated_by               NUMBER
477 ,   last_update_date              DATE
478 ,   last_update_login             NUMBER
479 ,   line_id                       NUMBER
480 ,   percent                       NUMBER
481 ,   price_adjustment_id           NUMBER
482 ,   program_application_id        NUMBER
483 ,   program_id                    NUMBER
484 ,   program_update_date           DATE
485 ,   request_id                    NUMBER
486 ,   return_status                 VARCHAR2(1)
487 ,   db_flag                       VARCHAR2(1)
488 ,   operation                     VARCHAR2(30)
489 ,   orig_sys_discount_ref	  VARCHAR2(50)
490 ,   change_request_code	  	  VARCHAR2(30)
491 ,   status_flag		  	  VARCHAR2(1)
492 ,   list_header_id		  number
493 ,   list_line_id		  number
494 ,   list_line_type_code		  varchar2(30)
495 ,   modifier_mechanism_type_code  varchar2(30)
496 ,   modified_from		  varchar2(240)
497 ,   modified_to		  varchar2(240)
498 ,   updated_flag		  varchar2(1)
499 ,   update_allowed		  varchar2(1)
500 ,   applied_flag		  varchar2(1)
501 ,   change_reason_code		  varchar2(30)
502 ,   change_reason_text		  varchar2(2000)
503 ,   operand                       number
504 ,   operand_per_pqty              number
505 ,   arithmetic_operator           varchar2(30)
506 ,   cost_id                       number
507 ,   tax_code                      varchar2(50)
508 ,   tax_rate_id                   NUMBER -- TaxER
509 ,   tax_exempt_flag               varchar2(1)
510 ,   tax_exempt_number             varchar2(80)
511 ,   tax_exempt_reason_code        varchar2(30)
512 ,   parent_adjustment_id          number
513 ,   invoiced_flag                 varchar2(1)
514 ,   estimated_flag                varchar2(1)
515 ,   inc_in_sales_performance      varchar2(1)
516 ,   split_action_code             varchar2(30)
517 ,   adjusted_amount				number
518 ,   adjusted_amount_per_pqty                    number
519 ,   pricing_phase_id			number
520 ,   charge_type_code              varchar2(30)
521 ,   charge_subtype_code           varchar2(30)
522 ,   list_line_no                  varchar2(240)
523 ,   source_system_code            varchar2(30)
524 ,   benefit_qty                   number
525 ,   benefit_uom_code              varchar2(3)
526 ,   print_on_invoice_flag         varchar2(1)
527 ,   expiration_date               date
528 ,   rebate_transaction_type_code  varchar2(30)
529 ,   rebate_transaction_reference  varchar2(80)
530 ,   rebate_payment_system_code    varchar2(30)
531 ,   redeemed_date                 date
532 ,   redeemed_flag                 varchar2(1)
533 ,   accrual_flag                  varchar2(1)
534 ,   range_break_quantity		    number
535 ,   accrual_conversion_rate	    number
536 ,   pricing_group_sequence	     number
537 ,   modifier_level_code			varchar2(30)
538 ,   price_break_type_code		varchar2(30)
539 ,   substitution_attribute		varchar2(30)
540 ,   proration_type_code			varchar2(30)
541 ,   credit_or_charge_flag          varchar2(1)
542 ,   include_on_returns_flag        varchar2(1)
543 ,   ac_attribute1                  VARCHAR2(240)
544 ,   ac_attribute10                 VARCHAR2(240)
545 ,   ac_attribute11                 VARCHAR2(240)
546 ,   ac_attribute12                 VARCHAR2(240)
547 ,   ac_attribute13                 VARCHAR2(240)
548 ,   ac_attribute14                 VARCHAR2(240)
549 ,   ac_attribute15                 VARCHAR2(240)
550 ,   ac_attribute2                  VARCHAR2(240)
551 ,   ac_attribute3                  VARCHAR2(240)
552 ,   ac_attribute4                  VARCHAR2(240)
553 ,   ac_attribute5                  VARCHAR2(240)
554 ,   ac_attribute6                  VARCHAR2(240)
555 ,   ac_attribute7                  VARCHAR2(240)
556 ,   ac_attribute8                  VARCHAR2(240)
557 ,   ac_attribute9                  VARCHAR2(240)
558 ,   ac_context                     VARCHAR2(150)
559 ,   lock_control                   NUMBER
560 ,   invoiced_amount                NUMBER);
561 
562 TYPE Header_Adj_Tbl_Type IS TABLE OF Header_Adj_Rec_Type
563     INDEX BY BINARY_INTEGER;
564 
565 --  Header_Adj value record type
566 
567 TYPE Header_Adj_Val_Rec_Type IS RECORD
568 (   discount                      VARCHAR2(240)
569 ,   list_name                     VARCHAR2(240)
570 ,   version_no                    VARCHAR2(30)
571 );
572 
573 TYPE Header_Adj_Val_Tbl_Type IS TABLE OF Header_Adj_Val_Rec_Type
574     INDEX BY BINARY_INTEGER;
575 
576 -- Header_Price_Att_Rec_Type
577 
578 TYPE Header_Price_Att_Rec_Type IS RECORD
579 ( 	order_price_attrib_id	number
580 ,       header_id		number
581 ,	line_id			number
582 ,	creation_date		date
583 ,	created_by		number
584 ,	last_update_date	date
585 ,	last_updated_by		number
586 ,	last_update_login	number
587 ,	program_application_id	number
588 ,	program_id		number
589 ,	program_update_date	date
590 ,	request_id		number
591 , 	flex_title		varchar2(60)
592 ,	pricing_context	varchar2(30)
593 ,	pricing_attribute1	varchar2(240)
594 ,	pricing_attribute2	varchar2(240)
595 ,	pricing_attribute3	varchar2(240)
596 ,	pricing_attribute4	varchar2(240)
597 ,	pricing_attribute5	varchar2(240)
598 ,	pricing_attribute6	varchar2(240)
599 ,	pricing_attribute7	varchar2(240)
600 ,	pricing_attribute8	varchar2(240)
601 ,	pricing_attribute9	varchar2(240)
602 ,	pricing_attribute10	varchar2(240)
603 ,	pricing_attribute11	varchar2(240)
604 ,	pricing_attribute12	varchar2(240)
605 ,	pricing_attribute13	varchar2(240)
606 ,	pricing_attribute14	varchar2(240)
607 ,	pricing_attribute15	varchar2(240)
608 ,	pricing_attribute16	varchar2(240)
609 ,	pricing_attribute17	varchar2(240)
610 ,	pricing_attribute18	varchar2(240)
611 ,	pricing_attribute19	varchar2(240)
612 ,	pricing_attribute20	varchar2(240)
613 ,	pricing_attribute21	varchar2(240)
614 ,	pricing_attribute22	varchar2(240)
615 ,	pricing_attribute23	varchar2(240)
616 ,	pricing_attribute24	varchar2(240)
617 ,	pricing_attribute25	varchar2(240)
618 ,	pricing_attribute26	varchar2(240)
619 ,	pricing_attribute27	varchar2(240)
620 ,	pricing_attribute28	varchar2(240)
621 ,	pricing_attribute29	varchar2(240)
622 ,	pricing_attribute30	varchar2(240)
623 ,	pricing_attribute31	varchar2(240)
624 ,	pricing_attribute32	varchar2(240)
625 ,	pricing_attribute33	varchar2(240)
626 ,	pricing_attribute34	varchar2(240)
627 ,	pricing_attribute35	varchar2(240)
628 ,	pricing_attribute36	varchar2(240)
629 ,	pricing_attribute37	varchar2(240)
630 ,	pricing_attribute38	varchar2(240)
631 ,	pricing_attribute39	varchar2(240)
632 ,	pricing_attribute40	varchar2(240)
633 ,	pricing_attribute41	varchar2(240)
634 ,	pricing_attribute42	varchar2(240)
635 ,	pricing_attribute43	varchar2(240)
636 ,	pricing_attribute44	varchar2(240)
637 ,	pricing_attribute45	varchar2(240)
638 ,	pricing_attribute46	varchar2(240)
639 ,	pricing_attribute47	varchar2(240)
640 ,	pricing_attribute48	varchar2(240)
641 ,	pricing_attribute49	varchar2(240)
642 ,	pricing_attribute50	varchar2(240)
643 ,	pricing_attribute51	varchar2(240)
644 ,	pricing_attribute52	varchar2(240)
645 ,	pricing_attribute53	varchar2(240)
646 ,	pricing_attribute54	varchar2(240)
647 ,	pricing_attribute55	varchar2(240)
648 ,	pricing_attribute56	varchar2(240)
649 ,	pricing_attribute57	varchar2(240)
650 ,	pricing_attribute58	varchar2(240)
651 ,	pricing_attribute59	varchar2(240)
652 ,	pricing_attribute60	varchar2(240)
653 ,	pricing_attribute61	varchar2(240)
654 ,	pricing_attribute62	varchar2(240)
655 ,	pricing_attribute63	varchar2(240)
656 ,	pricing_attribute64	varchar2(240)
657 ,	pricing_attribute65	varchar2(240)
658 ,	pricing_attribute66	varchar2(240)
659 ,	pricing_attribute67	varchar2(240)
660 ,	pricing_attribute68	varchar2(240)
661 ,	pricing_attribute69	varchar2(240)
662 ,	pricing_attribute70	varchar2(240)
663 ,	pricing_attribute71	varchar2(240)
664 ,	pricing_attribute72	varchar2(240)
665 ,	pricing_attribute73	varchar2(240)
666 ,	pricing_attribute74	varchar2(240)
667 ,	pricing_attribute75	varchar2(240)
668 ,	pricing_attribute76	varchar2(240)
669 ,	pricing_attribute77	varchar2(240)
670 ,	pricing_attribute78	varchar2(240)
671 ,	pricing_attribute79	varchar2(240)
672 ,	pricing_attribute80	varchar2(240)
673 ,	pricing_attribute81	varchar2(240)
674 ,	pricing_attribute82	varchar2(240)
675 ,	pricing_attribute83	varchar2(240)
676 ,	pricing_attribute84	varchar2(240)
677 ,	pricing_attribute85	varchar2(240)
678 ,	pricing_attribute86	varchar2(240)
679 ,	pricing_attribute87	varchar2(240)
680 ,	pricing_attribute88	varchar2(240)
681 ,	pricing_attribute89	varchar2(240)
682 ,	pricing_attribute90	varchar2(240)
683 ,	pricing_attribute91	varchar2(240)
684 ,	pricing_attribute92	varchar2(240)
685 ,	pricing_attribute93	varchar2(240)
686 ,	pricing_attribute94	varchar2(240)
687 ,	pricing_attribute95	varchar2(240)
688 ,	pricing_attribute96	varchar2(240)
689 ,	pricing_attribute97	varchar2(240)
690 ,	pricing_attribute98	varchar2(240)
691 ,	pricing_attribute99	varchar2(240)
692 ,	pricing_attribute100	varchar2(240)
693 ,	context 		varchar2(30)
694 ,	attribute1		varchar2(240)
695 ,	attribute2		varchar2(240)
696 ,	attribute3		varchar2(240)
697 ,	attribute4		varchar2(240)
698 ,	attribute5		varchar2(240)
699 ,	attribute6		varchar2(240)
700 ,	attribute7		varchar2(240)
701 ,	attribute8		varchar2(240)
702 ,	attribute9		varchar2(240)
703 ,	attribute10		varchar2(240)
704 ,	attribute11		varchar2(240)
705 ,	attribute12		varchar2(240)
706 ,	attribute13		varchar2(240)
707 ,	attribute14		varchar2(240)
708 ,	attribute15		varchar2(240)
709 ,	Override_Flag		varchar2(1)
710 , 	return_status           VARCHAR2(1)
711 , 	db_flag                 VARCHAR2(1)
712 , 	operation               VARCHAR2(30)
713 ,       lock_control            NUMBER
714 ,       orig_sys_atts_ref       VARCHAR2(50)  --1433292
715 ,       change_request_code     VARCHAR2(30)
716 )
717 ;
718 
719 TYPE  Header_Price_Att_Tbl_Type is TABLE of Header_Price_Att_rec_Type
720 	INDEX by BINARY_INTEGER;
721 
722 -- Header_Adj_Att_Rec_Type
723 
724 Type Header_Adj_Att_Rec_Type is RECORD
725 ( price_adj_attrib_id	number
726 , price_adjustment_id    number
727 , Adj_index              NUMBER
728 , flex_title		 varchar2(60)
729 , pricing_context        varchar2(30)
730 , pricing_attribute      varchar2(30)
731 , creation_date          date
732 , created_by             number
733 , last_update_date       date
734 , last_updated_by        number
735 , last_update_login      number
736 , program_application_id number
737 , program_id             number
738 , program_update_date    date
739 , request_id             number
740 , pricing_attr_value_from varchar2(240)
741 , pricing_attr_value_to  varchar2(240)
742 , comparison_operator    varchar2(30)
743 , return_status          VARCHAR2(1)
744 , db_flag                VARCHAR2(1)
745 , operation              VARCHAR2(30)
746 , lock_control           NUMBER
747 );
748 
749 
750 TYPE  Header_Adj_Att_Tbl_Type is TABLE of Header_Adj_Att_rec_Type
751 	INDEX by BINARY_INTEGER;
752 
753 -- Header_Adj_Assoc_Rec_Type
754 
755 Type Header_Adj_Assoc_Rec_Type  is RECORD
756 (price_adj_assoc_id      number
757 , line_id                number
758 , Line_Index			number
759 , price_adjustment_id    number
760 , Adj_index              NUMBER
761 , rltd_Price_Adj_Id      number
762 , Rltd_Adj_Index         NUMBER
763 , creation_date          date
764 , created_by             number
765 , last_update_date       date
766 , last_updated_by        number
767 , last_update_login      number
768 , program_application_id number
769 , program_id             number
770 , program_update_date    date
771 , request_id             number
772 , return_status          VARCHAR2(1)
773 , db_flag                VARCHAR2(1)
774 , operation              VARCHAR2(30)
775 , lock_control           NUMBER
776 );
777 
778 
779 TYPE  Header_Adj_Assoc_Tbl_Type is TABLE of Header_Adj_Assoc_rec_Type
780 	INDEX by BINARY_INTEGER;
781 
782 
783 --  Header_Scredit record type
784 
785 TYPE Header_Scredit_Rec_Type IS RECORD
786 (   attribute1                    VARCHAR2(240)
787 ,   attribute10                   VARCHAR2(240)
788 ,   attribute11                   VARCHAR2(240)
789 ,   attribute12                   VARCHAR2(240)
790 ,   attribute13                   VARCHAR2(240)
791 ,   attribute14                   VARCHAR2(240)
792 ,   attribute15                   VARCHAR2(240)
793 ,   attribute2                    VARCHAR2(240)
794 ,   attribute3                    VARCHAR2(240)
795 ,   attribute4                    VARCHAR2(240)
796 ,   attribute5                    VARCHAR2(240)
797 ,   attribute6                    VARCHAR2(240)
798 ,   attribute7                    VARCHAR2(240)
799 ,   attribute8                    VARCHAR2(240)
800 ,   attribute9                    VARCHAR2(240)
801 ,   context                       VARCHAR2(30)
802 ,   created_by                    NUMBER
803 ,   creation_date                 DATE
804 ,   dw_update_advice_flag         VARCHAR2(1)
805 ,   header_id                     NUMBER
806 ,   last_updated_by               NUMBER
807 ,   last_update_date              DATE
808 ,   last_update_login             NUMBER
809 ,   line_id                       NUMBER
810 ,   percent                       NUMBER
811 ,   salesrep_id                   NUMBER
812 ,   sales_credit_type_id          NUMBER
813 ,   sales_credit_id               NUMBER
814 ,   wh_update_date                DATE
815 ,   return_status                 VARCHAR2(1)
816 ,   db_flag                       VARCHAR2(1)
817 ,   operation                     VARCHAR2(30)
818 ,   orig_sys_credit_ref	  	    VARCHAR2(50)
819 ,   change_request_code	  	    VARCHAR2(30)
820 ,   status_flag		  	    VARCHAR2(1)
821 ,   lock_control                    NUMBER
822 ,   change_reason                 VARCHAR2(30)
823 ,   change_comments               VARCHAR2(2000)
824 --SG{
825  ,sales_group_id NUMBER
826  ,sales_group_updated_FLAG VARCHAR2(1)
827 --SG}
828 );
829 
830 TYPE Header_Scredit_Tbl_Type IS TABLE OF Header_Scredit_Rec_Type
831     INDEX BY BINARY_INTEGER;
832 
833 --  Header_Scredit value record type
834 
835 TYPE Header_Scredit_Val_Rec_Type IS RECORD
836 (   salesrep                      VARCHAR2(240)
837    ,sales_credit_type             VARCHAR2(240)
838  --SG{
839  ,sales_group VARCHAR2(240)
840  --SG}
841 );
842 
843 
844 TYPE Header_Scredit_Val_Tbl_Type IS TABLE OF Header_Scredit_Val_Rec_Type
845     INDEX BY BINARY_INTEGER;
846 
847 --  Line record type
848 
849 TYPE Line_Rec_Type IS RECORD
850 (   accounting_rule_id            NUMBER
851 ,   party_type             varchar2(30)
852 ,   actual_arrival_date           DATE
853 ,   actual_shipment_date          DATE
854 ,   agreement_id                  NUMBER
855 ,   arrival_set_id                NUMBER
856 ,   ato_line_id                   NUMBER
857 ,   attribute1                    VARCHAR2(240)
858 ,   attribute10                   VARCHAR2(240)
859 ,   attribute11                   VARCHAR2(240)
860 ,   attribute12                   VARCHAR2(240)
861 ,   attribute13                   VARCHAR2(240)
862 ,   attribute14                   VARCHAR2(240)
863 ,   attribute15                   VARCHAR2(240)
864 ,   attribute16                   VARCHAR2(240)
865 ,   attribute17                   VARCHAR2(240)
866 ,   attribute18                   VARCHAR2(240)
867 ,   attribute19                   VARCHAR2(240)
868 ,   attribute2                    VARCHAR2(240)
869 ,   attribute20                   VARCHAR2(240)
870 ,   attribute3                    VARCHAR2(240)
871 ,   attribute4                    VARCHAR2(240)
872 ,   attribute5                    VARCHAR2(240)
873 ,   attribute6                    VARCHAR2(240)
874 ,   attribute7                    VARCHAR2(240)
875 ,   attribute8                    VARCHAR2(240)
876 ,   attribute9                    VARCHAR2(240)
877 ,   authorized_to_ship_flag       VARCHAR2(1)
878 ,   auto_selected_quantity        NUMBER
879 ,   booked_flag                   VARCHAR2(1)
880 ,   cancelled_flag                VARCHAR2(1)
881 ,   cancelled_quantity            NUMBER
882 ,   cancelled_quantity2           NUMBER
883 ,   commitment_id                 NUMBER
884 ,   component_code                VARCHAR2(1000)
885 ,   component_number              NUMBER
886 ,   component_sequence_id         NUMBER
887 ,   config_header_id              NUMBER
888 ,   config_rev_nbr 	              NUMBER
889 ,   config_display_sequence       NUMBER
890 ,   configuration_id              NUMBER
891 ,   context                       VARCHAR2(30)
892 ,   created_by                    NUMBER
893 ,   creation_date                 DATE
894 ,   credit_invoice_line_id        NUMBER
895 ,   customer_dock_code            VARCHAR2(50)
896 ,   customer_job                  VARCHAR2(50)
897 ,   customer_production_line      VARCHAR2(50)
898 ,   customer_trx_line_id          NUMBER
899 ,   cust_model_serial_number      VARCHAR2(50)
900 ,   cust_po_number                VARCHAR2(50)
901 ,   cust_production_seq_num       VARCHAR2(50)
902 ,   delivery_lead_time            NUMBER
903 ,   deliver_to_contact_id         NUMBER
904 ,   deliver_to_org_id             NUMBER
905 ,   demand_bucket_type_code       VARCHAR2(30)
906 ,   demand_class_code             VARCHAR2(30)
907 ,   dep_plan_required_flag        VARCHAR2(1)
908 ,   earliest_acceptable_date      DATE
909 ,   end_item_unit_number          VARCHAR2(30)
910 ,   explosion_date                DATE
911 ,   fob_point_code                VARCHAR2(30)
912 ,   freight_carrier_code          VARCHAR2(30)
913 ,   freight_terms_code            VARCHAR2(30)
914 ,   fulfilled_quantity            NUMBER
915 ,   fulfilled_quantity2           NUMBER
916 ,   global_attribute1             VARCHAR2(240)
917 ,   global_attribute10            VARCHAR2(240)
918 ,   global_attribute11            VARCHAR2(240)
919 ,   global_attribute12            VARCHAR2(240)
920 ,   global_attribute13            VARCHAR2(240)
921 ,   global_attribute14            VARCHAR2(240)
922 ,   global_attribute15            VARCHAR2(240)
923 ,   global_attribute16            VARCHAR2(240)
924 ,   global_attribute17            VARCHAR2(240)
925 ,   global_attribute18            VARCHAR2(240)
926 ,   global_attribute19            VARCHAR2(240)
927 ,   global_attribute2             VARCHAR2(240)
928 ,   global_attribute20            VARCHAR2(240)
929 ,   global_attribute3             VARCHAR2(240)
930 ,   global_attribute4             VARCHAR2(240)
931 ,   global_attribute5             VARCHAR2(240)
932 ,   global_attribute6             VARCHAR2(240)
933 ,   global_attribute7             VARCHAR2(240)
934 ,   global_attribute8             VARCHAR2(240)
935 ,   global_attribute9             VARCHAR2(240)
936 ,   global_attribute_category     VARCHAR2(30)
937 ,   header_id                     NUMBER
938 ,   industry_attribute1           VARCHAR2(240)
939 ,   industry_attribute10          VARCHAR2(240)
940 ,   industry_attribute11          VARCHAR2(240)
941 ,   industry_attribute12          VARCHAR2(240)
942 ,   industry_attribute13          VARCHAR2(240)
943 ,   industry_attribute14          VARCHAR2(240)
944 ,   industry_attribute15          VARCHAR2(240)
945 ,   industry_attribute16          VARCHAR2(240)
946 ,   industry_attribute17          VARCHAR2(240)
947 ,   industry_attribute18          VARCHAR2(240)
948 ,   industry_attribute19          VARCHAR2(240)
949 ,   industry_attribute20          VARCHAR2(240)
950 ,   industry_attribute21          VARCHAR2(240)
951 ,   industry_attribute22          VARCHAR2(240)
952 ,   industry_attribute23          VARCHAR2(240)
953 ,   industry_attribute24          VARCHAR2(240)
954 ,   industry_attribute25          VARCHAR2(240)
955 ,   industry_attribute26          VARCHAR2(240)
956 ,   industry_attribute27          VARCHAR2(240)
957 ,   industry_attribute28          VARCHAR2(240)
958 ,   industry_attribute29          VARCHAR2(240)
959 ,   industry_attribute30          VARCHAR2(240)
960 ,   industry_attribute2           VARCHAR2(240)
961 ,   industry_attribute3           VARCHAR2(240)
962 ,   industry_attribute4           VARCHAR2(240)
963 ,   industry_attribute5           VARCHAR2(240)
964 ,   industry_attribute6           VARCHAR2(240)
965 ,   industry_attribute7           VARCHAR2(240)
966 ,   industry_attribute8           VARCHAR2(240)
967 ,   industry_attribute9           VARCHAR2(240)
968 ,   industry_context              VARCHAR2(30)
969 ,   TP_CONTEXT                    VARCHAR2(30)
970 ,   TP_ATTRIBUTE1                 VARCHAR2(240)
971 ,   TP_ATTRIBUTE2                 VARCHAR2(240)
972 ,   TP_ATTRIBUTE3                 VARCHAR2(240)
973 ,   TP_ATTRIBUTE4                 VARCHAR2(240)
974 ,   TP_ATTRIBUTE5                 VARCHAR2(240)
975 ,   TP_ATTRIBUTE6                 VARCHAR2(240)
976 ,   TP_ATTRIBUTE7                 VARCHAR2(240)
977 ,   TP_ATTRIBUTE8                 VARCHAR2(240)
978 ,   TP_ATTRIBUTE9                 VARCHAR2(240)
979 ,   TP_ATTRIBUTE10                VARCHAR2(240)
980 ,   TP_ATTRIBUTE11                VARCHAR2(240)
981 ,   TP_ATTRIBUTE12                VARCHAR2(240)
982 ,   TP_ATTRIBUTE13                VARCHAR2(240)
983 ,   TP_ATTRIBUTE14                VARCHAR2(240)
984 ,   TP_ATTRIBUTE15                VARCHAR2(240)
985 ,   intermed_ship_to_org_id       NUMBER
986 ,   intermed_ship_to_contact_id   NUMBER
987 ,   inventory_item_id             NUMBER
988 ,   invoice_interface_status_code VARCHAR2(30)
989 ,   invoice_to_contact_id         NUMBER
990 ,   invoice_to_org_id             NUMBER
991 ,   invoicing_rule_id             NUMBER
992 ,   ordered_item                  VARCHAR2(2000)
993 ,   item_revision                 VARCHAR2(3)
994 ,   item_type_code                VARCHAR2(30)
995 ,   last_updated_by               NUMBER
996 ,   last_update_date              DATE
997 ,   last_update_login             NUMBER
998 ,   latest_acceptable_date        DATE
999 ,   line_category_code            VARCHAR2(30)
1000 ,   line_id                       NUMBER
1001 ,   line_number                   NUMBER
1002 ,   line_type_id                  NUMBER
1003 ,   link_to_line_ref              VARCHAR2(50)
1004 ,   link_to_line_id               NUMBER
1005 ,   link_to_line_index            NUMBER
1006 ,   model_group_number            NUMBER
1007 ,   mfg_component_sequence_id     NUMBER
1008 ,   mfg_lead_time                 NUMBER
1009 ,   open_flag                     VARCHAR2(1)
1010 ,   option_flag                   VARCHAR2(1)
1011 ,   option_number                 NUMBER
1012 ,   ordered_quantity              NUMBER
1013 ,   ordered_quantity2             NUMBER
1014 ,   order_quantity_uom            VARCHAR2(3)
1015 ,   ordered_quantity_uom2         VARCHAR2(3)
1016 ,   org_id                        NUMBER
1017 ,   orig_sys_document_ref         VARCHAR2(50)
1018 ,   orig_sys_line_ref             VARCHAR2(50)
1019 ,   over_ship_reason_code	    VARCHAR2(30)
1020 ,   over_ship_resolved_flag	    VARCHAR2(1)
1021 ,   payment_term_id               NUMBER
1022 ,   planning_priority             NUMBER
1023 ,   preferred_grade               VARCHAR2(150)   -- INVCONV extended to 150
1024 ,   price_list_id                 NUMBER
1025 ,   price_request_code            VARCHAR2(240)    --PROMOTIONS SEP/01
1026 ,   pricing_attribute1            VARCHAR2(240)
1027 ,   pricing_attribute10           VARCHAR2(240)
1028 ,   pricing_attribute2            VARCHAR2(240)
1029 ,   pricing_attribute3            VARCHAR2(240)
1030 ,   pricing_attribute4            VARCHAR2(240)
1031 ,   pricing_attribute5            VARCHAR2(240)
1032 ,   pricing_attribute6            VARCHAR2(240)
1033 ,   pricing_attribute7            VARCHAR2(240)
1034 ,   pricing_attribute8            VARCHAR2(240)
1035 ,   pricing_attribute9            VARCHAR2(240)
1036 ,   pricing_context               VARCHAR2(240)
1037 ,   pricing_date                  DATE
1038 ,   pricing_quantity              NUMBER
1039 ,   pricing_quantity_uom          VARCHAR2(3)
1040 ,   program_application_id        NUMBER
1041 ,   program_id                    NUMBER
1042 ,   program_update_date           DATE
1043 ,   project_id                    NUMBER
1044 ,   promise_date                  DATE
1045 ,   re_source_flag                VARCHAR2(1)
1046 ,   reference_customer_trx_line_id NUMBER
1047 ,   reference_header_id           NUMBER
1048 ,   reference_line_id             NUMBER
1049 ,   reference_type                VARCHAR2(30)
1050 ,   request_date                  DATE
1051 ,   request_id                    NUMBER
1052 ,   reserved_quantity             NUMBER
1053 ,   return_attribute1             VARCHAR2(240)
1054 ,   return_attribute10            VARCHAR2(240)
1055 ,   return_attribute11            VARCHAR2(240)
1056 ,   return_attribute12            VARCHAR2(240)
1057 ,   return_attribute13            VARCHAR2(240)
1058 ,   return_attribute14            VARCHAR2(240)
1059 ,   return_attribute15            VARCHAR2(240)
1060 ,   return_attribute2             VARCHAR2(240)
1061 ,   return_attribute3             VARCHAR2(240)
1062 ,   return_attribute4             VARCHAR2(240)
1063 ,   return_attribute5             VARCHAR2(240)
1064 ,   return_attribute6             VARCHAR2(240)
1065 ,   return_attribute7             VARCHAR2(240)
1066 ,   return_attribute8             VARCHAR2(240)
1067 ,   return_attribute9             VARCHAR2(240)
1068 ,   return_context                VARCHAR2(30)
1069 ,   return_reason_code		  VARCHAR2(30)
1070 ,   rla_schedule_type_code        VARCHAR2(30)
1071 ,   salesrep_id			  NUMBER
1072 ,   schedule_arrival_date         DATE
1073 ,   schedule_ship_date            DATE
1074 ,   schedule_action_code          VARCHAR2(30)
1075 ,   schedule_status_code          VARCHAR2(30)
1076 ,   shipment_number               NUMBER
1077 ,   shipment_priority_code        VARCHAR2(30)
1078 ,   shipped_quantity              NUMBER
1079 ,   shipped_quantity2             NUMBER
1080 ,   shipping_interfaced_flag      VARCHAR2(1)
1081 ,   shipping_method_code          VARCHAR2(30)
1082 ,   shipping_quantity             NUMBER
1083 ,   shipping_quantity2            NUMBER
1084 ,   shipping_quantity_uom         VARCHAR2(3)
1085 ,   shipping_quantity_uom2        VARCHAR2(3)
1086 ,   ship_from_org_id              NUMBER
1087 ,   ship_model_complete_flag      VARCHAR2(30)
1088 ,   ship_set_id                   NUMBER
1089 ,   fulfillment_set_id           NUMBER
1090 ,   ship_tolerance_above          NUMBER
1091 ,   ship_tolerance_below          NUMBER
1092 ,   ship_to_contact_id            NUMBER
1093 ,   ship_to_org_id                NUMBER
1094 ,   sold_to_org_id                NUMBER
1095 ,   sold_from_org_id              NUMBER
1096 ,   sort_order                    VARCHAR2(2000)
1097 ,   source_document_id            NUMBER
1098 ,   source_document_line_id       NUMBER
1099 ,   source_document_type_id       NUMBER
1100 ,   source_type_code              VARCHAR2(30)
1101 ,   split_from_line_id            NUMBER
1102 ,   task_id                       NUMBER
1103 ,   tax_code                      VARCHAR2(50)
1104 ,   tax_date                      DATE
1105 ,   tax_exempt_flag               VARCHAR2(30)
1106 ,   tax_exempt_number             VARCHAR2(80)
1107 ,   tax_exempt_reason_code        VARCHAR2(30)
1108 ,   tax_point_code                VARCHAR2(30)
1109 ,   tax_rate                      NUMBER
1110 ,   tax_value                     NUMBER
1111 ,   top_model_line_ref            VARCHAR2(50)
1112 ,   top_model_line_id             NUMBER
1113 ,   top_model_line_index          NUMBER
1114 ,   unit_list_price               NUMBER
1115 ,   unit_list_price_per_pqty      NUMBER
1116 ,   unit_selling_price            NUMBER
1117 ,   unit_selling_price_per_pqty   NUMBER
1118 ,   veh_cus_item_cum_key_id       NUMBER
1119 ,   visible_demand_flag           VARCHAR2(1)
1120 ,   return_status                 VARCHAR2(1)
1121 ,   db_flag                       VARCHAR2(1)
1122 ,   operation                     VARCHAR2(30)
1123 ,   first_ack_code                VARCHAR2(30)
1124 ,   first_ack_date                DATE
1125 ,   last_ack_code                 VARCHAR2(30)
1126 ,   last_ack_date                 DATE
1127 ,   change_reason                 VARCHAR2(30)
1128 ,   change_comments               VARCHAR2(2000)
1129 ,   arrival_set	              VARCHAR2(30)
1130 ,   ship_set			         VARCHAR2(30)
1131 ,   fulfillment_set	              VARCHAR2(30)
1132 ,   order_source_id               NUMBER
1133 ,   orig_sys_shipment_ref	    VARCHAR2(50)
1134 ,   change_sequence	  	         VARCHAR2(50)
1135 ,   change_request_code	  	    VARCHAR2(30)
1136 ,   status_flag		  	    VARCHAR2(1)
1137 ,   drop_ship_flag		         VARCHAR2(1)
1138 ,   customer_line_number	         VARCHAR2(50)
1139 ,   customer_shipment_number	    VARCHAR2(50)
1140 ,   customer_item_net_price	    NUMBER
1141 ,   customer_payment_term_id	    NUMBER
1142 ,   ordered_item_id               NUMBER
1143 ,   item_identifier_type          VARCHAR2(25)
1144 ,   shipping_instructions	    VARCHAR2(2000)
1145 ,   packing_instructions          VARCHAR2(2000)
1146 ,   calculate_price_flag          VARCHAR2(1)
1147 ,   invoiced_quantity             NUMBER
1148 ,   service_txn_reason_code       VARCHAR2(30)
1149 ,   service_txn_comments          VARCHAR2(2000)
1150 ,   service_duration              NUMBER
1151 ,   service_period                VARCHAR2(3)
1152 ,   service_start_date            DATE
1153 ,   service_end_date              DATE
1154 ,   service_coterminate_flag      VARCHAR2(1)
1155 ,   unit_list_percent             NUMBER
1156 ,   unit_selling_percent          NUMBER
1157 ,   unit_percent_base_price       NUMBER
1158 ,   service_number                NUMBER
1159 ,   service_reference_type_code   VARCHAR2(30)
1160 ,   service_reference_line_id     NUMBER
1161 ,   service_reference_system_id   NUMBER
1162 ,   service_ref_order_number      NUMBER
1163 ,   service_ref_line_number       NUMBER
1164 ,   service_reference_order       VARCHAR2(50)
1165 ,   service_reference_line        VARCHAR2(50)
1166 ,   service_reference_system      VARCHAR2(50)
1167 ,   service_ref_shipment_number   NUMBER
1168 ,   service_ref_option_number     NUMBER
1169 ,   service_line_index            NUMBER
1170 ,   Line_set_id			    NUMBER
1171 ,   split_by                      VARCHAR2(240)
1172 ,   Split_Action_Code             VARCHAR2(30)
1173 ,   shippable_flag		 	    VARCHAR2(1)
1174 ,   model_remnant_flag		    VARCHAR2(1)
1175 ,   flow_status_code              VARCHAR2(30)
1176 ,   fulfilled_flag                VARCHAR2(1)
1177 ,   fulfillment_method_code       VARCHAR2(30)
1178 ,   revenue_amount    		    NUMBER
1179 ,   marketing_source_code_id      NUMBER
1180 ,   fulfillment_date		    DATE
1181 -- Non-database field that will be used ONLY in OE_Order_PVT
1182 -- Is set to TRUE when the line is processed till defaulting
1183 -- If the line being processed is a child (OPTION) and the parent (MODEL)
1184 -- line is yet to be processed in the same call to process order,
1185 -- then the processing of child (OPTION) is aborted after defaulting
1186 -- and the parent (MODEL) line is processed.
1187 -- Once the parent(MODEL) line has been processed, then the child(OPTION)
1188 -- line is processed starting from the steps immediately after defaulting
1189 -- i.e. apply attribute changes
1190 ,   semi_processed_flag		    BOOLEAN
1191 ,   upgraded_flag                 VARCHAR2(1)
1192 ,   lock_control                  NUMBER
1193 ,   subinventory                  VARCHAR2(10)
1194 ,   split_from_line_ref           VARCHAR2(50)
1195 ,   split_from_shipment_ref       VARCHAR2(50)
1196 ,   ship_to_edi_location_code     VARCHAR2(40)
1197 ,   Bill_to_Edi_Location_Code     VARCHAR2(40)    -- Ship From Bug 2116166
1198 ,   ship_from_edi_location_code   VARCHAR2(40)
1199 ,   Ship_from_address_id          NUMBER
1200 ,   Sold_to_address_id            NUMBER
1201 ,   Ship_to_address_id            NUMBER
1202 ,   Invoice_address_id            NUMBER
1203 ,   Ship_to_address_code          VARCHAR2(40)
1204 ,   Original_Inventory_Item_Id    NUMBER
1205 ,   Original_item_identifier_Type VARCHAR2(30)
1206 ,   Original_ordered_item_id      NUMBER
1207 ,   Original_ordered_item         VARCHAR2(2000)
1208 ,   Item_substitution_type_code   VARCHAR2(30)
1209 ,   Late_Demand_Penalty_Factor    NUMBER
1210 ,   Override_atp_date_code        VARCHAR2(30)
1211 ,   ship_to_customer_id          NUMBER
1212 ,   invoice_to_customer_id       NUMBER
1213 ,   deliver_to_customer_id       NUMBER
1214 ,   accounting_rule_duration     NUMBER
1215 ,   unit_cost                    NUMBER
1216 ,   user_item_description        VARCHAR2(1000)
1217 ,   xml_transaction_type_code    Varchar2(30)
1218 ,   item_relationship_type       NUMBER
1219 ,   Blanket_Number               NUMBER
1220 ,   Blanket_Line_Number          NUMBER
1221 ,   Blanket_Version_Number       NUMBER
1222 ,   cso_response_flag            VARCHAR2(1)
1223 ,   Firm_demand_flag             VARCHAR2(1)
1224 ,   Earliest_ship_date           DATE
1225 -- Quoting project related fields
1226 ,   transaction_phase_code       varchar2(30)
1227 ,   source_document_version_number   number
1228 -- End Quoting project related fields
1229 ,   Minisite_Id                  NUMBER
1230 ,   IB_OWNER                     VARCHAR2(60)
1231 ,   IB_INSTALLED_AT_LOCATION     VARCHAR2(60)
1232 ,   IB_CURRENT_LOCATION          VARCHAR2(60)
1233 ,   END_CUSTOMER_ID              NUMBER
1234 ,   END_CUSTOMER_CONTACT_ID      NUMBER
1235 ,   END_CUSTOMER_SITE_USE_ID     NUMBER
1236 ,   SUPPLIER_SIGNATURE           VARCHAR2(240)
1237 ,   SUPPLIER_SIGNATURE_DATE      DATE
1238 ,   CUSTOMER_SIGNATURE           VARCHAR2(240)
1239 ,   CUSTOMER_SIGNATURE_DATE      DATE
1240 -- automatic account creation
1241 ,   ship_to_party_id              NUMBER
1242 ,   ship_to_party_site_id         NUMBER
1243 ,   ship_to_party_site_use_id     NUMBER
1244 ,   deliver_to_party_id           NUMBER
1245 ,   deliver_to_party_site_id      NUMBER
1246 ,   deliver_to_party_site_use_id  NUMBER
1247 ,   invoice_to_party_id           NUMBER
1248 ,   invoice_to_party_site_id      NUMBER
1249 ,   invoice_to_party_site_use_id  NUMBER
1250 
1251     --aac for endcustomer
1252 ,   end_customer_party_id        NUMBER
1253 ,   end_customer_party_site_id         NUMBER
1254 ,   end_customer_party_site_use_id     NUMBER
1255 ,   end_customer_party_number varchar2(30)
1256 ,   end_customer_org_contact_id NUMBER
1257 
1258 
1259 ,   ship_to_customer_party_id     NUMBER
1260 ,   deliver_to_customer_party_id  NUMBER
1261 ,   invoice_to_customer_party_id  NUMBER
1262 
1263 ,   ship_to_org_contact_id      NUMBER
1264 ,   deliver_to_org_contact_id	  NUMBER
1265 ,   invoice_to_org_contact_id   NUMBER
1266 -- retrobilling
1267 ,   retrobill_request_id       NUMBER
1268 ,   original_list_price        NUMBER
1269 ,   commitment_applied_amount  NUMBER
1270 ,   ship_to_party_number        varchar2(30)
1271 ,   invoice_to_party_number        varchar2(30)
1272 ,   deliver_to_party_number        varchar2(30)
1273 --Key Transaction Dates
1274 ,   order_firmed_date         DATE
1275 ,   actual_fulfillment_date   DATE
1276 ,   changed_lines_pocao       Varchar2(1)
1277 
1278 -- For recurring charges
1279 ,   charge_periodicity_code     VARCHAR2(3)
1280 --INVCONV
1281 , reserved_quantity2 					NUMBER
1282 -- Customer Acceptance
1283 , CONTINGENCY_ID               NUMBER
1284 , REVREC_EVENT_CODE            VARCHAR2(30)
1285 , REVREC_EXPIRATION_DAYS       NUMBER
1286 , ACCEPTED_QUANTITY            NUMBER
1287 , ACCEPTED_BY                  NUMBER
1288 , REVREC_COMMENTS              VARCHAR2(2000)
1289 , REVREC_REFERENCE_DOCUMENT    VARCHAR2(240)
1290 , REVREC_SIGNATURE             VARCHAR2(240)
1291 , REVREC_SIGNATURE_DATE        DATE
1292 , REVREC_IMPLICIT_FLAG         VARCHAR2(1)
1293 
1294 --ER7675548
1295 ,   sold_to_customer_ref        Varchar2(50)
1296 ,   ship_to_customer_ref        Varchar2(50)
1297 ,   invoice_to_customer_ref     Varchar2(50)
1298 ,   deliver_to_customer_ref     Varchar2(50)
1299 
1300 ,   ship_to_address_ref         Varchar2(50)
1301 ,   invoice_to_address_ref      Varchar2(50)
1302 ,   deliver_to_address_ref      Varchar2(50)
1303 
1304 
1305 ,   ship_to_contact_ref          Varchar2(50)
1306 ,   invoice_to_contact_ref       Varchar2(50)
1307 ,   deliver_to_contact_ref       Varchar2(50)
1308 --10278858
1309 ,SPLIT_REQUEST_DATE              VARCHAR2(1)
1310 ,SPLIT_SHIP_FROM                 VARCHAR2(1)
1311 ,SPLIT_SHIP_TO                   VARCHAR2(1)
1312 
1313 -- For O2C/DOO Integration purpose
1314 ,bypass_sch_flag                 varchar2(1)
1315 ,pre_exploded_flag               varchar2(1)
1316 -- sol_ord_er #16014165
1317 , service_bill_option_code varchar2(10)
1318 , service_bill_profile_id  NUMBER
1319 , service_cov_template_id NUMBER
1320 , service_subs_template_id NUMBER
1321 , subscription_enable_flag VARCHAR2(1)
1322 , service_first_period_amount NUMBER
1323 , service_first_period_enddate DATE
1324 , fulfillment_base            VARCHAR2(1)  --ER#14763609
1325 );
1326 
1327 TYPE Line_Tbl_Type IS TABLE OF Line_Rec_Type
1328     INDEX BY BINARY_INTEGER;
1329 
1330 --  Line value record type
1331 
1332 TYPE Line_Val_Rec_Type IS RECORD
1333 (   accounting_rule               VARCHAR2(240)
1334 ,   agreement                     VARCHAR2(240)
1335 ,   commitment                    VARCHAR2(240)
1336 ,   commitment_applied_amount     NUMBER
1337 ,   deliver_to_address1           VARCHAR2(240)
1338 ,   deliver_to_address2           VARCHAR2(240)
1339 ,   deliver_to_address3           VARCHAR2(240)
1340 ,   deliver_to_address4           VARCHAR2(240)
1341 ,   deliver_to_contact            VARCHAR2(360)
1342 ,   deliver_to_location           VARCHAR2(240)
1343 ,   deliver_to_org                VARCHAR2(240)
1344 ,   deliver_to_state              VARCHAR2(240)
1345 ,   deliver_to_city               VARCHAR2(240)
1346 ,   deliver_to_zip                VARCHAR2(240)
1347 ,   deliver_to_country            VARCHAR2(240)
1348 ,   deliver_to_county             VARCHAR2(240)
1349 ,   deliver_to_province           VARCHAR2(240)
1350 ,   demand_class                  VARCHAR2(240)
1351 ,   demand_bucket_type            VARCHAR2(240)
1352 ,   fob_point                     VARCHAR2(240)
1353 ,   freight_terms                 VARCHAR2(240)
1354 ,   inventory_item                VARCHAR2(240)
1355 ,   invoice_to_address1           VARCHAR2(240)
1356 ,   invoice_to_address2           VARCHAR2(240)
1357 ,   invoice_to_address3           VARCHAR2(240)
1358 ,   invoice_to_address4           VARCHAR2(240)
1359 ,   invoice_to_contact            VARCHAR2(360)
1360 ,   invoice_to_location           VARCHAR2(240)
1361 ,   invoice_to_org                VARCHAR2(240)
1362 ,   invoice_to_state              VARCHAR2(240)
1363 ,   invoice_to_city               VARCHAR2(240)
1364 ,   invoice_to_zip                VARCHAR2(240)
1365 ,   invoice_to_country            VARCHAR2(240)
1366 ,   invoice_to_county             VARCHAR2(240)
1367 ,   invoice_to_province           VARCHAR2(240)
1368 ,   invoicing_rule                VARCHAR2(240)
1369 ,   item_type                     VARCHAR2(240)
1370 ,   line_type                     VARCHAR2(240)
1371 ,   over_ship_reason            VARCHAR2(240)
1372 ,   payment_term                  VARCHAR2(240)
1373 ,   price_list                    VARCHAR2(240)
1374 ,   project                       VARCHAR2(240)
1375 ,   return_reason                 VARCHAR2(240)
1376 ,   rla_schedule_type             VARCHAR2(240)
1377 ,   salesrep               VARCHAR2(240)
1378 ,   shipment_priority             VARCHAR2(240)
1379 ,   ship_from_address1            VARCHAR2(240)
1380 ,   ship_from_address2            VARCHAR2(240)
1381 ,   ship_from_address3            VARCHAR2(240)
1382 ,   ship_from_address4            VARCHAR2(240)
1383 ,   ship_from_location            VARCHAR2(240)
1384 ,   SHIP_FROM_CITY               Varchar(60)      -- Ship From Bug 2116166
1385 ,   SHIP_FROM_POSTAL_CODE        Varchar(60)
1386 ,   SHIP_FROM_COUNTRY            Varchar(60)
1387 ,   SHIP_FROM_REGION1            Varchar2(240)
1388 ,   SHIP_FROM_REGION2            Varchar2(240)
1389 ,   SHIP_FROM_REGION3            Varchar2(240)
1390 ,   ship_from_org                 VARCHAR2(240)
1391 ,   ship_to_address1              VARCHAR2(240)
1392 ,   ship_to_address2              VARCHAR2(240)
1393 ,   ship_to_address3              VARCHAR2(240)
1394 ,   ship_to_address4              VARCHAR2(240)
1395 ,   ship_to_state                 VARCHAR2(240)
1396 ,   ship_to_country               VARCHAR2(240)
1397 ,   ship_to_zip                   VARCHAR2(240)
1398 ,   ship_to_county                VARCHAR2(240)
1399 ,   ship_to_province              VARCHAR2(240)
1400 ,   ship_to_city                  VARCHAR2(240)
1401 ,   ship_to_contact               VARCHAR2(360)
1402 ,   ship_to_contact_last_name     VARCHAR2(240)
1403 ,   ship_to_contact_first_name    VARCHAR2(240)
1404 ,   ship_to_location              VARCHAR2(240)
1405 ,   ship_to_org                   VARCHAR2(240)
1406 ,   source_type                   VARCHAR2(240)
1407 ,   intermed_ship_to_address1     VARCHAR2(240)
1408 ,   intermed_ship_to_address2     VARCHAR2(240)
1409 ,   intermed_ship_to_address3     VARCHAR2(240)
1410 ,   intermed_ship_to_address4     VARCHAR2(240)
1411 ,   intermed_ship_to_contact      VARCHAR2(240)
1412 ,   intermed_ship_to_location     VARCHAR2(240)
1413 ,   intermed_ship_to_org          VARCHAR2(240)
1414 ,   intermed_ship_to_state             VARCHAR2(240)
1415 ,   intermed_ship_to_city              VARCHAR2(240)
1416 ,   intermed_ship_to_zip               VARCHAR2(240)
1417 ,   intermed_ship_to_country           VARCHAR2(240)
1418 ,   intermed_ship_to_county            VARCHAR2(240)
1419 ,   intermed_ship_to_province          VARCHAR2(240)
1420 ,   sold_to_org                   VARCHAR2(360)
1421 ,   sold_from_org                 VARCHAR2(240)
1422 ,   task                          VARCHAR2(240)
1423 ,   tax_exempt                    VARCHAR2(240)
1424 ,   tax_exempt_reason             VARCHAR2(240)
1425 ,   tax_point                     VARCHAR2(240)
1426 ,   veh_cus_item_cum_key          VARCHAR2(240)
1427 ,   visible_demand                VARCHAR2(240)
1428 ,   customer_payment_term       VARCHAR2(240)
1429 ,   ref_order_number              NUMBER
1430 ,   ref_line_number               NUMBER
1431 ,   ref_shipment_number           NUMBER
1432 ,   ref_option_number             NUMBER
1433 ,   ref_component_number          NUMBER
1434 ,   ref_invoice_number            VARCHAR2(20)
1435 ,   ref_invoice_line_number       NUMBER
1436 ,   credit_invoice_number         VARCHAR2(20)
1437 ,   tax_group                     VARCHAR2(1)
1438 ,   status                        VARCHAR2(240)
1439 ,   freight_carrier               VARCHAR2(80)
1440 ,   shipping_method               VARCHAR2(80)
1441 ,   calculate_price_descr         VARCHAR2(240)
1442 ,   ship_to_customer_name         VARCHAR2(360)
1443 ,   invoice_to_customer_name      VARCHAR2(360)
1444 ,   ship_to_customer_number       VARCHAR2(50)
1445 ,   invoice_to_customer_number    VARCHAR2(50)
1446 ,   ship_to_customer_id           NUMBER
1447 ,   invoice_to_customer_id        NUMBER
1448 ,   deliver_to_customer_id        NUMBER
1449 ,   deliver_to_customer_number    VARCHAR2(50)
1450 ,   deliver_to_customer_name      VARCHAR2(360)
1451 ,   Original_Ordered_item         VARCHAR2(2000)
1452 ,   Original_inventory_item       VARCHAR2(2000)
1453 ,   Original_item_identifier_type VARCHAR2(240)
1454 ,   deliver_to_customer_Number_oi    VARCHAR2(30)
1455 ,   deliver_to_customer_Name_oi      VARCHAR2(360)
1456 ,   ship_to_customer_Number_oi    VARCHAR2(30)
1457 ,   ship_to_customer_Name_oi      VARCHAR2(360)
1458 ,   invoice_to_customer_Number_oi    VARCHAR2(30)
1459 ,   invoice_to_customer_Name_oi      VARCHAR2(360)
1460 ,   item_relationship_type_dsp      VARCHAR2(100)
1461 -- QUOTING changes
1462 ,   transaction_phase                  VARCHAR2(240)
1463 -- END QUOTING changes
1464 -- distributed orders
1465 ,   end_customer_name                VARCHAR2(360)
1466 ,   end_customer_number              VARCHAR2(50)
1467 ,   end_customer_contact             VARCHAR2(360)
1468 ,   end_cust_contact_last_name       VARCHAR2(240)
1469 ,   end_cust_contact_first_name      VARCHAR2(240)
1470 ,   end_customer_site_address1       VARCHAR2(240)
1471 ,   end_customer_site_address2       VARCHAR2(240)
1472 ,   end_customer_site_address3       VARCHAR2(240)
1473 ,   end_customer_site_address4       VARCHAR2(240)
1474 ,   end_customer_site_location       VARCHAR2(240)
1475 ,   end_customer_site_state          VARCHAR2(240)
1476 ,   end_customer_site_country        VARCHAR2(240)
1477 ,   end_customer_site_zip            VARCHAR2(240)
1478 ,   end_customer_site_county         VARCHAR2(240)
1479 ,   end_customer_site_province       VARCHAR2(240)
1480 ,   end_customer_site_city           VARCHAR2(240)
1481 ,   end_customer_site_postal_code    VARCHAR2(240)
1482 -- distributed orders
1483 ,   blanket_agreement_name           VARCHAR2(360)
1484 ,   ib_owner_dsp                     VARCHAR2(60)
1485 ,   ib_current_location_dsp          VARCHAR2(60)
1486 ,   ib_installed_at_location_dsp     VARCHAR2(60)
1487 ,   service_period_dsp               VARCHAR2(240)
1488 ,   service_reference_type           VARCHAR2(240)  --Bug 5701246
1489 -- for recurring charges
1490 ,   charge_periodicity_dsp           VARCHAR2(25)
1491 -- Customer Acceptance
1492 ,CONTINGENCY_NAME	             VARCHAR2(240)
1493 ,CONTINGENCY_DESCRIPTION	     VARCHAR2(240)
1494 ,EXPIRATION_EVENT_ATTRIBUTE	     VARCHAR2(240)
1495 ,REVREC_EVENT                        VARCHAR2(240)
1496 ,ACCEPTED_BY_DSP                     VARCHAR2(100)
1497 --sol_ord_er #16014165
1498 , service_bill_option varchar2(100)
1499 , service_bill_profile varchar2(240)
1500 , service_cov_template varchar2(240)
1501 , service_subs_template varchar2(240)
1502 );
1503 
1504 TYPE Line_Val_Tbl_Type IS TABLE OF Line_Val_Rec_Type
1505     INDEX BY BINARY_INTEGER;
1506 
1507 --  Line_Adj record type
1508 
1509 TYPE Line_Adj_Rec_Type IS RECORD
1510 (   attribute1                    VARCHAR2(240)
1511 ,   attribute10                   VARCHAR2(240)
1512 ,   attribute11                   VARCHAR2(240)
1513 ,   attribute12                   VARCHAR2(240)
1514 ,   attribute13                   VARCHAR2(240)
1515 ,   attribute14                   VARCHAR2(240)
1516 ,   attribute15                   VARCHAR2(240)
1517 ,   attribute2                    VARCHAR2(240)
1518 ,   attribute3                    VARCHAR2(240)
1519 ,   attribute4                    VARCHAR2(240)
1520 ,   attribute5                    VARCHAR2(240)
1521 ,   attribute6                    VARCHAR2(240)
1522 ,   attribute7                    VARCHAR2(240)
1523 ,   attribute8                    VARCHAR2(240)
1524 ,   attribute9                    VARCHAR2(240)
1525 ,   automatic_flag                VARCHAR2(1)
1526 ,   context                       VARCHAR2(30)
1527 ,   created_by                    NUMBER
1528 ,   creation_date                 DATE
1529 ,   discount_id                   NUMBER
1530 ,   discount_line_id              NUMBER
1531 ,   header_id                     NUMBER
1532 ,   last_updated_by               NUMBER
1533 ,   last_update_date              DATE
1534 ,   last_update_login             NUMBER
1535 ,   line_id                       NUMBER
1536 ,   percent                       NUMBER
1537 ,   price_adjustment_id           NUMBER
1538 ,   program_application_id        NUMBER
1539 ,   program_id                    NUMBER
1540 ,   program_update_date           DATE
1541 ,   request_id                    NUMBER
1542 ,   return_status                 VARCHAR2(1)
1543 ,   db_flag                       VARCHAR2(1)
1544 ,   operation                     VARCHAR2(30)
1545 ,   line_index                    NUMBER
1546 ,   orig_sys_discount_ref         VARCHAR2(50)
1547 ,   change_request_code	  	    VARCHAR2(30)
1548 ,   status_flag		  	    VARCHAR2(1)
1549 ,   list_header_id                NUMBER
1550 ,   list_line_id                  NUMBER
1551 ,   list_line_type_code           VARCHAR2(30)
1552 ,   modifier_mechanism_type_code  VARCHAR2(30)
1553 ,   modified_from                 VARCHAR2(240)
1554 ,   modified_to                   VARCHAR2(240)
1555 ,   updated_flag                  VARCHAR2(1)
1556 ,   update_allowed                VARCHAR2(1)
1557 ,   applied_flag                  VARCHAR2(1)
1558 ,   change_reason_code            VARCHAR2(30)
1559 ,   change_reason_text            VARCHAR2(2000)
1560 ,   operand                       NUMBER
1561 ,   operand_per_pqty              NUMBER
1562 ,   arithmetic_operator           VARCHAR2(30)
1563 ,   cost_id                       NUMBER
1564 ,   tax_code                      VARCHAR2(50)
1565 ,   tax_exempt_flag               VARCHAR2(1)
1566 ,   tax_exempt_number             VARCHAR2(80)
1567 ,   tax_exempt_reason_code        VARCHAR2(30)
1568 ,   parent_adjustment_id          NUMBER
1569 ,   invoiced_flag                 VARCHAR2(1)
1570 ,   estimated_flag                VARCHAR2(1)
1571 ,   inc_in_sales_performance      VARCHAR2(1)
1572 ,   split_action_code             VARCHAR2(30)
1573 ,   adjusted_amount			    NUMBER
1574 ,   adjusted_amount_per_pqty                NUMBER
1575 ,   pricing_phase_id		    NUMBER
1576 ,   charge_type_code              VARCHAR2(30)
1577 ,   charge_subtype_code           VARCHAR2(30)
1578 ,   list_line_no                  varchar2(240)
1579 ,   source_system_code            varchar2(30)
1580 ,   benefit_qty                   number
1581 ,   benefit_uom_code              varchar2(3)
1582 ,   print_on_invoice_flag         varchar2(1)
1583 ,   expiration_date               date
1584 ,   rebate_transaction_type_code  varchar2(30)
1585 ,   rebate_transaction_reference  varchar2(80)
1586 ,   rebate_payment_system_code    varchar2(30)
1587 ,   redeemed_date                 date
1588 ,   redeemed_flag                 varchar2(1)
1589 ,   accrual_flag                 varchar2(1)
1590 ,   range_break_quantity			number
1591 ,   accrual_conversion_rate		number
1592 ,   pricing_group_sequence		number
1593 ,   modifier_level_code			varchar2(30)
1594 ,   price_break_type_code		varchar2(30)
1595 ,   substitution_attribute		varchar2(30)
1596 ,   proration_type_code			varchar2(30)
1597 ,   credit_or_charge_flag          varchar2(1)
1598 ,   include_on_returns_flag        varchar2(1)
1599 ,   ac_attribute1                  VARCHAR2(240)
1600 ,   ac_attribute10                 VARCHAR2(240)
1601 ,   ac_attribute11                 VARCHAR2(240)
1602 ,   ac_attribute12                 VARCHAR2(240)
1603 ,   ac_attribute13                 VARCHAR2(240)
1604 ,   ac_attribute14                 VARCHAR2(240)
1605 ,   ac_attribute15                 VARCHAR2(240)
1606 ,   ac_attribute2                  VARCHAR2(240)
1607 ,   ac_attribute3                  VARCHAR2(240)
1608 ,   ac_attribute4                  VARCHAR2(240)
1609 ,   ac_attribute5                  VARCHAR2(240)
1610 ,   ac_attribute6                  VARCHAR2(240)
1611 ,   ac_attribute7                  VARCHAR2(240)
1612 ,   ac_attribute8                  VARCHAR2(240)
1613 ,   ac_attribute9                  VARCHAR2(240)
1614 ,   ac_context                     VARCHAR2(150)
1615 ,   lock_control                   NUMBER
1616 ,   group_value                    NUMBER
1617 ,   invoiced_amount                NUMBER
1618 -- retrobilling
1619 ,   retrobill_request_id       NUMBER
1620 -- eBTax changes
1621 ,  tax_rate_id                     NUMBER
1622 );
1623 
1624 TYPE Line_Adj_Tbl_Type IS TABLE OF Line_Adj_Rec_Type
1625     INDEX BY BINARY_INTEGER;
1626 
1627 --  Line_Adj value record type
1628 
1629 TYPE Line_Adj_Val_Rec_Type IS RECORD
1630 (   discount               VARCHAR2(240)
1631 ,   List_name              VARCHAR2(240)
1632 ,   version_no             VARCHAR2(30)
1633 );
1634 
1635 TYPE Line_Adj_Val_Tbl_Type IS TABLE OF Line_Adj_Val_Rec_Type
1636     INDEX BY BINARY_INTEGER;
1637 
1638 -- Line_Price_Att_Rec_Type
1639 
1640 TYPE Line_Price_Att_Rec_Type IS RECORD
1641 (   order_price_attrib_id 	number
1642 ,   header_id				number
1643 ,   line_id				number
1644 ,   line_index				number
1645 ,   creation_date			date
1646 ,   created_by				number
1647 ,   last_update_date		date
1648 ,   last_updated_by			number
1649 ,   last_update_login		number
1650 ,   program_application_id	number
1651 ,   program_id				number
1652 ,   program_update_date		date
1653 ,   request_id				number
1654 ,   flex_title				varchar2(60)
1655 ,   pricing_context			varchar2(30)
1656 ,   pricing_attribute1		varchar2(240)
1657 ,   pricing_attribute2		varchar2(240)
1658 ,   pricing_attribute3		varchar2(240)
1659 ,   pricing_attribute4		varchar2(240)
1660 ,   pricing_attribute5		varchar2(240)
1661 ,   pricing_attribute6		varchar2(240)
1662 ,   pricing_attribute7		varchar2(240)
1663 ,   pricing_attribute8		varchar2(240)
1664 ,   pricing_attribute9		varchar2(240)
1665 ,   pricing_attribute10		varchar2(240)
1666 ,   pricing_attribute11		varchar2(240)
1667 ,   pricing_attribute12		varchar2(240)
1668 ,   pricing_attribute13		varchar2(240)
1669 ,   pricing_attribute14		varchar2(240)
1670 ,   pricing_attribute15		varchar2(240)
1671 ,   pricing_attribute16		varchar2(240)
1672 ,   pricing_attribute17		varchar2(240)
1673 ,   pricing_attribute18		varchar2(240)
1674 ,   pricing_attribute19		varchar2(240)
1675 ,   pricing_attribute20		varchar2(240)
1676 ,   pricing_attribute21		varchar2(240)
1677 ,   pricing_attribute22		varchar2(240)
1678 ,   pricing_attribute23		varchar2(240)
1679 ,   pricing_attribute24		varchar2(240)
1680 ,   pricing_attribute25		varchar2(240)
1681 ,   pricing_attribute26		varchar2(240)
1682 ,   pricing_attribute27		varchar2(240)
1683 ,   pricing_attribute28		varchar2(240)
1684 ,   pricing_attribute29		varchar2(240)
1685 ,   pricing_attribute30		varchar2(240)
1686 ,   pricing_attribute31		varchar2(240)
1687 ,   pricing_attribute32		varchar2(240)
1688 ,   pricing_attribute33		varchar2(240)
1689 ,   pricing_attribute34		varchar2(240)
1690 ,   pricing_attribute35		varchar2(240)
1691 ,   pricing_attribute36		varchar2(240)
1692 ,   pricing_attribute37		varchar2(240)
1693 ,   pricing_attribute38		varchar2(240)
1694 ,   pricing_attribute39		varchar2(240)
1695 ,   pricing_attribute40		varchar2(240)
1696 ,   pricing_attribute41		varchar2(240)
1697 ,   pricing_attribute42		varchar2(240)
1698 ,   pricing_attribute43		varchar2(240)
1699 ,   pricing_attribute44		varchar2(240)
1700 ,   pricing_attribute45		varchar2(240)
1701 ,   pricing_attribute46		varchar2(240)
1702 ,   pricing_attribute47		varchar2(240)
1703 ,   pricing_attribute48		varchar2(240)
1704 ,   pricing_attribute49		varchar2(240)
1705 ,   pricing_attribute50		varchar2(240)
1706 ,   pricing_attribute51		varchar2(240)
1707 ,   pricing_attribute52		varchar2(240)
1708 ,   pricing_attribute53		varchar2(240)
1709 ,   pricing_attribute54		varchar2(240)
1710 ,   pricing_attribute55		varchar2(240)
1711 ,   pricing_attribute56		varchar2(240)
1712 ,   pricing_attribute57		varchar2(240)
1713 ,   pricing_attribute58		varchar2(240)
1714 ,   pricing_attribute59		varchar2(240)
1715 ,   pricing_attribute60		varchar2(240)
1716 ,   pricing_attribute61		varchar2(240)
1717 ,   pricing_attribute62		varchar2(240)
1718 ,   pricing_attribute63		varchar2(240)
1719 ,   pricing_attribute64		varchar2(240)
1720 ,   pricing_attribute65		varchar2(240)
1721 ,   pricing_attribute66		varchar2(240)
1722 ,   pricing_attribute67		varchar2(240)
1723 ,   pricing_attribute68		varchar2(240)
1724 ,   pricing_attribute69		varchar2(240)
1725 ,   pricing_attribute70		varchar2(240)
1726 ,   pricing_attribute71		varchar2(240)
1727 ,   pricing_attribute72		varchar2(240)
1728 ,   pricing_attribute73		varchar2(240)
1729 ,   pricing_attribute74		varchar2(240)
1730 ,   pricing_attribute75		varchar2(240)
1731 ,   pricing_attribute76		varchar2(240)
1732 ,   pricing_attribute77		varchar2(240)
1733 ,   pricing_attribute78		varchar2(240)
1734 ,   pricing_attribute79		varchar2(240)
1735 ,   pricing_attribute80		varchar2(240)
1736 ,   pricing_attribute81		varchar2(240)
1737 ,   pricing_attribute82		varchar2(240)
1738 ,   pricing_attribute83		varchar2(240)
1739 ,   pricing_attribute84		varchar2(240)
1740 ,   pricing_attribute85		varchar2(240)
1741 ,   pricing_attribute86		varchar2(240)
1742 ,   pricing_attribute87		varchar2(240)
1743 ,   pricing_attribute88		varchar2(240)
1744 ,   pricing_attribute89		varchar2(240)
1745 ,   pricing_attribute90		varchar2(240)
1746 ,   pricing_attribute91		varchar2(240)
1747 ,   pricing_attribute92		varchar2(240)
1748 ,   pricing_attribute93		varchar2(240)
1749 ,   pricing_attribute94		varchar2(240)
1750 ,   pricing_attribute95		varchar2(240)
1751 ,   pricing_attribute96		varchar2(240)
1752 ,   pricing_attribute97		varchar2(240)
1753 ,   pricing_attribute98		varchar2(240)
1754 ,   pricing_attribute99		varchar2(240)
1755 ,   pricing_attribute100		varchar2(240)
1756 ,   context 				varchar2(30)
1757 ,   attribute1				varchar2(240)
1758 ,   attribute2				varchar2(240)
1759 ,   attribute3				varchar2(240)
1760 ,   attribute4				varchar2(240)
1761 ,   attribute5				varchar2(240)
1762 ,   attribute6				varchar2(240)
1763 ,   attribute7				varchar2(240)
1764 ,   attribute8				varchar2(240)
1765 ,   attribute9				varchar2(240)
1766 ,   attribute10			varchar2(240)
1767 ,   attribute11			varchar2(240)
1768 ,   attribute12			varchar2(240)
1769 ,   attribute13			varchar2(240)
1770 ,   attribute14			varchar2(240)
1771 ,   attribute15			varchar2(240)
1772 ,   Override_Flag		varchar2(1)
1773 ,   return_status            	VARCHAR2(1)
1774 ,   db_flag                  	VARCHAR2(1)
1775 ,   operation                	VARCHAR2(30)
1776 ,   lock_control                NUMBER
1777 ,   orig_sys_atts_ref       VARCHAR2(50) -- 1433292
1778 ,   change_request_code     VARCHAR2(30)
1779 );
1780 
1781 TYPE  Line_Price_Att_Tbl_Type is TABLE of Line_Price_Att_rec_Type
1782 	INDEX by BINARY_INTEGER;
1783 
1784 	-- Line_Adj_Att_Rec_Type
1785 
1786 Type Line_Adj_Att_Rec_Type is RECORD
1787 (   price_adj_attrib_id      	number
1788 ,   price_adjustment_id      	number
1789 ,   Adj_index				number
1790 ,   flex_title             	varchar2(60)
1791 ,   pricing_context        	varchar2(30)
1792 ,   pricing_attribute      	varchar2(30)
1793 ,   creation_date          	date
1794 ,   created_by             	number
1795 ,   last_update_date       	date
1796 ,   last_updated_by        	number
1797 ,   last_update_login      	number
1798 ,   program_application_id 	number
1799 ,   program_id             	number
1800 ,   program_update_date    	date
1801 ,   request_id             	number
1802 ,   pricing_attr_value_from 	varchar2(240)
1803 ,   pricing_attr_value_to  	varchar2(240)
1804 ,   comparison_operator     	varchar2(30)
1805 ,   return_status            	VARCHAR2(1)
1806 ,   db_flag                  	VARCHAR2(1)
1807 ,   operation                	VARCHAR2(30)
1808 ,   lock_control                NUMBER
1809 );
1810 
1811 
1812 TYPE  Line_Adj_Att_Tbl_Type is TABLE of Line_Adj_Att_rec_Type
1813 	INDEX by BINARY_INTEGER;
1814 
1815 -- Line_Adj_Assoc_Rec_Type
1816 
1817 Type Line_Adj_Assoc_Rec_Type  is RECORD
1818 ( price_adj_assoc_id          number
1819 , line_id                	number
1820 , Line_index				number
1821 , price_adjustment_id    	number
1822 , Adj_index				number
1823 , rltd_Price_Adj_Id      	number
1824 , Rltd_Adj_Index         	NUMBER
1825 , creation_date          	date
1826 , created_by             	number
1827 , last_update_date       	date
1828 , last_updated_by        	number
1829 , last_update_login      	number
1830 , program_application_id 	number
1831 , program_id             	number
1832 , program_update_date    	date
1833 , request_id             	number
1834 , return_status            	VARCHAR2(1)
1835 , db_flag                  	VARCHAR2(1)
1836 , operation                	VARCHAR2(30)
1837 , lock_control                  NUMBER);
1838 
1839 
1840 TYPE  Line_Adj_Assoc_Tbl_Type is TABLE of Line_Adj_Assoc_rec_Type
1841 	INDEX by BINARY_INTEGER;
1842 
1843 --  Line_Scredit record type
1844 
1845 TYPE Line_Scredit_Rec_Type IS RECORD
1846 (   attribute1                    VARCHAR2(240)
1847 ,   attribute10                   VARCHAR2(240)
1848 ,   attribute11                   VARCHAR2(240)
1849 ,   attribute12                   VARCHAR2(240)
1850 ,   attribute13                   VARCHAR2(240)
1851 ,   attribute14                   VARCHAR2(240)
1852 ,   attribute15                   VARCHAR2(240)
1853 ,   attribute2                    VARCHAR2(240)
1854 ,   attribute3                    VARCHAR2(240)
1855 ,   attribute4                    VARCHAR2(240)
1856 ,   attribute5                    VARCHAR2(240)
1857 ,   attribute6                    VARCHAR2(240)
1858 ,   attribute7                    VARCHAR2(240)
1859 ,   attribute8                    VARCHAR2(240)
1860 ,   attribute9                    VARCHAR2(240)
1861 ,   context                       VARCHAR2(30)
1862 ,   created_by                    NUMBER
1863 ,   creation_date                 DATE
1864 ,   dw_update_advice_flag         VARCHAR2(1)
1865 ,   header_id                     NUMBER
1866 ,   last_updated_by               NUMBER
1867 ,   last_update_date              DATE
1868 ,   last_update_login             NUMBER
1869 ,   line_id                       NUMBER
1870 ,   percent                       NUMBER
1871 ,   salesrep_id                   NUMBER
1872 ,   sales_credit_id               NUMBER
1873 ,   sales_credit_type_id          NUMBER
1874 ,   wh_update_date                DATE
1875 ,   return_status                 VARCHAR2(1)
1876 ,   db_flag                       VARCHAR2(1)
1877 ,   operation                     VARCHAR2(30)
1878 ,   line_index                    NUMBER
1879 ,   orig_sys_credit_ref           VARCHAR2(50)
1880 ,   change_request_code	  	  VARCHAR2(30)
1881 ,   status_flag		  	  VARCHAR2(1)
1882 ,   lock_control                  NUMBER
1883 ,   change_reason                 VARCHAR2(30)
1884 ,   change_comments               VARCHAR2(2000)
1885 --SG{
1886 ,sales_group_id                   NUMBER
1887 ,sales_group_updated_flag         VARCHAR2(1)
1888 --SG}
1889 );
1890 
1891 TYPE Line_Scredit_Tbl_Type IS TABLE OF Line_Scredit_Rec_Type
1892     INDEX BY BINARY_INTEGER;
1893 
1894 --  Line_Scredit value record type
1895 
1896 TYPE Line_Scredit_Val_Rec_Type IS RECORD
1897 (   salesrep                      VARCHAR2(240)
1898    , sales_credit_type              VARCHAR2(240)
1899  --SG{
1900  ,sales_group VARCHAR2(240)
1901  --SG }
1902 );
1903 
1904 TYPE Line_Scredit_Val_Tbl_Type IS TABLE OF Line_Scredit_Val_Rec_Type
1905     INDEX BY BINARY_INTEGER;
1906 
1907 --  Lot_Serial record type
1908 
1909 TYPE Lot_Serial_Rec_Type IS RECORD
1910 (   attribute1                    VARCHAR2(240)
1911 ,   attribute10                   VARCHAR2(240)
1912 ,   attribute11                   VARCHAR2(240)
1913 ,   attribute12                   VARCHAR2(240)
1914 ,   attribute13                   VARCHAR2(240)
1915 ,   attribute14                   VARCHAR2(240)
1916 ,   attribute15                   VARCHAR2(240)
1917 ,   attribute2                    VARCHAR2(240)
1918 ,   attribute3                    VARCHAR2(240)
1919 ,   attribute4                    VARCHAR2(240)
1920 ,   attribute5                    VARCHAR2(240)
1921 ,   attribute6                    VARCHAR2(240)
1922 ,   attribute7                    VARCHAR2(240)
1923 ,   attribute8                    VARCHAR2(240)
1924 ,   attribute9                    VARCHAR2(240)
1925 ,   context                       VARCHAR2(30)
1926 ,   created_by                    NUMBER
1927 ,   creation_date                 DATE
1928 ,   from_serial_number            VARCHAR2(30)
1929 ,   last_updated_by               NUMBER
1930 ,   last_update_date              DATE
1931 ,   last_update_login             NUMBER
1932 ,   line_id                       NUMBER
1933 ,   lot_number                    VARCHAR2(80)  -- INVCONV  extedn to 80
1934 ,   sublot_number                 VARCHAR2(30)  --OPM 2380194 INVCONV delete
1935 --  sublot_number RE-ADDED DUE TO problem in bug 4537505. later on this column needs to be taken out and the rosetta
1936 -- package OE_ORDER_PUB_W regenerated
1937 
1938 ,   lot_serial_id                 NUMBER
1939 ,   quantity                      NUMBER
1940 ,   quantity2                     NUMBER         --OPM 2380194
1941 ,   to_serial_number              VARCHAR2(30)
1942 ,   return_status                 VARCHAR2(1)
1943 ,   db_flag                       VARCHAR2(1)
1944 ,   operation                     VARCHAR2(30)
1945 ,   line_index                    NUMBER
1946 ,   orig_sys_lotserial_ref        VARCHAR2(50)
1947 ,   change_request_code	  	  VARCHAR2(30)
1948 ,   status_flag		  	  VARCHAR2(1)
1949 ,   line_set_id                   NUMBER
1950 ,   lock_control                  NUMBER);
1951 
1952 TYPE Lot_Serial_Tbl_Type IS TABLE OF Lot_Serial_Rec_Type
1953     INDEX BY BINARY_INTEGER;
1954 
1955 --  Lot_Serial value record type
1956 
1957 TYPE Lot_Serial_Val_Rec_Type IS RECORD
1958 (   line                          VARCHAR2(240)
1959 ,   lot_serial                    VARCHAR2(240)
1960 );
1961 
1962 TYPE Lot_Serial_Val_Tbl_Type IS TABLE OF Lot_Serial_Val_Rec_Type
1963     INDEX BY BINARY_INTEGER;
1964 
1965 
1966 
1967 --  Line Reservation record type
1968 
1969 TYPE Reservation_Rec_Type IS RECORD
1970 (   orig_sys_reservation_ref      VARCHAR2(50)   := FND_API.G_MISS_CHAR
1971 ,   revision                 	  VARCHAR2(3)	 := FND_API.G_MISS_CHAR
1972 ,   lot_number_id		  NUMBER	 := FND_API.G_MISS_NUM
1973 ,   subinventory_id		  NUMBER	 := FND_API.G_MISS_NUM
1974 ,   locator_id			  NUMBER	 := FND_API.G_MISS_NUM
1975 ,   quantity                      NUMBER         := FND_API.G_MISS_NUM
1976 ,   attribute_category            VARCHAR2(30)   := FND_API.G_MISS_CHAR
1977 ,   attribute1                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1978 ,   attribute2                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1979 ,   attribute3                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1980 ,   attribute4                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1981 ,   attribute5                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1982 ,   attribute6                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1983 ,   attribute7                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1984 ,   attribute8                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1985 ,   attribute9                    VARCHAR2(240)  := FND_API.G_MISS_CHAR
1986 ,   attribute10                   VARCHAR2(240)  := FND_API.G_MISS_CHAR
1987 ,   attribute11                   VARCHAR2(240)  := FND_API.G_MISS_CHAR
1988 ,   attribute12                   VARCHAR2(240)  := FND_API.G_MISS_CHAR
1989 ,   attribute13                   VARCHAR2(240)  := FND_API.G_MISS_CHAR
1990 ,   attribute14                   VARCHAR2(240)  := FND_API.G_MISS_CHAR
1991 ,   attribute15                   VARCHAR2(240)  := FND_API.G_MISS_CHAR
1992 ,   operation                     VARCHAR2(30)   := FND_API.G_MISS_CHAR
1993 ,   status_flag		  	  VARCHAR2(1)    := FND_API.G_MISS_CHAR
1994 ,   return_status                 VARCHAR2(1)    := FND_API.G_MISS_CHAR
1995 ,   line_index                    NUMBER         := FND_API.G_MISS_NUM
1996 ,   quantity2                      NUMBER         := FND_API.G_MISS_NUM -- INVCONV
1997 );
1998 
1999 TYPE Reservation_Tbl_Type IS TABLE OF Reservation_Rec_Type
2000     INDEX BY BINARY_INTEGER;
2001 
2002 --  Line Reservation value record type
2003 
2004 TYPE Reservation_Val_Rec_Type IS RECORD
2005 (   lot_number			  VARCHAR2(30)	 := FND_API.G_MISS_CHAR
2006 ,   subinventory_code		  VARCHAR2(10)	 := FND_API.G_MISS_CHAR
2007 );
2008 
2009 TYPE Reservation_Val_Tbl_Type IS TABLE OF Reservation_Val_Rec_Type
2010     INDEX BY BINARY_INTEGER;
2011 
2012 
2013 -- Set Records
2014 
2015 TYPE Set_Rec_Type IS RECORD
2016 (SET_ID  		NUMBER         := FND_API.G_MISS_NUM
2017  ,SET_NAME 		VARCHAR2(30)   := FND_API.G_MISS_CHAR
2018  ,SET_TYPE 		VARCHAR2(30)   := FND_API.G_MISS_CHAR
2019  ,SET_DATE		DATE	       := FND_API.G_MISS_DATE
2020  ,SET_LOCATION		NUMBER         := FND_API.G_MISS_NUM
2021  ,COMPLETE_FLAG 	VARCHAR2(30)   := FND_API.G_MISS_CHAR
2022  ,SYSTEM_REQUIRED_FLAG 	VARCHAR2(1)    := FND_API.G_MISS_CHAR
2023 );
2024 
2025 -- Line Set Record
2026 
2027 TYPE Line_Set_Rec_Type IS RECORD
2028 (SET_ID  		NUMBER         := FND_API.G_MISS_NUM
2029  ,LINE_ID  		NUMBER         := FND_API.G_MISS_NUM
2030 );
2031 
2032 
2033 --  API request record type.
2034 
2035 --Kris, entity code could be null for order level stuff, then it would really be
2036 --an entity code being passed rather than a combination.  (use the entity codes already defined)
2037 --
2038 TYPE Request_Rec_Type IS RECORD
2039   (
2040    -- Object for which the delayed request has been logged
2041    -- ie LINE, ORDER, PRICE_ADJUSTMENT
2042    Entity_code         Varchar2(30):= NULL,
2043 
2044    -- Primary key for the object as in entity_code
2045    Entity_id          Number := NULL,
2046    Entity_index	      Number := NULL,
2047    -- Function / Procedure indentifier ie 'PRICE_LINE'
2048    -- 'RECORD_HISTORY'
2049    request_type       Varchar2(30) := NULL,
2050 
2051    return_status	VARCHAR2(1)    := FND_API.G_MISS_CHAR,
2052 
2053    -- Keys to identify a unique request.
2054    request_unique_key1	VARCHAR2(30) := NULL,
2055    request_unique_key2  VARCHAR2(30) := NULL,
2056    request_unique_key3  VARCHAR2(30) := NULL,
2057    request_unique_key4  VARCHAR2(30) := NULL,
2058    request_unique_key5  VARCHAR2(30) := NULL,
2059 
2060    -- Parameters (param - param10) for the delayed request
2061    param1             Varchar2(2000) := NULL,
2062    param2             Varchar2(240) := NULL,
2063    param3             Varchar2(240) := NULL,
2064    param4             Varchar2(2000) := NULL,  -- 4495205
2065    param5             Varchar2(240) := NULL,
2066    param6             Varchar2(240) := NULL,
2067    param7             Varchar2(240) := NULL,
2068    param8             Varchar2(240) := NULL,
2069    param9             Varchar2(240) := NULL,
2070    param10            Varchar2(240) := NULL,
2071    param11            Varchar2(240) := NULL,
2072    param12            Varchar2(240) := NULL,
2073    param13            Varchar2(240) := NULL,
2074    param14            Varchar2(240) := NULL,
2075    param15            Varchar2(240) := NULL,
2076    param16            Varchar2(240) := NULL,
2077    param17            Varchar2(240) := NULL,
2078    param18            Varchar2(240) := NULL,
2079    param19            Varchar2(240) := NULL,
2080    param20            Varchar2(240) := NULL,
2081    param21            Varchar2(240) := NULL,
2082    param22            Varchar2(240) := NULL,
2083    param23            Varchar2(240) := NULL,
2084    param24            Varchar2(240) := NULL,
2085    param25            Varchar2(240) := NULL,
2086    long_param1        Varchar2(2000) := NULL,
2087    date_param1		  DATE := NULL,
2088    date_param2		  DATE := NULL,
2089    date_param3		  DATE := NULL,
2090    date_param4		  DATE := NULL,
2091    date_param5		  DATE := NULL,
2092    date_param6		  DATE := NULL,
2093    date_param7		  DATE := NULL,
2094    date_param8		  DATE := NULL,
2095    processed		  VARCHAR2(1)	:= 'N'
2096 );
2097 
2098 --  API Request table type.
2099 
2100 TYPE Request_Tbl_Type IS TABLE OF Request_Rec_Type
2101     INDEX BY BINARY_INTEGER;
2102 
2103 -- Record to store the entity that is logging the request. Is used
2104 -- in deleting delayed requests logged by an entity that is being
2105 -- cleared or deleted.
2106 TYPE Requesting_Entity_Rec_Type IS RECORD
2107   (
2108    -- Object which is logging the delayed request
2109    -- ie LINE, ORDER, PRICE_ADJUSTMENT
2110    Entity_code         Varchar2(30):= NULL,
2111    -- Primary key for the entity e.g. header_id, line_id.
2112    Entity_id          Number := NULL,
2113    -- Index of the request being logged in the request table
2114    request_index	NUMBER := NULL
2115 );
2116 
2117 --  API Requesting entity table type.
2118 TYPE Requesting_Entity_Tbl_Type IS TABLE OF Requesting_Entity_Rec_Type
2119     INDEX BY BINARY_INTEGER;
2120 
2121 /* Name     Cancel_Line_Rec_Type
2122 ** Purpose  Submit a Cancelaltion Request.
2123 */
2124 TYPE Cancel_Line_Rec_Type IS RECORD
2125 (
2126 Line_Id                        Number := Null
2127 ,Header_id                     Number := Null
2128 ,Cancellation_type              VARCHAR2(1) := OE_GLOBALS.G_FULL
2129     -- G_FULL for Completely Cancelling the line
2130     -- G_PARTAIL Partially cancelling the line
2131 , Cancel_by_quantity            NUMBER   := FND_API.G_MISS_NUM
2132                 -- Cancellation quantity for Partial Cancellation
2133 , Cancellation_reason_code       VARCHAR2(30) := NULL
2134                 -- Cancellation Reason
2135 , Cancellation_comments          VARCHAR2(2000) := NULL
2136                 -- Cancellation comments
2137 , Security_result               VARCHAR2(30) := ''
2138                 -- Security Result BLOCK : Processing constraints
2139                 --                 REQUIRE_REASON   : The changes require
2140                                    -- Reason and comments to be specified
2141                 --                 REQUIRE_HISTORY   : The changes require
2142                                    -- History to be recorded
2143 , Business_object               VARCHAR2(30) := 'SALES_ORDER'
2144 , Wf_item_type                  VARCHAR2(30) := 'OEOL'
2145 , User_app_id                   NUMBER   := 300
2146                 -- User requesting cancellation
2147 , User_resp_id                  NUMBER   := FND_API.G_MISS_NUM
2148                 -- Responbisilbity requesting cancellation
2149 , Cancellation_result            VARCHAR2(10) := NULL
2150             -- OE_GLOBALS.G_CANCELED  cancelled sucessfully
2151             -- OE_GLOBALS.G_CANNOT_CANCEL could not cancel
2152             -- OE_GLOBALS.G_NOTIFIED cancellation requires approval and a
2153             -- a notification has been send out NOCOPY /* file.sql.39 change */
2154 , Wf_cancellation              Varchar2(1) := 'N'
2155                 -- Flag indicating if the cancellation is in response to
2156                 -- a Notification approval and if so use the resloving
2157                 -- responsibility id
2158 , Resolving_activity_item_type    Varchar2(30)  := null
2159                 -- Workflow which is to be executed if the user does not
2160                 -- have privilages to peform such an action
2161 , Resolving_activity_name Varchar2(30)  := null
2162                 -- Activity which is to be executed if the user does not
2163                 -- have privilages to peform such an action
2164 , Resolving_responsibility_id     Number := null
2165 );
2166 
2167 TYPE Cancel_Line_Tbl_Type IS TABLE OF Cancel_Line_Rec_Type
2168                           INDEX BY BINARY_INTEGER;
2169 
2170 --lkxu
2171 Type Payment_Types_Rec_Type  is RECORD
2172 (   PAYMENT_TRX_ID			NUMBER
2173 ,   COMMITMENT_APPLIED_AMOUNT	   	NUMBER
2174 ,   COMMITMENT_INTERFACED_AMOUNT	NUMBER
2175 ,   PAYMENT_LEVEL_CODE		VARCHAR2(30)
2176 ,   HEADER_ID				NUMBER
2177 ,   LINE_ID				NUMBER
2178 ,   CREATION_DATE		DATE
2179 ,   CREATED_BY			NUMBER
2180 ,   LAST_UPDATE_DATE		DATE
2181 ,   LAST_UPDATED_BY			NUMBER
2182 ,   LAST_UPDATE_LOGIN			NUMBER
2183 ,   REQUEST_ID				NUMBER
2184 ,   PROGRAM_APPLICATION_ID		NUMBER
2185 ,   PROGRAM_ID				NUMBER
2186 ,   PROGRAM_UPDATE_DATE			DATE
2187 ,   CONTEXT				VARCHAR2(30)
2188 ,   ATTRIBUTE1				VARCHAR2(240)
2189 ,   ATTRIBUTE2				VARCHAR2(240)
2190 ,   ATTRIBUTE3				VARCHAR2(240)
2191 ,   ATTRIBUTE4				VARCHAR2(240)
2192 ,   ATTRIBUTE5				VARCHAR2(240)
2193 ,   ATTRIBUTE6				VARCHAR2(240)
2194 ,   ATTRIBUTE7				VARCHAR2(240)
2195 ,   ATTRIBUTE8				VARCHAR2(240)
2196 ,   ATTRIBUTE9				VARCHAR2(240)
2197 ,   ATTRIBUTE10				VARCHAR2(240)
2198 ,   ATTRIBUTE11				VARCHAR2(240)
2199 ,   ATTRIBUTE12				VARCHAR2(240)
2200 ,   ATTRIBUTE13				VARCHAR2(240)
2201 ,   ATTRIBUTE14				VARCHAR2(240)
2202 ,   ATTRIBUTE15				VARCHAR2(240)
2203 ,   db_flag				VARCHAR2(1)
2204 ,   operation				VARCHAR2(30)
2205 ,   return_status			VARCHAR2(1)
2206 );
2207 
2208 TYPE  Payment_Types_Tbl_Type is TABLE of Payment_Types_Rec_Type
2209 	INDEX by BINARY_INTEGER;
2210 
2211 -- serla begin
2212 -- Header Payment Record type'
2213 TYPE Header_Payment_Rec_Type IS RECORD
2214 ( ATTRIBUTE1                     VARCHAR2(240)
2215 , ATTRIBUTE2                     VARCHAR2(240)
2216 , ATTRIBUTE3                     VARCHAR2(240)
2217 , ATTRIBUTE4                     VARCHAR2(240)
2218 , ATTRIBUTE5                     VARCHAR2(240)
2219 , ATTRIBUTE6                     VARCHAR2(240)
2220 , ATTRIBUTE7                     VARCHAR2(240)
2221 , ATTRIBUTE8                     VARCHAR2(240)
2222 , ATTRIBUTE9                     VARCHAR2(240)
2223 , ATTRIBUTE10                    VARCHAR2(240)
2224 , ATTRIBUTE11                    VARCHAR2(240)
2225 , ATTRIBUTE12                    VARCHAR2(240)
2226 , ATTRIBUTE13                    VARCHAR2(240)
2227 , ATTRIBUTE14                    VARCHAR2(240)
2228 , ATTRIBUTE15                    VARCHAR2(240)
2229 , CHECK_NUMBER                   VARCHAR2(50)
2230 , CREATED_BY                     NUMBER
2231 , CREATION_DATE                  DATE
2232 , CREDIT_CARD_APPROVAL_CODE      VARCHAR2(80)
2233 , CREDIT_CARD_APPROVAL_DATE      DATE
2234 , CREDIT_CARD_CODE               VARCHAR2(80)
2235 , CREDIT_CARD_EXPIRATION_DATE    DATE
2236 , CREDIT_CARD_HOLDER_NAME        VARCHAR2(80)
2237 , CREDIT_CARD_NUMBER             VARCHAR2(80)
2238 , COMMITMENT_APPLIED_AMOUNT      NUMBER
2239 , COMMITMENT_INTERFACED_AMOUNT   NUMBER
2240 , CONTEXT                        VARCHAR2(30)
2241 , HEADER_ID                      NUMBER
2242 , LAST_UPDATED_BY                NUMBER
2243 , LAST_UPDATE_DATE               DATE
2244 , LAST_UPDATE_LOGIN              NUMBER
2245 , LINE_ID                        NUMBER
2246 , PAYMENT_NUMBER                 NUMBER
2247 , PAYMENT_PERCENTAGE             NUMBER -- Added for bug 8478559
2248 , PAYMENT_AMOUNT                 NUMBER
2249 , PAYMENT_COLLECTION_EVENT       VARCHAR2(30)
2250 , PAYMENT_LEVEL_CODE             VARCHAR2(30)
2251 , PAYMENT_TRX_ID                 NUMBER
2252 , PAYMENT_TYPE_CODE              VARCHAR2(30)
2253 , PAYMENT_SET_ID                 NUMBER
2254 , PREPAID_AMOUNT                 NUMBER
2255 , PROGRAM_APPLICATION_ID         NUMBER
2256 , PROGRAM_ID                     NUMBER
2257 , PROGRAM_UPDATE_DATE            DATE
2258 , RECEIPT_METHOD_ID              NUMBER
2259 , REQUEST_ID                     NUMBER
2260 , TANGIBLE_ID                    VARCHAR2(80)
2261 , TRXN_EXTENSION_ID              NUMBER
2262 , ORIG_SYS_PAYMENT_REF           VARCHAR2(50)
2263 , CHANGE_REQUEST_CODE            VARCHAR2(30)
2264 , STATUS_FLAG                    VARCHAR2(1)
2265 , RETURN_STATUS                  VARCHAR2(1)
2266 , DB_FLAG                        VARCHAR2(1)
2267 , OPERATION                      VARCHAR2(30)
2268 , DEFER_PAYMENT_PROCESSING_FLAG  VARCHAR2(1)
2269 , LOCK_CONTROL                   NUMBER
2270 , INSTRUMENT_SECURITY_CODE	 VARCHAR2(10)  --R12 CC Encryption
2271 , CC_INSTRUMENT_ID		 NUMBER
2272 , CC_INSTRUMENT_ASSIGNMENT_ID    NUMBER --R12 CC Encryption
2273 );
2274 
2275 TYPE Header_Payment_Tbl_Type IS TABLE OF Header_Payment_Rec_Type
2276     INDEX BY BINARY_INTEGER;
2277 
2278 --  Header_Payment value record type
2279 
2280 TYPE Header_Payment_Val_Rec_Type IS RECORD
2281 (   PAYMENT_COLLECTION_EVENT_NAME    VARCHAR2(80)
2282   , RECEIPT_METHOD                   VARCHAR2(30)
2283   , PAYMENT_TYPE                     VARCHAR2(80)
2284   , COMMITMENT                       VARCHAR2(20)
2285   , PAYMENT_PERCENTAGE               NUMBER
2286 );
2287 
2288 TYPE Header_Payment_Val_Tbl_Type IS TABLE OF Header_Payment_Val_Rec_Type
2289     INDEX BY BINARY_INTEGER;
2290 
2291 -- Line Payment Record type
2292 TYPE Line_Payment_Rec_Type IS RECORD
2293 ( ATTRIBUTE1                     VARCHAR2(240)
2294 , ATTRIBUTE2                     VARCHAR2(240)
2295 , ATTRIBUTE3                     VARCHAR2(240)
2296 , ATTRIBUTE4                     VARCHAR2(240)
2297 , ATTRIBUTE5                     VARCHAR2(240)
2298 , ATTRIBUTE6                     VARCHAR2(240)
2299 , ATTRIBUTE7                     VARCHAR2(240)
2300 , ATTRIBUTE8                     VARCHAR2(240)
2301 , ATTRIBUTE9                     VARCHAR2(240)
2302 , ATTRIBUTE10                    VARCHAR2(240)
2303 , ATTRIBUTE11                    VARCHAR2(240)
2304 , ATTRIBUTE12                    VARCHAR2(240)
2305 , ATTRIBUTE13                    VARCHAR2(240)
2306 , ATTRIBUTE14                    VARCHAR2(240)
2307 , ATTRIBUTE15                    VARCHAR2(240)
2308 , CHECK_NUMBER                   VARCHAR2(50)
2309 , CREATED_BY                     NUMBER
2310 , CREATION_DATE                  DATE
2311 , CREDIT_CARD_APPROVAL_CODE      VARCHAR2(80)
2312 , CREDIT_CARD_APPROVAL_DATE      DATE
2313 , CREDIT_CARD_CODE               VARCHAR2(80)
2314 , CREDIT_CARD_EXPIRATION_DATE    DATE
2315 , CREDIT_CARD_HOLDER_NAME        VARCHAR2(80)
2316 , CREDIT_CARD_NUMBER             VARCHAR2(80)
2317 , COMMITMENT_APPLIED_AMOUNT      NUMBER
2318 , COMMITMENT_INTERFACED_AMOUNT   NUMBER
2319 , CONTEXT                        VARCHAR2(30)
2320 , HEADER_ID                      NUMBER
2321 , LAST_UPDATED_BY                NUMBER
2322 , LAST_UPDATE_DATE               DATE
2323 , LAST_UPDATE_LOGIN              NUMBER
2324 , LINE_ID                        NUMBER
2325 , PAYMENT_NUMBER                 NUMBER
2326 , PAYMENT_AMOUNT                 NUMBER
2327 , PAYMENT_COLLECTION_EVENT       VARCHAR2(30)
2328 , PAYMENT_LEVEL_CODE             VARCHAR2(30)
2329 , PAYMENT_TRX_ID                 NUMBER
2330 , PAYMENT_TYPE_CODE              VARCHAR2(30)
2331 , PAYMENT_SET_ID                 NUMBER
2332 , PREPAID_AMOUNT                 NUMBER
2333 , PROGRAM_APPLICATION_ID         NUMBER
2334 , PROGRAM_ID                     NUMBER
2335 , PROGRAM_UPDATE_DATE            DATE
2336 , RECEIPT_METHOD_ID              NUMBER
2337 , REQUEST_ID                     NUMBER
2338 , TANGIBLE_ID                    VARCHAR2(80)
2339 , TRXN_EXTENSION_ID              NUMBER
2340 , ORIG_SYS_PAYMENT_REF           VARCHAR2(50)
2341 , CHANGE_REQUEST_CODE            VARCHAR2(30)
2342 , STATUS_FLAG                    VARCHAR2(1)
2343 , RETURN_STATUS                  VARCHAR2(1)
2344 , DB_FLAG                        VARCHAR2(1)
2345 , LINE_INDEX                     NUMBER
2346 , OPERATION                      VARCHAR2(30)
2347 , DEFER_PAYMENT_PROCESSING_FLAG  VARCHAR2(1)
2348 , LOCK_CONTROL                   NUMBER
2349 , INSTRUMENT_SECURITY_CODE	 VARCHAR2(10) --R12 CC Encryption
2350 , CC_INSTRUMENT_ID		 NUMBER
2351 , CC_INSTRUMENT_ASSIGNMENT_ID    NUMBER --R12 CC Encryption
2352 );
2353 
2354 TYPE Line_Payment_Tbl_Type IS TABLE OF Line_Payment_Rec_Type
2355     INDEX BY BINARY_INTEGER;
2356 
2357 --  Line_Payment value record type
2358 
2359 TYPE Line_Payment_Val_Rec_Type IS RECORD
2360 (   PAYMENT_COLLECTION_EVENT_NAME    VARCHAR2(80)
2361   , RECEIPT_METHOD                   VARCHAR2(30)
2362   , PAYMENT_TYPE                     VARCHAR2(80)
2363   , COMMITMENT                       VARCHAR2(20)
2364   , PAYMENT_PERCENTAGE               NUMBER
2365 );
2366 
2367 TYPE Line_Payment_Val_Tbl_Type IS TABLE OF Line_Payment_Val_Rec_Type
2368     INDEX BY BINARY_INTEGER;
2369 
2370 --serla end
2371 
2372 --ER7675548
2373 
2374 TYPE CUSTOMER_INFO_REC_TYPE IS RECORD
2375 (
2376 customer_info_ref         VARCHAR2(50)         , -- Reference field to link with header/line record :MANDATORY
2377 parent_customer_info_ref       VARCHAR2(50)    , -- Used to link ADDRESS/CONTACT REF to a CUSTOMER REF
2378 customer_type             VARCHAR2(30)    , -- ORGANIZATION/PERSON :MANDATORY
2379 customer_info_type_code   VARCHAR2(10)    , -- CUSTOMER/ADDRESS/CONTACT : MANDATORY
2380 customer_id          NUMBER,		    -- Pass a valid customer_id from  if it is known
2381 site_use_id          NUMBER,		    -- Pass a valid site_use_id from  if it is known
2382 contact_id           NUMBER,		    -- Pass a valid contact_id from  if it is known
2383 organization_name         VARCHAR2(360)   , -- Party Name
2384 account_description  VARCHAR2(250),         -- Account Description Gets stored in HZ_CUST_ACCOUNTS.ACCOUNT_NAME
2385 person_first_name         VARCHAR2(150)   , -- Party first name
2386 person_middle_name        VARCHAR2(60)    , -- Party middle name
2387 person_last_name          VARCHAR2(150)   , -- party last_name
2388 person_name_suffix        VARCHAR2(30)    , -- Party name suffix
2389 person_title              VARCHAR2(60)    , -- Party title
2390 email_address             VARCHAR2(2000)  , -- Email address
2391 customer_number           VARCHAR2(30)    , -- Pass a customer_number if automatic account numbering is OFF / existing customer's customer number
2392 party_number              VARCHAR2(30)    , -- Pass a party_number if automatic party_numbering is OFF
2393 location_number           VARCHAR2(40)    , -- Pass a value if automatic location numbering is OFF
2394 site_number               VARCHAR2(80)    , -- Pass a value if automatic site numbering is OFF
2395 contact_number            VARCHAR2(80)    , -- Pass a vlue if automatic contact numbering is OFF
2396 party_id                  NUMBER,           -- Pass a valid HZ_PARTIES.party_id only if the new cust account should go under the existing party
2397 phone_country_code        VARCHAR2(10)    , -- Phone Country Code
2398 phone_area_code           VARCHAR2(10)    , -- Area Code
2399 phone_number              VARCHAR2(40)    , -- Phone Number
2400 phone_extension           VARCHAR2(20)    , -- Extension
2401 --Address Fields
2402 address_style             VARCHAR2(100)   , --Address Style from fnd_territories_vl
2403 country                   VARCHAR2(60)    , -- Country
2404 address1                  VARCHAR2(240)   , --Address Line 1
2405 address2                  VARCHAR2(240)   , --Address Line 2
2406 address3                  VARCHAR2(240)   , --Address Line 3
2407 address4                  VARCHAR2(240)   , --Address Line 4
2408 city                      VARCHAR2(60)    , -- City
2409 postal_code               VARCHAR2(60)    , -- Postal code
2410 state                     VARCHAR2(60)    , -- State
2411 province                  VARCHAR2(60)    , -- Province
2412 county                    VARCHAR2(60)    , -- County
2413 address_line_phonetic     VARCHAR2(240)   , -- Address Line Phonetic
2414 new_account_id            NUMBER          , -- For internal use only.Do not populate this attributes
2415 --DFF Fields
2416 attribute_category        VARCHAR2(30)    ,
2417 attribute1                VARCHAR2(150)   ,
2418 attribute2                VARCHAR2(150)   ,
2419 attribute3                VARCHAR2(150)   ,
2420 attribute4                VARCHAR2(150)   ,
2421 attribute5                VARCHAR2(150)   ,
2422 attribute6                VARCHAR2(150)   ,
2423 attribute7                VARCHAR2(150)   ,
2424 attribute8                VARCHAR2(150)   ,
2425 attribute9                VARCHAR2(150)   ,
2426 attribute10               VARCHAR2(150)   ,
2427 attribute11               VARCHAR2(150)   ,
2428 attribute12               VARCHAR2(150)   ,
2429 attribute13               VARCHAR2(150)   ,
2430 attribute14               VARCHAR2(150)   ,
2431 attribute15               VARCHAR2(150)   ,
2432 attribute16               VARCHAR2(150)   ,
2433 attribute17               VARCHAR2(150)   ,
2434 attribute18               VARCHAR2(150)   ,
2435 attribute19               VARCHAR2(150)   ,
2436 attribute20               VARCHAR2(150)   ,
2437 attribute21               VARCHAR2(150)   ,
2438 attribute22               VARCHAR2(150)   ,
2439 attribute23               VARCHAR2(150)   ,
2440 attribute24               VARCHAR2(150)   ,
2441 attribute25               VARCHAR2(150)   ,
2442 global_attribute_category VARCHAR2(30)    ,
2443 global_attribute1         VARCHAR2(150)   ,
2444 global_attribute2         VARCHAR2(150)   ,
2445 global_attribute3         VARCHAR2(150)   ,
2446 global_attribute4         VARCHAR2(150)   ,
2447 global_attribute5         VARCHAR2(150)   ,
2448 global_attribute6         VARCHAR2(150)   ,
2449 global_attribute7         VARCHAR2(150)   ,
2450 global_attribute8         VARCHAR2(150)   ,
2451 global_attribute9         VARCHAR2(150)   ,
2452 global_attribute10        VARCHAR2(150)   ,
2453 global_attribute11        VARCHAR2(150)   ,
2454 global_attribute12        VARCHAR2(150)   ,
2455 global_attribute13        VARCHAR2(150)   ,
2456 global_attribute14        VARCHAR2(150)   ,
2457 global_attribute15        VARCHAR2(150)   ,
2458 global_attribute16        VARCHAR2(150)   ,
2459 global_attribute17        VARCHAR2(150)   ,
2460 global_attribute18        VARCHAR2(150)   ,
2461 global_attribute19        VARCHAR2(150)   ,
2462 global_attribute20        VARCHAR2(150)   ,
2463 orig_system               VARCHAR2(30)    ,
2464 orig_system_reference      VARCHAR2(240)
2465 );
2466 
2467 TYPE CUSTOMER_INFO_TABLE_TYPE IS TABLE OF CUSTOMER_INFO_REC_TYPE INDEX BY BINARY_INTEGER;
2468 
2469 FUNCTION G_MISS_CUSTOMER_INFO_REC RETURN CUSTOMER_INFO_REC_TYPE;
2470 
2471 G_MISS_CUSTOMER_INFO_TBL CUSTOMER_INFO_TABLE_TYPE;
2472 
2473 --ER7675548
2474 
2475 --  Functions to return missing records. The following records have NULL
2476 --  defaults on the record definitions therefore users will have to call
2477 --  these functions to set missing values on the records
2478 --  These functions have been included as a part of performance
2479 --  related change for R11.I.2
2480 
2481 FUNCTION G_MISS_HEADER_REC
2482 	RETURN Header_Rec_Type;
2483 
2484 FUNCTION G_MISS_HEADER_ADJ_REC
2485 	RETURN Header_Adj_Rec_Type;
2486 
2487 FUNCTION G_MISS_HEADER_PRICE_ATT_REC
2488 	RETURN Header_Price_Att_Rec_Type;
2489 
2490 FUNCTION G_MISS_HEADER_ADJ_ATT_REC
2491 	RETURN Header_Adj_Att_Rec_Type;
2492 
2493 FUNCTION G_MISS_HEADER_ADJ_ASSOC_REC
2494 	RETURN Header_Adj_Assoc_Rec_Type;
2495 
2496 FUNCTION G_MISS_HEADER_SCREDIT_REC
2497 	RETURN Header_Scredit_Rec_Type;
2498 
2499 -- performance bug 4571373, replace function with global record
2500 G_MISS_LINE_REC Line_Rec_Type;
2501 
2502 -- added for 4571373 for libraries
2503 FUNCTION GET_G_MISS_LINE_REC
2504     RETURN Line_Rec_Type;
2505 
2506 FUNCTION G_MISS_LINE_ADJ_REC
2507 	RETURN Line_Adj_Rec_Type;
2508 
2509 FUNCTION G_MISS_Line_Price_Att_Rec
2510 	RETURN Line_Price_Att_Rec_Type;
2511 
2512 FUNCTION G_MISS_Line_Adj_Att_Rec
2513 	RETURN Line_Adj_Att_Rec_Type;
2514 
2515 FUNCTION G_MISS_Line_Adj_Assoc_Rec
2516 	RETURN Line_Adj_Assoc_Rec_Type;
2517 
2518 FUNCTION G_MISS_LINE_SCREDIT_REC
2519 	RETURN Line_Scredit_Rec_Type;
2520 
2521 FUNCTION G_MISS_LOT_SERIAL_REC
2522 	RETURN Lot_Serial_Rec_Type;
2523 
2524 FUNCTION G_MISS_HEADER_VAL_REC
2525 	RETURN Header_Val_Rec_Type;
2526 
2527 FUNCTION G_MISS_HEADER_ADJ_VAL_REC
2528 	RETURN Header_Adj_Val_Rec_Type;
2529 
2530 FUNCTION G_MISS_HEADER_SCREDIT_VAL_REC
2531 	RETURN Header_Scredit_Val_Rec_Type;
2532 
2533 FUNCTION G_MISS_LINE_VAL_REC
2534 	RETURN Line_Val_Rec_Type;
2535 
2536 FUNCTION G_MISS_LINE_ADJ_VAL_REC
2537 	RETURN Line_Adj_Val_Rec_Type;
2538 
2539 FUNCTION G_MISS_LINE_SCREDIT_VAL_REC
2540 	RETURN Line_Scredit_Val_Rec_Type;
2541 
2542 FUNCTION G_MISS_LOT_SERIAL_VAL_REC
2543 	RETURN Lot_Serial_Val_Rec_Type;
2544 
2545 --lkxu
2546 FUNCTION G_MISS_PAYMENT_TYPES_REC
2547 	RETURN Payment_Types_Rec_Type;
2548 
2549 --serla begin
2550 FUNCTION G_MISS_HEADER_PAYMENT_REC
2551         RETURN Header_Payment_Rec_Type;
2552 
2553 FUNCTION G_MISS_LINE_PAYMENT_REC
2554         RETURN Line_Payment_Rec_Type;
2555 
2556 FUNCTION G_MISS_HEADER_PAYMENT_VAL_REC
2557         RETURN Header_Payment_Val_Rec_Type;
2558 
2559 FUNCTION G_MISS_LINE_PAYMENT_VAL_REC
2560         RETURN Line_Payment_Val_Rec_Type;
2561 --serla end
2562 
2563 --  Variables representing missing records and tables
2564 
2565 G_MISS_HEADER_TBL             Header_Tbl_Type;
2566 G_MISS_HEADER_VAL_TBL         Header_Val_Tbl_Type;
2567 G_MISS_HEADER_ADJ_TBL         Header_Adj_Tbl_Type;
2568 G_MISS_HEADER_ADJ_VAL_TBL     Header_Adj_Val_Tbl_Type;
2569 G_MISS_HEADER_PRICE_ATT_TBL	Header_Price_Att_Tbl_Type;
2570 G_MISS_HEADER_ADJ_ATT_TBL	Header_Adj_Att_Tbl_Type;
2571 G_MISS_HEADER_ADJ_ASSOC_TBL	Header_Adj_Assoc_Tbl_Type;
2572 G_MISS_HEADER_SCREDIT_TBL     Header_Scredit_Tbl_Type;
2573 G_MISS_HEADER_SCREDIT_VAL_TBL Header_Scredit_Val_Tbl_Type;
2574 G_MISS_LINE_TBL               Line_Tbl_Type;
2575 G_MISS_LINE_VAL_TBL           Line_Val_Tbl_Type;
2576 G_MISS_LINE_ADJ_TBL           Line_Adj_Tbl_Type;
2577 G_MISS_LINE_ADJ_VAL_TBL       Line_Adj_Val_Tbl_Type;
2578 G_MISS_LINE_PRICE_ATT_TBL	Line_Price_Att_Tbl_Type;
2579 G_MISS_LINE_ADJ_ATT_TBL		Line_Adj_Att_Tbl_Type;
2580 G_MISS_LINE_ADJ_ASSOC_TBL	Line_Adj_Assoc_Tbl_Type;
2581 G_MISS_LINE_SCREDIT_TBL       Line_Scredit_Tbl_Type;
2582 G_MISS_LINE_SCREDIT_VAL_TBL   Line_Scredit_Val_Tbl_Type;
2583 G_MISS_LOT_SERIAL_TBL         Lot_Serial_Tbl_Type;
2584 G_MISS_LOT_SERIAL_VAL_TBL     Lot_Serial_Val_Tbl_Type;
2585 G_MISS_RESERVATION_REC        Reservation_Rec_Type;
2586 G_MISS_RESERVATION_VAL_REC    Reservation_Val_Rec_Type;
2587 G_MISS_RESERVATION_TBL        Reservation_Tbl_Type;
2588 G_MISS_RESERVATION_VAL_TBL    Reservation_Val_Tbl_Type;
2589 G_MISS_SET_REC		      Set_Rec_Type;
2590 G_MISS_LINE_SET_REC	      Line_Set_Rec_Type;
2591 G_MISS_REQUEST_REC            Request_Rec_Type;
2592 G_MISS_REQUEST_TBL            Request_Tbl_Type;
2593 --serla begin
2594 G_MISS_HEADER_PAYMENT_TBL     Header_Payment_Tbl_Type;
2595 G_MISS_HEADER_PAYMENT_VAL_TBL Header_Payment_Val_Tbl_Type;
2596 G_MISS_LINE_PAYMENT_TBL     Line_Payment_Tbl_Type;
2597 G_MISS_LINE_PAYMENT_VAL_TBL    Line_Payment_Val_Tbl_Type;
2598 --serla end
2599 
2600 --Global Variables for Attribute Mapping during Pricing
2601 G_HDR		header_rec_type;
2602 G_LINE		line_rec_type;
2603 
2604 
2605 --  Start of Comments
2606 --  API name    Process_Order
2607 --  Type        Public
2608 --
2609 --  Pre-reqs
2610 --
2611 --  Parameters
2612 --
2613 --  Version     Current version = 1.0
2614 --              Initial version = 1.0
2615 --
2616 --  Notes
2617 --
2618 --  End of Comments
2619 
2620 PROCEDURE Process_Order
2621 (   p_org_id                        IN  NUMBER := NULL  --MOAC
2622 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
2623 ,   p_api_version_number            IN  NUMBER
2624 ,   p_init_msg_list                 IN  VARCHAR2 := FND_API.G_FALSE
2625 ,   p_return_values                 IN  VARCHAR2 := FND_API.G_FALSE
2626 ,   p_action_commit                 IN  VARCHAR2 := FND_API.G_FALSE
2627 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
2628 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
2629 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
2630 ,   p_header_rec                    IN  Header_Rec_Type :=
2631                                         G_MISS_HEADER_REC
2632 ,   p_old_header_rec                IN  Header_Rec_Type :=
2633                                         G_MISS_HEADER_REC
2634 ,   p_header_val_rec                IN  Header_Val_Rec_Type :=
2635                                         G_MISS_HEADER_VAL_REC
2636 ,   p_old_header_val_rec            IN  Header_Val_Rec_Type :=
2637                                         G_MISS_HEADER_VAL_REC
2638 ,   p_Header_Adj_tbl                IN  Header_Adj_Tbl_Type :=
2639                                         G_MISS_HEADER_ADJ_TBL
2640 ,   p_old_Header_Adj_tbl            IN  Header_Adj_Tbl_Type :=
2641                                         G_MISS_HEADER_ADJ_TBL
2642 ,   p_Header_Adj_val_tbl            IN  Header_Adj_Val_Tbl_Type :=
2643                                         G_MISS_HEADER_ADJ_VAL_TBL
2644 ,   p_old_Header_Adj_val_tbl        IN  Header_Adj_Val_Tbl_Type :=
2645                                         G_MISS_HEADER_ADJ_VAL_TBL
2646 ,   p_Header_price_Att_tbl          IN  Header_Price_Att_Tbl_Type :=
2647                                         G_MISS_HEADER_PRICE_ATT_TBL
2648 ,   p_old_Header_Price_Att_tbl      IN  Header_Price_Att_Tbl_Type :=
2649                                         G_MISS_HEADER_PRICE_ATT_TBL
2650 ,   p_Header_Adj_Att_tbl            IN  Header_Adj_Att_Tbl_Type :=
2651                                         G_MISS_HEADER_ADJ_ATT_TBL
2652 ,   p_old_Header_Adj_Att_tbl        IN  Header_Adj_Att_Tbl_Type :=
2653     G_MISS_HEADER_ADJ_ATT_TBL
2654 ,   p_Header_Adj_Assoc_tbl            IN  Header_Adj_Assoc_Tbl_Type :=
2655                                         G_MISS_HEADER_ADJ_ASSOC_TBL
2656 ,   p_old_Header_Adj_Assoc_tbl        IN  Header_Adj_Assoc_Tbl_Type :=
2657     G_MISS_HEADER_ADJ_ASSOC_TBL
2658 ,   p_Header_Scredit_tbl            IN  Header_Scredit_Tbl_Type :=
2659                                         G_MISS_HEADER_SCREDIT_TBL
2660 ,   p_old_Header_Scredit_tbl        IN  Header_Scredit_Tbl_Type :=
2661                                         G_MISS_HEADER_SCREDIT_TBL
2662 ,   p_Header_Scredit_val_tbl        IN  Header_Scredit_Val_Tbl_Type :=
2663                                         G_MISS_HEADER_SCREDIT_VAL_TBL
2664 ,   p_old_Header_Scredit_val_tbl    IN  Header_Scredit_Val_Tbl_Type :=
2665                                         G_MISS_HEADER_SCREDIT_VAL_TBL
2666 ,   p_line_tbl                      IN  Line_Tbl_Type :=
2667                                         G_MISS_LINE_TBL
2668 ,   p_old_line_tbl                  IN  Line_Tbl_Type :=
2669                                         G_MISS_LINE_TBL
2670 ,   p_line_val_tbl                  IN  Line_Val_Tbl_Type :=
2671                                         G_MISS_LINE_VAL_TBL
2672 ,   p_old_line_val_tbl              IN  Line_Val_Tbl_Type :=
2673                                         G_MISS_LINE_VAL_TBL
2674 ,   p_Line_Adj_tbl                  IN  Line_Adj_Tbl_Type :=
2675                                         G_MISS_LINE_ADJ_TBL
2676 ,   p_old_Line_Adj_tbl              IN  Line_Adj_Tbl_Type :=
2677                                         G_MISS_LINE_ADJ_TBL
2678 ,   p_Line_Adj_val_tbl              IN  Line_Adj_Val_Tbl_Type :=
2679                                         G_MISS_LINE_ADJ_VAL_TBL
2680 ,   p_old_Line_Adj_val_tbl          IN  Line_Adj_Val_Tbl_Type :=
2681                                         G_MISS_LINE_ADJ_VAL_TBL
2682 ,   p_Line_price_Att_tbl            IN  Line_Price_Att_Tbl_Type :=
2683                                         G_MISS_LINE_PRICE_ATT_TBL
2684 ,   p_old_Line_Price_Att_tbl        IN  Line_Price_Att_Tbl_Type :=
2685                                         G_MISS_LINE_PRICE_ATT_TBL
2686 ,   p_Line_Adj_Att_tbl              IN  Line_Adj_Att_Tbl_Type :=
2687                                         G_MISS_LINE_ADJ_ATT_TBL
2688 ,   p_old_Line_Adj_Att_tbl          IN  Line_Adj_Att_Tbl_Type :=
2689     G_MISS_LINE_ADJ_ATT_TBL
2690 ,   p_Line_Adj_Assoc_tbl              IN  Line_Adj_Assoc_Tbl_Type :=
2691                                         G_MISS_LINE_ADJ_ASSOC_TBL
2692 ,   p_old_Line_Adj_Assoc_tbl          IN  Line_Adj_Assoc_Tbl_Type :=
2693     G_MISS_LINE_ADJ_ASSOC_TBL
2694 ,   p_Line_Scredit_tbl              IN  Line_Scredit_Tbl_Type :=
2695                                         G_MISS_LINE_SCREDIT_TBL
2696 ,   p_old_Line_Scredit_tbl          IN  Line_Scredit_Tbl_Type :=
2697                                         G_MISS_LINE_SCREDIT_TBL
2698 ,   p_Line_Scredit_val_tbl          IN  Line_Scredit_Val_Tbl_Type :=
2699                                         G_MISS_LINE_SCREDIT_VAL_TBL
2700 ,   p_old_Line_Scredit_val_tbl      IN  Line_Scredit_Val_Tbl_Type :=
2701                                         G_MISS_LINE_SCREDIT_VAL_TBL
2702 ,   p_Lot_Serial_tbl                IN  Lot_Serial_Tbl_Type :=
2703                                         G_MISS_LOT_SERIAL_TBL
2704 ,   p_old_Lot_Serial_tbl            IN  Lot_Serial_Tbl_Type :=
2705                                         G_MISS_LOT_SERIAL_TBL
2706 ,   p_Lot_Serial_val_tbl            IN  Lot_Serial_Val_Tbl_Type :=
2707                                         G_MISS_LOT_SERIAL_VAL_TBL
2708 ,   p_old_Lot_Serial_val_tbl        IN  Lot_Serial_Val_Tbl_Type :=
2709                                         G_MISS_LOT_SERIAL_VAL_TBL
2710 ,   p_action_request_tbl	    IN  Request_Tbl_Type :=
2711 					G_MISS_REQUEST_TBL
2712 ,   x_header_rec                    OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
2713 ,   x_header_val_rec                OUT NOCOPY /* file.sql.39 change */ Header_Val_Rec_Type
2714 ,   x_Header_Adj_tbl                OUT NOCOPY /* file.sql.39 change */ Header_Adj_Tbl_Type
2715 ,   x_Header_Adj_val_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Val_Tbl_Type
2716 ,   x_Header_price_Att_tbl          OUT NOCOPY /* file.sql.39 change */ Header_Price_Att_Tbl_Type
2717 ,   x_Header_Adj_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Att_Tbl_Type
2718 ,   x_Header_Adj_Assoc_tbl          OUT NOCOPY /* file.sql.39 change */ Header_Adj_Assoc_Tbl_Type
2719 ,   x_Header_Scredit_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Tbl_Type
2720 ,   x_Header_Scredit_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Val_Tbl_Type
2721 ,   x_line_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
2722 ,   x_line_val_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Val_Tbl_Type
2723 ,   x_Line_Adj_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Adj_Tbl_Type
2724 ,   x_Line_Adj_val_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Val_Tbl_Type
2725 ,   x_Line_price_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Line_Price_Att_Tbl_Type
2726 ,   x_Line_Adj_Att_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Att_Tbl_Type
2727 ,   x_Line_Adj_Assoc_tbl            OUT NOCOPY /* file.sql.39 change */ Line_Adj_Assoc_Tbl_Type
2728 ,   x_Line_Scredit_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Tbl_Type
2729 ,   x_Line_Scredit_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Val_Tbl_Type
2730 ,   x_Lot_Serial_tbl                OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Tbl_Type
2731 ,   x_Lot_Serial_val_tbl            OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Val_Tbl_Type
2732 ,   x_action_request_tbl	    OUT NOCOPY /* file.sql.39 change */ Request_Tbl_Type
2733 --For bug 3390458
2734 ,   p_rtrim_data                    IN  Varchar2 :='N'
2735 ,   p_validate_desc_flex            in varchar2 default 'Y' -- bug4343612
2736 
2737 --ER7675548
2738 ,   p_header_customer_info_tbl      IN OE_ORDER_PUB.CUSTOMER_INFO_TABLE_TYPE :=
2739                                          OE_ORDER_PUB.G_MISS_CUSTOMER_INFO_TBL
2740 ,   p_line_customer_info_tbl        IN OE_ORDER_PUB.CUSTOMER_INFO_TABLE_TYPE :=
2741                                        OE_ORDER_PUB.G_MISS_CUSTOMER_INFO_TBL
2742 );
2743 
2744 
2745 --  Start of Comments
2746 --  API name    Lock_Order
2747 --  Type        Public
2748 --
2749 --  Pre-reqs
2750 --
2751 --  Parameters
2752 --
2753 --  Version     Current version = 1.0
2754 --              Initial version = 1.0
2755 --
2756 --  Notes
2757 --
2758 --  End of Comments
2759 
2760 
2761 PROCEDURE Lock_Order
2762 (   p_api_version_number            IN  NUMBER
2763 ,   p_init_msg_list                 IN  VARCHAR2 := FND_API.G_FALSE
2764 ,   p_return_values                 IN  VARCHAR2 := FND_API.G_FALSE
2765 ,  p_org_id                        IN  NUMBER := NULL  --MOAC
2766 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
2767 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
2768 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
2769 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
2770 ,   p_header_rec                    IN  Header_Rec_Type :=
2771                                         G_MISS_HEADER_REC
2772 ,   p_header_val_rec                IN  Header_Val_Rec_Type :=
2773                                         G_MISS_HEADER_VAL_REC
2774 ,   p_Header_Adj_tbl                IN  Header_Adj_Tbl_Type :=
2775                                         G_MISS_HEADER_ADJ_TBL
2776 ,   p_Header_Adj_val_tbl            IN  Header_Adj_Val_Tbl_Type :=
2777                                         G_MISS_HEADER_ADJ_VAL_TBL
2778 ,   p_Header_price_Att_tbl          IN  Header_Price_Att_Tbl_Type :=
2779                                         G_MISS_HEADER_PRICE_ATT_TBL
2780 ,   p_Header_Adj_Att_tbl            IN  Header_Adj_Att_Tbl_Type :=
2781                                         G_MISS_HEADER_ADJ_ATT_TBL
2782 ,   p_Header_Adj_Assoc_tbl            IN  Header_Adj_Assoc_Tbl_Type :=
2783                                         G_MISS_HEADER_ADJ_ASSOC_TBL
2784 ,   p_Header_Scredit_tbl            IN  Header_Scredit_Tbl_Type :=
2785                                         G_MISS_HEADER_SCREDIT_TBL
2786 ,   p_Header_Scredit_val_tbl        IN  Header_Scredit_Val_Tbl_Type :=
2787                                         G_MISS_HEADER_SCREDIT_VAL_TBL
2788 ,   p_line_tbl                      IN  Line_Tbl_Type :=
2789                                         G_MISS_LINE_TBL
2790 ,   p_line_val_tbl                  IN  Line_Val_Tbl_Type :=
2791                                         G_MISS_LINE_VAL_TBL
2792 ,   p_Line_Adj_tbl                  IN  Line_Adj_Tbl_Type :=
2793                                         G_MISS_LINE_ADJ_TBL
2794 ,   p_Line_Adj_val_tbl              IN  Line_Adj_Val_Tbl_Type :=
2795                                         G_MISS_LINE_ADJ_VAL_TBL
2796 ,   p_Line_price_Att_tbl            IN  Line_Price_Att_Tbl_Type :=
2797                                         G_MISS_LINE_PRICE_ATT_TBL
2798 ,   p_Line_Adj_Att_tbl              IN  Line_Adj_Att_Tbl_Type :=
2799                                         G_MISS_LINE_ADJ_ATT_TBL
2800 ,   p_Line_Adj_Assoc_tbl              IN  Line_Adj_Assoc_Tbl_Type :=
2801                                         G_MISS_LINE_ADJ_ASSOC_TBL
2802 ,   p_Line_Scredit_tbl              IN  Line_Scredit_Tbl_Type :=
2803                                         G_MISS_LINE_SCREDIT_TBL
2804 ,   p_Line_Scredit_val_tbl          IN  Line_Scredit_Val_Tbl_Type :=
2805                                         G_MISS_LINE_SCREDIT_VAL_TBL
2806 ,   p_Lot_Serial_tbl                IN  Lot_Serial_Tbl_Type :=
2807                                         G_MISS_LOT_SERIAL_TBL
2808 ,   p_Lot_Serial_val_tbl            IN  Lot_Serial_Val_Tbl_Type :=
2809                                         G_MISS_LOT_SERIAL_VAL_TBL
2810 ,   x_header_rec                    OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
2811 ,   x_header_val_rec                OUT NOCOPY /* file.sql.39 change */ Header_Val_Rec_Type
2812 ,   x_Header_Adj_tbl                OUT NOCOPY /* file.sql.39 change */ Header_Adj_Tbl_Type
2813 ,   x_Header_Adj_val_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Val_Tbl_Type
2814 ,   x_Header_price_Att_tbl          OUT NOCOPY /* file.sql.39 change */ Header_Price_Att_Tbl_Type
2815 ,   x_Header_Adj_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Att_Tbl_Type
2816 ,   x_Header_Adj_Assoc_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Assoc_Tbl_Type
2817 ,   x_Header_Scredit_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Tbl_Type
2818 ,   x_Header_Scredit_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Val_Tbl_Type
2819 ,   x_line_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
2820 ,   x_line_val_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Val_Tbl_Type
2821 ,   x_Line_Adj_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Adj_Tbl_Type
2822 ,   x_Line_Adj_val_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Val_Tbl_Type
2823 ,   x_Line_price_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Line_Price_Att_Tbl_Type
2824 ,   x_Line_Adj_Att_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Att_Tbl_Type
2825 ,   x_Line_Adj_Assoc_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Assoc_Tbl_Type
2826 ,   x_Line_Scredit_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Tbl_Type
2827 ,   x_Line_Scredit_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Val_Tbl_Type
2828 ,   x_Lot_Serial_tbl                OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Tbl_Type
2829 ,   x_Lot_Serial_val_tbl            OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Val_Tbl_Type
2830 );
2831 
2832 --  Start of Comments
2833 --  API name    Get_Order
2834 --  Type        Public
2835 --
2836 --  Pre-reqs
2837 --
2838 --  Parameters
2839 --
2840 --  Version     Current version = 1.0
2841 --              Initial version = 1.0
2842 --
2843 --  Notes
2844 --
2845 --  End of Comments
2846 
2847 PROCEDURE Get_Order
2848 (   p_api_version_number            IN  NUMBER
2849 ,   p_init_msg_list                 IN  VARCHAR2 := FND_API.G_FALSE
2850 ,   p_return_values                 IN  VARCHAR2 := FND_API.G_FALSE
2851 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
2852 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
2853 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
2854 ,   p_header_id                     IN  NUMBER :=
2855                                         FND_API.G_MISS_NUM
2856 ,   p_header                        IN  VARCHAR2 :=
2857                                         FND_API.G_MISS_CHAR
2858 , p_org_id                        IN  NUMBER := NULL  --MOAC
2859 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
2860 ,   x_header_rec                    OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
2861 ,   x_header_val_rec                OUT NOCOPY /* file.sql.39 change */ Header_Val_Rec_Type
2862 ,   x_Header_Adj_tbl                OUT NOCOPY /* file.sql.39 change */ Header_Adj_Tbl_Type
2863 ,   x_Header_Adj_val_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Val_Tbl_Type
2864 ,   x_Header_price_Att_tbl          OUT NOCOPY /* file.sql.39 change */ Header_Price_Att_Tbl_Type
2865 ,   x_Header_Adj_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Att_Tbl_Type
2866 ,   x_Header_Adj_Assoc_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Assoc_Tbl_Type
2867 ,   x_Header_Scredit_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Tbl_Type
2868 ,   x_Header_Scredit_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Val_Tbl_Type
2869 ,   x_line_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
2870 ,   x_line_val_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Val_Tbl_Type
2871 ,   x_Line_Adj_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Adj_Tbl_Type
2872 ,   x_Line_Adj_val_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Val_Tbl_Type
2873 ,   x_Line_price_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Line_Price_Att_Tbl_Type
2874 ,   x_Line_Adj_Att_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Att_Tbl_Type
2875 ,   x_Line_Adj_Assoc_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Assoc_Tbl_Type
2876 ,   x_Line_Scredit_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Tbl_Type
2877 ,   x_Line_Scredit_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Val_Tbl_Type
2878 ,   x_Lot_Serial_tbl                OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Tbl_Type
2879 ,   x_Lot_Serial_val_tbl            OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Val_Tbl_Type
2880 );
2881 
2882 PROCEDURE Id_To_Value
2883 (   p_header_rec                    IN  Header_Rec_Type
2884 ,   p_Header_Adj_tbl                IN  Header_Adj_Tbl_Type
2885 ,   p_Header_Scredit_tbl            IN  Header_Scredit_Tbl_Type
2886 ,   p_line_tbl                      IN  Line_Tbl_Type
2887 ,   p_Line_Adj_tbl                  IN  Line_Adj_Tbl_Type
2888 ,   p_Line_Scredit_tbl              IN  Line_Scredit_Tbl_Type
2889 ,   p_Lot_Serial_tbl                IN  Lot_Serial_Tbl_Type
2890 , p_org_id                        IN  NUMBER := NULL  --MOAC
2891 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
2892 ,   x_header_val_rec                OUT NOCOPY /* file.sql.39 change */ Header_Val_Rec_Type
2893 ,   x_Header_Adj_val_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Val_Tbl_Type
2894 ,   x_Header_Scredit_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Val_Tbl_Type
2895 ,   x_line_val_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Val_Tbl_Type
2896 ,   x_Line_Adj_val_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Val_Tbl_Type
2897 ,   x_Line_Scredit_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Val_Tbl_Type
2898 ,   x_Lot_Serial_val_tbl            OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Val_Tbl_Type
2899 );
2900 
2901 /*#
2902 * Use this procedure to retrieve sales order attribute IDs when supplying value information for those attributes.  For instance, the Sold To Organization name could be provided in order to retrieve the Sold To Organization ID.
2903 * In case Order-To-Cash PIP is installed or OE_INBOUND_INT.Process_Order(...) is in use,
2904 * DO NOT use this API to generate WSDL. Otherwise, OE_INBOUND_INT.Process_Order() may become invalid
2905 * and break Order-To-Cash PIP.
2906 *	@param	 	p_header_rec	Input record structure containing header-level ID information for an order
2907 *	@param	 	p_header_val_rec	Input record structure containing header-level value information for an order
2908 *	@param	 	p_Header_Adj_tbl	Input table containing header-level ID information for price adjustments
2909 *	@param	 	p_Header_Adj_val_tbl	Input table containing header-level value information for price adjustments
2910 *	@param	 	p_Header_Scredit_tbl	Input table containing header-level ID information for sales credits
2911 *	@param	 	p_Header_Scredit_val_tbl	Input table containing header-level value information for sales credits
2912 *	@param		p_Header_Payment_tbl	Input table containing current header-level ID information for payments
2913 *	@param		p_Header_Payment_val_tbl	Input table containing current header-level value information for payments
2914 *	@param	 	p_line_tbl	Input table containing line-level ID information for an order
2915 *	@param	 	p_line_val_tbl	Input table containing line-level value information for an order
2916 *	@param	 	p_Line_Adj_tbl	Input table containing line-level ID information for price adjustments
2917 *	@param	 	p_Line_Adj_val_tbl	Input table containing line-level value information for price adjustments
2918 *	@param	 	p_Line_Scredit_tbl	Input table containing line-level ID information for sales credits
2919 *	@param	 	p_Line_Scredit_val_tbl	Input table containing line-level value information for sales credits
2920 *	@param		p_Line_Payment_val_tbl	Input table containing current line-level value information for payments
2921 *	@param		p_Line_Payment_tbl	Input table containing current line-level ID information for payments
2922 *	@param	 	p_Lot_Serial_tbl	Input table containing ID information for lot and serial numbers
2923 *	@param	 	p_Lot_Serial_val_tbl	Input table containing value information for lot and serial numbers
2924 *   @param      p_org_id   Input OU Organization Id
2925 *   @param      p_operating_unit   Input Operating Unit Name
2926 *	@param	 	x_header_rec	Output record structure containing header-level ID information for an order
2927 *	@param	 	x_Header_Adj_tbl	Output table containing header-level ID information for price adjustments
2928 *	@param	 	x_Header_Scredit_tbl	Output table containing header-level ID information for sales credits
2929 *	@param		x_Header_Payment_tbl	Output table containing current header-level ID information for payments
2930 *	@param	 	x_line_tbl	Output table containing line-level ID information for an order
2931 *	@param	 	x_Line_Adj_tbl	Output table containing line-level ID information for price adjustments
2932 *	@param	 	x_Line_Scredit_tbl	Output table containing line-level ID information for sales credits
2933 *	@param		x_Line_Payment_tbl	Output table containing current line-level ID information for payments
2934 *	@param	 	x_Lot_Serial_tbl	Output table containing ID information for lot and serial numbers
2935 *	@param	 	x_return_status	Return status of API call
2936 *	@rep:scope	 	public
2937 *	@rep:lifecycle	 	active
2938 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
2939 *	@rep:displayname	 	Value To ID
2940 */
2941 PROCEDURE Value_To_Id
2942 (   p_header_rec                    IN  Header_Rec_Type
2943 ,   p_header_val_rec                IN  Header_Val_Rec_Type
2944 ,   p_Header_Adj_tbl                IN  Header_Adj_Tbl_Type
2945 ,   p_Header_Adj_val_tbl            IN  Header_Adj_Val_Tbl_Type
2946 ,   p_Header_Scredit_tbl            IN  Header_Scredit_Tbl_Type
2947 ,   p_Header_Scredit_val_tbl        IN  Header_Scredit_Val_Tbl_Type
2948 ,   p_Header_Payment_tbl            IN  Header_Payment_Tbl_Type
2949 ,   p_Header_Payment_val_tbl        IN  Header_Payment_Val_Tbl_Type
2950 ,   p_line_tbl                      IN  Line_Tbl_Type
2951 ,   p_line_val_tbl                  IN  Line_Val_Tbl_Type
2952 ,   p_Line_Adj_tbl                  IN  Line_Adj_Tbl_Type
2953 ,   p_Line_Adj_val_tbl              IN  Line_Adj_Val_Tbl_Type
2954 ,   p_Line_Scredit_tbl              IN  Line_Scredit_Tbl_Type
2955 ,   p_Line_Scredit_val_tbl          IN  Line_Scredit_Val_Tbl_Type
2956 ,   p_Line_Payment_val_tbl          IN  Line_Payment_Val_Tbl_Type
2957 ,   p_Line_Payment_tbl              IN  Line_Payment_Tbl_Type
2958 ,   p_Lot_Serial_tbl                IN  Lot_Serial_Tbl_Type
2959 ,   p_Lot_Serial_val_tbl            IN  Lot_Serial_Val_Tbl_Type
2960 ,   p_org_id                        IN  NUMBER := NULL  --MOAC
2961 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
2962 
2963 ,   x_header_rec                    OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
2964 ,   x_Header_Adj_tbl                OUT NOCOPY /* file.sql.39 change */ Header_Adj_Tbl_Type
2965 ,   x_Header_Scredit_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Tbl_Type
2966 ,   x_Header_Payment_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Payment_Tbl_Type
2967 ,   x_line_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
2968 ,   x_Line_Adj_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Adj_Tbl_Type
2969 ,   x_Line_Scredit_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Tbl_Type
2970 ,   x_Line_Payment_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Payment_Tbl_Type
2971 ,   x_Lot_Serial_tbl                OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Tbl_Type
2972 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
2973 );
2974 
2975 PROCEDURE Value_To_Id (
2976     p_header_rec                    IN  Header_Rec_Type
2977 ,   p_header_val_rec                IN  Header_Val_Rec_Type
2978 ,   p_Header_Adj_tbl                IN  Header_Adj_Tbl_Type
2979 ,   p_Header_Adj_val_tbl            IN  Header_Adj_Val_Tbl_Type
2980 ,   p_Header_Scredit_tbl            IN  Header_Scredit_Tbl_Type
2981 ,   p_Header_Scredit_val_tbl        IN  Header_Scredit_Val_Tbl_Type
2982 ,   p_line_tbl                      IN  Line_Tbl_Type
2983 ,   p_line_val_tbl                  IN  Line_Val_Tbl_Type
2984 ,   p_Line_Adj_tbl                  IN  Line_Adj_Tbl_Type
2985 ,   p_Line_Adj_val_tbl              IN  Line_Adj_Val_Tbl_Type
2986 ,   p_Line_Scredit_tbl              IN  Line_Scredit_Tbl_Type
2987 ,   p_Line_Scredit_val_tbl          IN  Line_Scredit_Val_Tbl_Type
2988 ,   p_Lot_Serial_tbl                IN  Lot_Serial_Tbl_Type
2989 ,   p_Lot_Serial_val_tbl            IN  Lot_Serial_Val_Tbl_Type
2990 , p_org_id                        IN  NUMBER := NULL  --MOAC
2991 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
2992 
2993 ,   x_header_rec                    OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
2994 ,   x_Header_Adj_tbl                OUT NOCOPY /* file.sql.39 change */ Header_Adj_Tbl_Type
2995 ,   x_Header_Scredit_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Tbl_Type
2996 ,   x_line_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
2997 ,   x_Line_Adj_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Adj_Tbl_Type
2998 ,   x_Line_Scredit_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Tbl_Type
2999 ,   x_Lot_Serial_tbl                OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Tbl_Type
3000 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3001 );
3002 
3003 
3004 
3005 
3006 /*#
3007 * Use this procedure to process the creation, update, and deletion of sales order lines in the Order Management system.
3008 * In case Order-To-Cash PIP is installed or OE_INBOUND_INT.Process_Order(...) is in use,
3009 * DO NOT use this API to generate WSDL. Otherwise, OE_INBOUND_INT.Process_Order() may become invalid
3010 * and break Order-To-Cash PIP.
3011 *	@param	 	p_line_tbl	Input table containing line-level ID information for an order
3012 *   @param      p_org_id   Input OU Organization Id
3013 *   @param      p_operating_unit   Input Operating Unit Name
3014 *	@param	 	x_line_out_tbl	Output table containing line-level ID information for an order
3015 *	@param	 	x_return_status	Return status of API call
3016 *	@param	 	x_msg_count	Number of stored processing messages
3017 *	@param	 	x_msg_data	Processing message data
3018 *	@rep:scope	 	public
3019 *	@rep:lifecycle	 	active
3020 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3021 *	@rep:displayname	 	Process Order Line
3022 */
3023 PROCEDURE Process_Line
3024 (
3025     p_line_tbl                      IN  Line_Tbl_Type :=
3026                                         G_MISS_LINE_TBL
3027 , p_org_id                        IN  NUMBER := NULL  --MOAC
3028 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3029 ,   x_line_out_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
3030 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3031 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3032 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3033 );
3034 
3035 /*#
3036 * Use this procedure to process the creation, update, or deletion of a sales order header in the Order Management system.
3037 * In case Order-To-Cash PIP is installed or OE_INBOUND_INT.Process_Order(...) is in use,
3038 * DO NOT use this API to generate WSDL. Otherwise, OE_INBOUND_INT.Process_Order() may become invalid
3039 * and break Order-To-Cash PIP.
3040 *	@param	 	p_header_rec	Input record structure containing header-level ID information for an order
3041 *   @param      p_org_id   Input OU Organization Id
3042 *   @param      p_operating_unit   Input Operating Unit Name
3043 *	@param	 	x_header_out_rec	Output record structure containing header-level ID information for an order
3044 *	@param	 	x_return_status	Return status of API call
3045 *	@param	 	x_msg_count	Number of stored processing messages
3046 *	@param	 	x_msg_data	Processing message data
3047 *	@rep:scope	 	public
3048 *	@rep:lifecycle	 	active
3049 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3050 *	@rep:displayname	 	Process Order Header
3051 */
3052 PROCEDURE Process_header
3053 (
3054     p_header_rec                      IN  Header_Rec_Type :=
3055                                         G_MISS_HEADER_REC
3056 , p_org_id                        IN  NUMBER := NULL  --MOAC
3057 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3058 
3059 ,   x_header_out_rec                      OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
3060 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3061 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3062 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3063 );
3064 
3065 
3066 /*#
3067 * Use this procedure to delete a sales order in the Order Management system.
3068 *	@param	 	p_header_ID	Input Header ID
3069 *   @param      p_org_id   Input OU Organization Id
3070 *   @param      p_operating_unit   Input Operating Unit Name
3071 *	@param	 	x_return_status	Return status of API call
3072 *	@param	 	x_msg_count	Number of stored processing messages
3073 *	@param	 	x_msg_data	Processing message data
3074 *	@rep:scope	 	public
3075 *	@rep:lifecycle	 	active
3076 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3077 *	@rep:displayname	 	Delete Order
3078 */
3079 PROCEDURE Delete_Order
3080 (
3081     p_header_id                      NUMBER
3082 , p_org_id                        IN  NUMBER := NULL  --MOAC
3083 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3084 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3085 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3086 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3087 );
3088 
3089 /*#
3090 * Use this procedure to delete a sales order line in the Order Management system.
3091 *	@param	 	p_line_ID	Input Line ID
3092 *   @param      p_org_id   Input OU Organization Id
3093 *   @param      p_operating_unit   Input Operating Unit Name
3094 *	@param	 	x_return_status	Return status of API call
3095 *	@param	 	x_msg_count	Number of stored processing messages
3096 *	@param	 	x_msg_data	Processing message data
3097 *	@rep:scope	 	public
3098 *	@rep:lifecycle	 	active
3099 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3100 *	@rep:displayname	 	Delete Order Line
3101 */
3102 PROCEDURE Delete_Line
3103 (
3104     p_line_id                       NUMBER
3105 , p_org_id                        IN  NUMBER := NULL  --MOAC
3106 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3107 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3108 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3109 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3110 );
3111 
3112 /*#
3113 * Use this procedure to update a sales order header in the Order Management system.
3114 * In case Order-To-Cash PIP is installed or OE_INBOUND_INT.Process_Order(...) is in use,
3115 * DO NOT use this API to generate WSDL. Otherwise, OE_INBOUND_INT.Process_Order() may become invalid
3116 * and break Order-To-Cash PIP.
3117 *	@param	 	p_header_ID	Input Header ID
3118 *   @param      p_org_id   Input OU Organization Id
3119 *   @param      p_operating_unit   Input Operating Unit Name
3120 *	@param	 	p_header_val_rec	Input record structure containing header-level value information for an order
3121 *	@param	 	x_return_status	Return status of API call
3122 *	@param	 	x_msg_count	Number of stored processing messages
3123 *	@param	 	x_msg_data	Processing message data
3124 *	@rep:scope	 	public
3125 *	@rep:lifecycle	 	active
3126 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3127 *	@rep:displayname	 	Update Order Header
3128 */
3129 PROCEDURE update_header
3130 (
3131     p_header_id			   IN NUMBER
3132 , p_org_id                        IN  NUMBER := NULL  --MOAC
3133 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3134 ,   p_header_val_rec               IN  Header_val_Rec_Type :=
3135                                         G_MISS_HEADER_VAL_REC
3136 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3137 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3138 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3139 );
3140 
3141 /*#
3142 * Use this procedure to update a sales order line in the Order Management system.
3143 * In case Order-To-Cash PIP is installed or OE_INBOUND_INT.Process_Order(...) is in use,
3144 * DO NOT use this API to generate WSDL. Otherwise, OE_INBOUND_INT.Process_Order() may become invalid
3145 * and break Order-To-Cash PIP.
3146 *	@param	 	p_Line_id	Input Header ID
3147 *	@param	 	p_line_val_rec	Input record structure containing line-level value information for an order
3148 *   @param      p_org_id   Input OU Organization Id
3149 *   @param      p_operating_unit   Input Operating Unit Name
3150 *	@param	 	x_return_status	Return status of API call
3151 *	@param	 	x_msg_count	Number of stored processing messages
3152 *	@param	 	x_msg_data	Processing message data
3153 *	@rep:scope	 	public
3154 *	@rep:lifecycle	 	active
3155 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3156 *	@rep:displayname	 	Update Order Line
3157 */
3158 PROCEDURE Update_Line
3159 (
3160     p_line_id			   IN   NUMBER
3161 ,   p_line_val_rec                 IN  Line_Val_rec_Type :=
3162                                         G_MISS_LINE_VAL_REC
3163 , p_org_id                        IN  NUMBER := NULL  --MOAC
3164 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3165 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3166 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3167 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3168 );
3169 
3170 
3171 -- overloaded the public APIs.  The existing API will call these new API with the new parameters set as NULL.
3172 -- Annotation description modified for bug 13824252.
3173 /*#
3174 * Use this procedure to create, update or delete Sales Orders in the Order Management system. However,
3175 * OE_INBOUND_INT.Process_Order() (Sales Order Service) is the API of choice of usage in web services.
3176 * You MUST NOT use OE_ORDER_PUB.Process_Order() for web service generation if Order-To-Cash PIP is installed or
3177 * OE_INBOUND_INT.Process_Order(...) is in use.
3178 * In addition to allowing direct changes to the sales order, this API supports the application of header and line
3179 * level price adjustments, pricing attributes, sales credits, and payments.  Lot and Serial number information are
3180 * supported for return lines.  Process Order also supports action requests that allow users to execute a variety
3181 * of actions such as booking, hold application and removal, automatic attachments, fullfillment set application
3182 * and removal, match and reserve for Configured items, get ship method and freight rates (both individually
3183 * and together), and the linking and delinking of Configured items.
3184 *   @param      p_org_id   Input OU Organization Id
3185 *   @param      p_operating_unit   Input Operating Unit Name
3186 *	@param	 	p_api_version_number	API version used to check call compatibility
3187 *	@param	 	p_init_msg_list	Boolean which determines whether internal message tables should be initialized
3188 *	@param	 	p_return_values	Boolean which determines whether ids should be converted to values for population in the output value parameters
3189 *	@param	 	p_action_commit	Not used
3190 *	@param	 	x_return_status	Return status of API call
3191 *	@param	 	x_msg_count	Number of stored processing messages
3192 *	@param	 	x_msg_data	Processing message data
3193 *	@param	 	p_header_rec	Input record structure containing current header-level ID information for an order
3194 *	@param	 	p_old_header_rec	Input record structure containing old header-level ID information for an order
3195 *	@param	 	p_header_val_rec	Input record structure containing current header-level value information for an order
3196 *	@param	 	p_old_header_val_rec	Input record structure containing old header-level value information for an order
3197 *	@param	 	p_Header_Adj_tbl	Input table containing current header-level ID information for price adjustments
3198 *	@param	 	p_old_Header_Adj_tbl	Input table containing old header-level ID information for price adjustments
3199 *	@param	 	p_Header_Adj_val_tbl	Input table containing current header-level value information for price adjustments
3200 *	@param	 	p_old_Header_Adj_val_tbl	Input table containing old header-level value information for price adjustments
3201 *	@param	 	p_Header_price_Att_tbl	Input table containing current header-level information for pricing attributes
3202 *	@param	 	p_old_Header_Price_Att_tbl	Input table containing old header-level information for pricing attributes
3203 *	@param	 	p_Header_Adj_Att_tbl	Input table containing current header-level adjustment attributes
3204 *	@param	 	p_old_Header_Adj_Att_tbl	Input table containing old header-level adjustment attributes
3205 *	@param	 	p_Header_Adj_Assoc_tbl	Input table containing current information about relationships between header-level adjustments
3206 *	@param	 	p_old_Header_Adj_Assoc_tbl	Input table containing old information about relationships between header-level adjustments
3207 *	@param	 	p_Header_Scredit_tbl	Input table containing current header-level ID information for sales credits
3208 *	@param	 	p_old_Header_Scredit_tbl	Input table containing old header-level ID information for sales credits
3209 *	@param	 	p_Header_Scredit_val_tbl	Input table containing current header-level value information for sales credits
3210 *	@param	 	p_old_Header_Scredit_val_tbl	Input table containing old header-level value information for sales credits
3211 *	@param		p_Header_Payment_tbl	Input table containing current header-level ID information for payments
3212 *	@param		p_old_Header_Payment_tbl	 Input table containing old header-level ID information for payments
3213 *	@param		p_Header_Payment_val_tbl	Input table containing current header-level value information for payments
3214 *	@param		p_old_Header_Payment_val_tbl	Input table containing old header-level value information for payments
3215 *	@param	 	p_line_tbl	Input table containing current line-level ID information for an order
3216 *	@param	 	p_old_line_tbl	Input table containing old line-level ID information for an order
3217 *	@param	 	p_line_val_tbl	Input table containing current line-level value information for an order
3218 *	@param	 	p_old_line_val_tbl	Input table containing old line-level value information for an order
3219 *	@param	 	p_Line_Adj_tbl	Input table containing current line-level ID information for price adjustments
3220 *	@param	 	p_old_Line_Adj_tbl	Input table containing old line-level ID information for price adjustments
3221 *	@param	 	p_Line_Adj_val_tbl	Input table containing current line-level value information for price adjustments
3222 *	@param	 	p_old_Line_Adj_val_tbl	Input table containing old line-level value information for price adjustments
3223 *	@param	 	p_Line_price_Att_tbl	Input table containing current line-level information for pricing attributes
3224 *	@param	 	p_old_Line_Price_Att_tbl	Input table containing old line-level information for pricing attributes
3225 *	@param	 	p_Line_Adj_Att_tbl	Input table containing current line-level adjustment attributes
3226 *	@param	 	p_old_Line_Adj_Att_tbl	Input table containing old line-level adjustment attributes
3227 *	@param	 	p_Line_Adj_Assoc_tbl	Input table containing current information about relationships between line-level adjustments
3228 *	@param	 	p_old_Line_Adj_Assoc_tbl	Input table containing old information about relationships between line-level adjustments
3229 *	@param	 	p_Line_Scredit_tbl	Input table containing current line-level ID information for sales credits
3230 *	@param	 	p_old_Line_Scredit_tbl	Input table containing old line-level ID information for sales credits
3231 *	@param	 	p_Line_Scredit_val_tbl	Input table containing current line-level value information for sales credits
3232 *	@param	 	p_old_Line_Scredit_val_tbl	Input table containing old line-level value information for sales credits
3233 *	@param	 	p_Line_Payment_tbl	Input table containing current line-level ID information for payments
3234 *	@param	 	p_old_Line_Payment_tbl	Input table containing old line-level ID information for payments
3235 *	@param	 	p_Line_Payment_val_tbl	Input table containing current line-level value information for payments
3236 *	@param	 	p_old_Line_Payment_val_tbl	Input table containing current line-level value information for payments
3237 *	@param	 	p_Lot_Serial_tbl	Input table containing current ID information for lot and serial numbers
3238 *	@param	 	p_old_Lot_Serial_tbl	Input table containing old ID information for lot and serial numbers
3239 *	@param	 	p_Lot_Serial_val_tbl	Input table containing current value information for lot and serial numbers
3240 *	@param	 	p_old_Lot_Serial_val_tbl	Input table containing old value information for lot and serial numbers
3241 *	@param	 	p_action_request_tbl	Input table containing delayed requests
3242 *	@param	 	x_header_rec	Output record structure containing current header-level ID information for an order
3243 *	@param	 	x_header_val_rec	Output record structure containing current header-level value information for an order (if p_return_values was passed as true)
3244 *	@param	 	x_Header_Adj_tbl	Output table containing current header-level ID information for price adjustments
3245 *	@param	 	x_Header_Adj_val_tbl	Output table containing current header-level value information for price adjustments (if p_return_values was passed as true)
3246 *	@param	 	x_Header_price_Att_tbl	Output table containing current header-level information for pricing attributes
3247 *	@param	 	x_Header_Adj_Att_tbl	Output table containing current header-level adjustment attributes
3248 *	@param	 	x_Header_Adj_Assoc_tbl	Output table containing current information about relationships between header-level adjustments
3249 *	@param	 	x_Header_Scredit_tbl	Output table containing current header-level ID information for sales credits
3250 *	@param	 	x_Header_Scredit_val_tbl	Output table containing current header-level value information for sales credits (if p_return_values was passed as true)
3251 *	@param		x_Header_Payment_tbl	Output table containing current header-level ID information for payments
3252 *	@param		x_Header_Payment_val_tbl	Output table containing current header-level value information for payments (if p_return_values was passed as true)
3253 *	@param	 	x_line_tbl	Output table containing current line-level ID information for an order
3254 *	@param	 	x_line_val_tbl	Output table containing current line-level value information for an order (if p_return_values was passed as true)
3255 *	@param	 	x_Line_Adj_tbl	Output table containing current line-level ID information for price adjustments
3256 *	@param	 	x_Line_Adj_val_tbl	Output table containing current line-level value information for price adjustments (if p_return_values was passed as true)
3257 *	@param	 	x_Line_price_Att_tbl	Output table containing current line-level information for pricing attributes
3258 *	@param	 	x_Line_Adj_Att_tbl	Output table containing current line-level adjustment attributes
3259 *	@param	 	x_Line_Adj_Assoc_tbl	Output table containing current information about relationships between line-level adjustments
3260 *	@param	 	x_Line_Scredit_tbl	Output table containing current line-level ID information for sales credits
3261 *	@param	 	x_Line_Scredit_val_tbl	Output table containing current line-level value information for sales credits (if p_return_values was passed as true)
3262 *	@param	 	x_Line_Payment_tbl	Output table containing current line-level ID information for payments
3263 *	@param	 	x_Line_Payment_val_tbl	Output table containing current line-level value information for payments (if p_return_values was passed as true)
3264 *	@param	 	x_Lot_Serial_tbl	Output table containing current ID information for lot and serial numbers
3265 *	@param	 	x_Lot_Serial_val_tbl	Output table containing current value information for lot and serial numbers (if p_return_values was passed as true)
3266 *	@param	 	x_action_request_tbl	Output table containing delayed requests
3267 *	@param		p_rtrim_data	Parameter specifying whether to right-trim the input data
3268 *   @param      p_validate_desc_flex   Parameter specifying whether descriptive flex field validation is to be performed
3269 *   @param      p_header_customer_info_tbl Input table containing new customer/address/contact information to be created
3270 *   @param      p_line_customer_info_tbl   Input table (Line Level) containing new customer/address/contact information to be created
3271 *	@rep:scope	 	public
3272 *	@rep:metalink	 	91798.1	Order Management Suite Documentation
3273 *	@rep:lifecycle	 	active
3274 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3275 *	@rep:displayname	 	Maintain Sales Order
3276 */
3277 PROCEDURE Process_Order
3278 (   p_org_id                        IN  NUMBER  := NULL  --MOAC
3279 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3280 ,   p_api_version_number            IN  NUMBER
3281 ,   p_init_msg_list                 IN  VARCHAR2 := FND_API.G_FALSE
3282 ,   p_return_values                 IN  VARCHAR2 := FND_API.G_FALSE
3283 ,   p_action_commit                 IN  VARCHAR2 := FND_API.G_FALSE
3284 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3285 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3286 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3287 ,   p_header_rec                    IN  Header_Rec_Type :=
3288                                         G_MISS_HEADER_REC
3289 ,   p_old_header_rec                IN  Header_Rec_Type :=
3290                                         G_MISS_HEADER_REC
3291 ,   p_header_val_rec                IN  Header_Val_Rec_Type :=
3292                                         G_MISS_HEADER_VAL_REC
3293 ,   p_old_header_val_rec            IN  Header_Val_Rec_Type :=
3294                                         G_MISS_HEADER_VAL_REC
3295 ,   p_Header_Adj_tbl                IN  Header_Adj_Tbl_Type :=
3296                                         G_MISS_HEADER_ADJ_TBL
3297 ,   p_old_Header_Adj_tbl            IN  Header_Adj_Tbl_Type :=
3298                                         G_MISS_HEADER_ADJ_TBL
3299 ,   p_Header_Adj_val_tbl            IN  Header_Adj_Val_Tbl_Type :=
3300                                         G_MISS_HEADER_ADJ_VAL_TBL
3301 ,   p_old_Header_Adj_val_tbl        IN  Header_Adj_Val_Tbl_Type :=
3302                                         G_MISS_HEADER_ADJ_VAL_TBL
3303 ,   p_Header_price_Att_tbl          IN  Header_Price_Att_Tbl_Type :=
3304                                         G_MISS_HEADER_PRICE_ATT_TBL
3305 ,   p_old_Header_Price_Att_tbl      IN  Header_Price_Att_Tbl_Type :=
3306                                         G_MISS_HEADER_PRICE_ATT_TBL
3307 ,   p_Header_Adj_Att_tbl            IN  Header_Adj_Att_Tbl_Type :=
3308                                         G_MISS_HEADER_ADJ_ATT_TBL
3309 ,   p_old_Header_Adj_Att_tbl        IN  Header_Adj_Att_Tbl_Type :=
3310     G_MISS_HEADER_ADJ_ATT_TBL
3311 ,   p_Header_Adj_Assoc_tbl            IN  Header_Adj_Assoc_Tbl_Type :=
3312                                         G_MISS_HEADER_ADJ_ASSOC_TBL
3313 ,   p_old_Header_Adj_Assoc_tbl        IN  Header_Adj_Assoc_Tbl_Type :=
3314     G_MISS_HEADER_ADJ_ASSOC_TBL
3315 ,   p_Header_Scredit_tbl            IN  Header_Scredit_Tbl_Type :=
3316                                         G_MISS_HEADER_SCREDIT_TBL
3317 ,   p_old_Header_Scredit_tbl        IN  Header_Scredit_Tbl_Type :=
3318                                         G_MISS_HEADER_SCREDIT_TBL
3319 ,   p_Header_Scredit_val_tbl        IN  Header_Scredit_Val_Tbl_Type :=
3320                                         G_MISS_HEADER_SCREDIT_VAL_TBL
3321 ,   p_old_Header_Scredit_val_tbl    IN  Header_Scredit_Val_Tbl_Type :=
3322                                         G_MISS_HEADER_SCREDIT_VAL_TBL
3323 ,   p_Header_Payment_tbl            IN  Header_Payment_Tbl_Type :=
3324                                         G_MISS_HEADER_PAYMENT_TBL
3325 ,   p_old_Header_Payment_tbl        IN  Header_Payment_Tbl_Type :=
3326                                         G_MISS_HEADER_PAYMENT_TBL
3327 ,   p_Header_Payment_val_tbl        IN  Header_Payment_Val_Tbl_Type :=
3328                                         G_MISS_HEADER_PAYMENT_VAL_TBL
3329 ,   p_old_Header_Payment_val_tbl    IN  Header_Payment_Val_Tbl_Type :=
3330                                         G_MISS_HEADER_PAYMENT_VAL_TBL
3331 ,   p_line_tbl                      IN  Line_Tbl_Type :=
3332                                         G_MISS_LINE_TBL
3333 ,   p_old_line_tbl                  IN  Line_Tbl_Type :=
3334                                         G_MISS_LINE_TBL
3335 ,   p_line_val_tbl                  IN  Line_Val_Tbl_Type :=
3336                                         G_MISS_LINE_VAL_TBL
3337 ,   p_old_line_val_tbl              IN  Line_Val_Tbl_Type :=
3338                                         G_MISS_LINE_VAL_TBL
3339 ,   p_Line_Adj_tbl                  IN  Line_Adj_Tbl_Type :=
3340                                         G_MISS_LINE_ADJ_TBL
3341 ,   p_old_Line_Adj_tbl              IN  Line_Adj_Tbl_Type :=
3342                                         G_MISS_LINE_ADJ_TBL
3343 ,   p_Line_Adj_val_tbl              IN  Line_Adj_Val_Tbl_Type :=
3344                                         G_MISS_LINE_ADJ_VAL_TBL
3345 ,   p_old_Line_Adj_val_tbl          IN  Line_Adj_Val_Tbl_Type :=
3346                                         G_MISS_LINE_ADJ_VAL_TBL
3347 ,   p_Line_price_Att_tbl            IN  Line_Price_Att_Tbl_Type :=
3348                                         G_MISS_LINE_PRICE_ATT_TBL
3349 ,   p_old_Line_Price_Att_tbl        IN  Line_Price_Att_Tbl_Type :=
3350                                         G_MISS_LINE_PRICE_ATT_TBL
3351 ,   p_Line_Adj_Att_tbl              IN  Line_Adj_Att_Tbl_Type :=
3352                                         G_MISS_LINE_ADJ_ATT_TBL
3353 ,   p_old_Line_Adj_Att_tbl          IN  Line_Adj_Att_Tbl_Type :=
3354     G_MISS_LINE_ADJ_ATT_TBL
3355 ,   p_Line_Adj_Assoc_tbl              IN  Line_Adj_Assoc_Tbl_Type :=
3356                                         G_MISS_LINE_ADJ_ASSOC_TBL
3357 ,   p_old_Line_Adj_Assoc_tbl          IN  Line_Adj_Assoc_Tbl_Type :=
3358     G_MISS_LINE_ADJ_ASSOC_TBL
3359 ,   p_Line_Scredit_tbl              IN  Line_Scredit_Tbl_Type :=
3360                                         G_MISS_LINE_SCREDIT_TBL
3361 ,   p_old_Line_Scredit_tbl          IN  Line_Scredit_Tbl_Type :=
3362                                         G_MISS_LINE_SCREDIT_TBL
3363 ,   p_Line_Scredit_val_tbl          IN  Line_Scredit_Val_Tbl_Type :=
3364                                         G_MISS_LINE_SCREDIT_VAL_TBL
3365 ,   p_old_Line_Scredit_val_tbl      IN  Line_Scredit_Val_Tbl_Type :=
3366                                         G_MISS_LINE_SCREDIT_VAL_TBL
3367 ,   p_Line_Payment_tbl              IN  Line_Payment_Tbl_Type :=
3368                                         G_MISS_LINE_PAYMENT_TBL
3369 ,   p_old_Line_Payment_tbl          IN  Line_Payment_Tbl_Type :=
3370                                         G_MISS_LINE_PAYMENT_TBL
3371 ,   p_Line_Payment_val_tbl          IN  Line_Payment_Val_Tbl_Type :=
3372                                         G_MISS_LINE_PAYMENT_VAL_TBL
3373 ,   p_old_Line_Payment_val_tbl      IN  Line_Payment_Val_Tbl_Type :=
3374                                         G_MISS_LINE_PAYMENT_VAL_TBL
3375 ,   p_Lot_Serial_tbl                IN  Lot_Serial_Tbl_Type :=
3376                                         G_MISS_LOT_SERIAL_TBL
3377 ,   p_old_Lot_Serial_tbl            IN  Lot_Serial_Tbl_Type :=
3378                                         G_MISS_LOT_SERIAL_TBL
3379 ,   p_Lot_Serial_val_tbl            IN  Lot_Serial_Val_Tbl_Type :=
3380                                         G_MISS_LOT_SERIAL_VAL_TBL
3381 ,   p_old_Lot_Serial_val_tbl        IN  Lot_Serial_Val_Tbl_Type :=
3382                                         G_MISS_LOT_SERIAL_VAL_TBL
3383 ,   p_action_request_tbl	    IN  Request_Tbl_Type :=
3384 					G_MISS_REQUEST_TBL
3385 ,   x_header_rec                    OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
3386 ,   x_header_val_rec                OUT NOCOPY /* file.sql.39 change */ Header_Val_Rec_Type
3387 ,   x_Header_Adj_tbl                OUT NOCOPY /* file.sql.39 change */ Header_Adj_Tbl_Type
3388 ,   x_Header_Adj_val_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Val_Tbl_Type
3389 ,   x_Header_price_Att_tbl          OUT NOCOPY /* file.sql.39 change */ Header_Price_Att_Tbl_Type
3390 ,   x_Header_Adj_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Att_Tbl_Type
3391 ,   x_Header_Adj_Assoc_tbl          OUT NOCOPY /* file.sql.39 change */ Header_Adj_Assoc_Tbl_Type
3392 ,   x_Header_Scredit_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Tbl_Type
3393 ,   x_Header_Scredit_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Val_Tbl_Type
3394 ,   x_Header_Payment_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Payment_Tbl_Type
3395 ,   x_Header_Payment_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Payment_Val_Tbl_Type
3396 ,   x_line_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
3397 ,   x_line_val_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Val_Tbl_Type
3398 ,   x_Line_Adj_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Adj_Tbl_Type
3399 ,   x_Line_Adj_val_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Val_Tbl_Type
3400 ,   x_Line_price_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Line_Price_Att_Tbl_Type
3401 ,   x_Line_Adj_Att_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Att_Tbl_Type
3402 ,   x_Line_Adj_Assoc_tbl            OUT NOCOPY /* file.sql.39 change */ Line_Adj_Assoc_Tbl_Type
3403 ,   x_Line_Scredit_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Tbl_Type
3404 ,   x_Line_Scredit_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Val_Tbl_Type
3405 ,   x_Line_Payment_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Payment_Tbl_Type
3406 ,   x_Line_Payment_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Payment_Val_Tbl_Type
3407 ,   x_Lot_Serial_tbl                OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Tbl_Type
3408 ,   x_Lot_Serial_val_tbl            OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Val_Tbl_Type
3409 ,   x_action_request_tbl	    OUT NOCOPY /* file.sql.39 change */ Request_Tbl_Type
3410 --For bug 3390458
3411 ,   p_rtrim_data                    IN  Varchar2 :='N'
3412 ,   p_validate_desc_flex            in varchar2 default 'Y' -- bug4343612
3413 --ER7675548
3414 ,   p_header_customer_info_tbl      IN OE_ORDER_PUB.CUSTOMER_INFO_TABLE_TYPE :=
3415                                          OE_ORDER_PUB.G_MISS_CUSTOMER_INFO_TBL
3416 ,   p_line_customer_info_tbl        IN OE_ORDER_PUB.CUSTOMER_INFO_TABLE_TYPE :=
3417                                        OE_ORDER_PUB.G_MISS_CUSTOMER_INFO_TBL
3418 );
3419 
3420 /*#
3421 * Use this procedure to lock a sales order in the Order Management System.  Sales orders cannot be modified while locked.
3422 * In case Order-To-Cash PIP is installed or OE_INBOUND_INT.Process_Order(...) is in use,
3423 * DO NOT use this API to generate WSDL. Otherwise, OE_INBOUND_INT.Process_Order() may become invalid
3424 * and break Order-To-Cash PIP.
3425 *	@param	 	p_api_version_number	API version used to check call compatibility
3426 *	@param	 	p_init_msg_list	Boolean which determines whether internal message tables should be initialized
3427 *	@param	 	p_return_values	Boolean which determines whether ids should be converted to values for population in the output value parameters
3428 *   @param      p_org_id   Input OU Organization Id
3429 *   @param      p_operating_unit   Input Operating Unit Name
3430 *	@param	 	x_return_status	Return status of API call
3431 *	@param	 	x_msg_count	Number of stored processing messages
3432 *	@param	 	x_msg_data	Processing message data
3433 *	@param	 	p_header_rec	Input record structure containing header-level ID information for an order
3434 *	@param	 	p_header_val_rec	Input record structure containing header-level value information for an order
3435 *	@param	 	p_Header_Adj_tbl	Input table containing header-level ID information for price adjustments
3436 *	@param	 	p_Header_Adj_val_tbl	Input table containing header-level value information for price adjustments
3437 *	@param	 	p_Header_price_Att_tbl	Input table containing header-level information for pricing attributes
3438 *	@param	 	p_Header_Adj_Att_tbl	Input table containing header-level adjustment attributes
3439 *	@param	 	p_Header_Adj_Assoc_tbl	Input table containing information about relationships between header-level adjustments
3440 *	@param	 	p_Header_Scredit_tbl	Input table containing header-level ID information for sales credits
3441 *	@param	 	p_Header_Scredit_val_tbl	Input table containing header-level value information for sales credits
3442 *	@param		p_Header_Payment_tbl	Input table containing current header-level ID information for payments
3443 *	@param		p_Header_Payment_val_tbl	Input table containing current header-level value information for payments
3444 *	@param	 	p_line_tbl	Input table containing line-level ID information for an order
3445 *	@param	 	p_line_val_tbl	Input table containing line-level value information for an order
3446 *	@param	 	p_Line_Adj_tbl	Input table containing line-level ID information for price adjustments
3447 *	@param	 	p_Line_Adj_val_tbl	Input table containing line-level value information for price adjustments
3448 *	@param	 	p_Line_price_Att_tbl	Input table containing line-level information for pricing attributes
3449 *	@param	 	p_Line_Adj_Att_tbl	Input table containing line-level adjustment attributes
3450 *	@param	 	p_Line_Adj_Assoc_tbl	Input table containing information about relationships between line-level adjustments
3451 *	@param	 	p_Line_Scredit_tbl	Input table containing line-level ID information for sales credits
3452 *	@param	 	p_Line_Scredit_val_tbl	Input table containing line-level value information for sales credits
3453 *	@param		p_Line_Payment_tbl	Input table containing current line-level ID information for payments
3454 *	@param		p_Line_Payment_val_tbl	Input table containing current line-level value information for payments
3455 *	@param	 	p_Lot_Serial_tbl	Input table containing ID information for lot and serial numbers
3456 *	@param	 	p_Lot_Serial_val_tbl	Input table containing value information for lot and serial numbers
3457 *	@param	 	x_header_rec	Output record structure containing header-level ID information for an order
3458 *	@param	 	x_header_val_rec	Output record structure containing header-level value information for an order (if p_return_values was passed as true)
3459 *	@param	 	x_Header_Adj_tbl	Output table containing header-level ID information for price adjustments
3460 *	@param	 	x_Header_Adj_val_tbl	Output table containing header-level value information for price adjustments (if p_return_values was passed as true)
3461 *	@param	 	x_Header_price_Att_tbl	Output table containing header-level information for pricing attributes
3462 *	@param	 	x_Header_Adj_Att_tbl	Output table containing header-level adjustment attributes
3463 *	@param	 	x_Header_Adj_Assoc_tbl	Output table containing information about relationships between header-level adjustments
3464 *	@param	 	x_Header_Scredit_tbl	Output table containing header-level ID information for sales credits
3465 *	@param	 	x_Header_Scredit_val_tbl	Output table containing header-level value information for sales credits (if p_return_values was passed as true)
3466 *	@param		x_Header_Payment_tbl	Output table containing current header-level ID information for payments
3467 *	@param		x_Header_Payment_val_tbl	Output table containing current header-level value information for payments (if p_return_values was passed as true)
3468 *	@param	 	x_line_tbl	Output table containing line-level ID information for an order
3469 *	@param	 	x_line_val_tbl	Output table containing line-level value information for an order (if p_return_values was passed as true)
3470 *	@param	 	x_Line_Adj_tbl	Output table containing line-level ID information for price adjustments
3471 *	@param	 	x_Line_Adj_val_tbl	Output table containing line-level value information for price adjustments (if p_return_values was passed as true)
3472 *	@param	 	x_Line_price_Att_tbl	Output table containing line-level information for pricing attributes
3473 *	@param	 	x_Line_Adj_Att_tbl	Output table containing line-level adjustment attributes
3474 *	@param	 	x_Line_Adj_Assoc_tbl	Output table containing information about relationships between line-level adjustments
3475 *	@param	 	x_Line_Scredit_tbl	Output table containing line-level ID information for sales credits
3476 *	@param	 	x_Line_Scredit_val_tbl	Output table containing line-level value information for sales credits (if p_return_values was passed as true)
3477 *	@param		x_Line_Payment_tbl	Output table containing current line-level ID information for payments
3478 *	@param		x_Line_Payment_val_tbl	Output table containing current line-level value information for payments (if p_return_values was passed as true)
3479 *	@param	 	x_Lot_Serial_tbl	Output table containing ID information for lot and serial numbers
3480 *	@param	 	x_Lot_Serial_val_tbl	Output table containing value information for lot and serial numbers (if p_return_values was passed as true)
3481 *	@rep:scope	 	public
3482 *	@rep:lifecycle	 	active
3483 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3484 *	@rep:displayname	 	Lock Sales Order
3485  */
3486 PROCEDURE Lock_Order
3487 (   p_api_version_number            IN  NUMBER
3488 ,   p_init_msg_list                 IN  VARCHAR2 := FND_API.G_FALSE
3489 ,   p_return_values                 IN  VARCHAR2 := FND_API.G_FALSE
3490 ,  p_org_id                        IN  NUMBER := NULL  --MOAC
3491 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3492 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3493 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3494 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3495 ,   p_header_rec                    IN  Header_Rec_Type :=
3496                                         G_MISS_HEADER_REC
3497 ,   p_header_val_rec                IN  Header_Val_Rec_Type :=
3498                                         G_MISS_HEADER_VAL_REC
3499 ,   p_Header_Adj_tbl                IN  Header_Adj_Tbl_Type :=
3500                                         G_MISS_HEADER_ADJ_TBL
3501 ,   p_Header_Adj_val_tbl            IN  Header_Adj_Val_Tbl_Type :=
3502                                         G_MISS_HEADER_ADJ_VAL_TBL
3503 ,   p_Header_price_Att_tbl          IN  Header_Price_Att_Tbl_Type :=
3504                                         G_MISS_HEADER_PRICE_ATT_TBL
3505 ,   p_Header_Adj_Att_tbl            IN  Header_Adj_Att_Tbl_Type :=
3506                                         G_MISS_HEADER_ADJ_ATT_TBL
3507 ,   p_Header_Adj_Assoc_tbl            IN  Header_Adj_Assoc_Tbl_Type :=
3508                                         G_MISS_HEADER_ADJ_ASSOC_TBL
3509 ,   p_Header_Scredit_tbl            IN  Header_Scredit_Tbl_Type :=
3510                                         G_MISS_HEADER_SCREDIT_TBL
3511 ,   p_Header_Scredit_val_tbl        IN  Header_Scredit_Val_Tbl_Type :=
3512                                         G_MISS_HEADER_SCREDIT_VAL_TBL
3513 ,   p_Header_Payment_tbl            IN  Header_Payment_Tbl_Type :=
3514                                         G_MISS_HEADER_PAYMENT_TBL
3515 ,   p_Header_Payment_val_tbl        IN  Header_Payment_Val_Tbl_Type :=
3516                                         G_MISS_HEADER_PAYMENT_VAL_TBL
3517 ,   p_line_tbl                      IN  Line_Tbl_Type :=
3518                                         G_MISS_LINE_TBL
3519 ,   p_line_val_tbl                  IN  Line_Val_Tbl_Type :=
3520                                         G_MISS_LINE_VAL_TBL
3521 ,   p_Line_Adj_tbl                  IN  Line_Adj_Tbl_Type :=
3522                                         G_MISS_LINE_ADJ_TBL
3523 ,   p_Line_Adj_val_tbl              IN  Line_Adj_Val_Tbl_Type :=
3524                                         G_MISS_LINE_ADJ_VAL_TBL
3525 ,   p_Line_price_Att_tbl            IN  Line_Price_Att_Tbl_Type :=
3526                                         G_MISS_LINE_PRICE_ATT_TBL
3527 ,   p_Line_Adj_Att_tbl              IN  Line_Adj_Att_Tbl_Type :=
3528                                         G_MISS_LINE_ADJ_ATT_TBL
3529 ,   p_Line_Adj_Assoc_tbl              IN  Line_Adj_Assoc_Tbl_Type :=
3530                                         G_MISS_LINE_ADJ_ASSOC_TBL
3531 ,   p_Line_Scredit_tbl              IN  Line_Scredit_Tbl_Type :=
3532                                         G_MISS_LINE_SCREDIT_TBL
3533 ,   p_Line_Scredit_val_tbl          IN  Line_Scredit_Val_Tbl_Type :=
3534                                         G_MISS_LINE_SCREDIT_VAL_TBL
3535 ,   p_Line_Payment_tbl              IN  Line_Payment_Tbl_Type :=
3536                                         G_MISS_LINE_PAYMENT_TBL
3537 ,   p_Line_Payment_val_tbl          IN  Line_Payment_Val_Tbl_Type :=
3538                                         G_MISS_LINE_PAYMENT_VAL_TBL
3539 ,   p_Lot_Serial_tbl                IN  Lot_Serial_Tbl_Type :=
3540                                         G_MISS_LOT_SERIAL_TBL
3541 ,   p_Lot_Serial_val_tbl            IN  Lot_Serial_Val_Tbl_Type :=
3542                                         G_MISS_LOT_SERIAL_VAL_TBL
3543 ,   x_header_rec                    OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
3544 ,   x_header_val_rec                OUT NOCOPY /* file.sql.39 change */ Header_Val_Rec_Type
3545 ,   x_Header_Adj_tbl                OUT NOCOPY /* file.sql.39 change */ Header_Adj_Tbl_Type
3546 ,   x_Header_Adj_val_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Val_Tbl_Type
3547 ,   x_Header_price_Att_tbl          OUT NOCOPY /* file.sql.39 change */ Header_Price_Att_Tbl_Type
3548 ,   x_Header_Adj_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Att_Tbl_Type
3549 ,   x_Header_Adj_Assoc_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Assoc_Tbl_Type
3550 ,   x_Header_Scredit_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Tbl_Type
3551 ,   x_Header_Scredit_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Val_Tbl_Type
3552 ,   x_Header_Payment_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Payment_Tbl_Type
3553 ,   x_Header_Payment_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Payment_Val_Tbl_Type
3554 ,   x_line_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
3555 ,   x_line_val_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Val_Tbl_Type
3556 ,   x_Line_Adj_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Adj_Tbl_Type
3557 ,   x_Line_Adj_val_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Val_Tbl_Type
3558 ,   x_Line_price_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Line_Price_Att_Tbl_Type
3559 ,   x_Line_Adj_Att_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Att_Tbl_Type
3560 ,   x_Line_Adj_Assoc_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Assoc_Tbl_Type
3561 ,   x_Line_Scredit_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Tbl_Type
3562 ,   x_Line_Scredit_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Val_Tbl_Type
3563 ,   x_Line_Payment_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Payment_Tbl_Type
3564 ,   x_Line_Payment_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Payment_Val_Tbl_Type
3565 ,   x_Lot_Serial_tbl                OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Tbl_Type
3566 ,   x_Lot_Serial_val_tbl            OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Val_Tbl_Type
3567 );
3568 
3569 /*#
3570 * Use this procedure to retrieve the information about a Sales Order, including price adjustments, pricing attributes, sales credits, payments, and lot and serial number information for return lines.
3571 * In case Order-To-Cash PIP is installed or OE_INBOUND_INT.Process_Order(...) is in use,
3572 * DO NOT use this API to generate WSDL. Otherwise, OE_INBOUND_INT.Process_Order() may become invalid
3573 * and break Order-To-Cash PIP.
3574 *	@param	 	p_api_version_number	API version used to check call compatibility
3575 *	@param	 	p_init_msg_list	Boolean which determines whether internal message tables should be initialized
3576 *	@param	 	p_return_values	Boolean which determines whether ids should be converted to values for population in the output value parameters
3577 *	@param	 	x_return_status	Return status of API call
3578 *	@param	 	x_msg_count	Number of stored processing messages
3579 *	@param	 	x_msg_data	Processing message data
3580 *	@param	 	p_header_id	Input Header ID
3581 *	@param	 	p_header	Input record structure containing header-level ID information for an order
3582 *   @param      p_org_id    Input OU Organization Id
3583 *   @param      p_operating_unit   Input Operating Unit Name
3584 *	@param	 	x_header_rec	Output record structure containing header-level ID information for an order
3585 *	@param	 	x_header_val_rec	Output record structure containing header-level value information for an order (if p_return_values was passed as true)
3586 *	@param	 	x_Header_Adj_tbl	Output table containing header-level ID information for price adjustments
3587 *	@param	 	x_Header_Adj_val_tbl	Output table containing header-level value information for price adjustments (if p_return_values was passed as true)
3588 *	@param	 	x_Header_price_Att_tbl	Output table containing header-level information for pricing attributes
3589 *	@param	 	x_Header_Adj_Att_tbl	Output table containing header-level adjustment attributes
3590 *	@param	 	x_Header_Adj_Assoc_tbl	Output table containing information about relationships between header-level adjustments
3591 *	@param	 	x_Header_Scredit_tbl	Output table containing header-level ID information for sales credits
3592 *	@param	 	x_Header_Scredit_val_tbl	Output table containing header-level value information for sales credits (if p_return_values was passed as true)
3593 *	@param		x_Header_Payment_tbl	Output table containing current header-level ID information for payments
3594 *	@param		x_Header_Payment_val_tbl	Output table containing current header-level value information for payments (if p_return_values was passed as true)
3595 *	@param	 	x_line_tbl	Output table containing line-level ID information for an order
3596 *	@param	 	x_line_val_tbl	Output table containing line-level value information for an order (if p_return_values was passed as true)
3597 *	@param	 	x_Line_Adj_tbl	Output table containing line-level ID information for price adjustments
3598 *	@param	 	x_Line_Adj_val_tbl	Output table containing line-level value information for price adjustments (if p_return_values was passed as true)
3599 *	@param	 	x_Line_price_Att_tbl	Output table containing line-level information for pricing attributes
3600 *	@param	 	x_Line_Adj_Att_tbl	Output table containing line-level adjustment attributes
3601 *	@param	 	x_Line_Adj_Assoc_tbl	Output table containing information about relationships between line-level adjustments
3602 *	@param	 	x_Line_Scredit_tbl	Output table containing line-level ID information for sales credits
3603 *	@param	 	x_Line_Scredit_val_tbl	Output table containing line-level value information for sales credits (if p_return_values was passed as true)
3604 *	@param		x_Line_Payment_tbl	Output table containing current line-level ID information for payments
3605 *	@param		x_Line_Payment_val_tbl	Output table containing current line-level value information for payments (if p_return_values was passed as true)
3606 *	@param	 	x_Lot_Serial_tbl	Output table containing ID information for lot and serial numbers
3607 *	@param	 	x_Lot_Serial_val_tbl	Output table containing value information for lot and serial numbers (if p_return_values was passed as true)
3608 *	@rep:scope	 	public
3609 *	@rep:lifecycle	 	active
3610 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3611 *	@rep:displayname	 	Get Sales Order
3612 */
3613 PROCEDURE Get_Order
3614 (   p_api_version_number            IN  NUMBER
3615 ,   p_init_msg_list                 IN  VARCHAR2 := FND_API.G_FALSE
3616 ,   p_return_values                 IN  VARCHAR2 := FND_API.G_FALSE
3617 ,   x_return_status                 OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3618 ,   x_msg_count                     OUT NOCOPY /* file.sql.39 change */ NUMBER
3619 ,   x_msg_data                      OUT NOCOPY /* file.sql.39 change */ VARCHAR2
3620 ,   p_header_id                     IN  NUMBER :=
3621                                         FND_API.G_MISS_NUM
3622 ,   p_header                        IN  VARCHAR2 :=
3623                                         FND_API.G_MISS_CHAR
3624 , p_org_id                        IN  NUMBER := NULL  --MOAC
3625 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3626 
3627 ,   x_header_rec                    OUT NOCOPY /* file.sql.39 change */ Header_Rec_Type
3628 ,   x_header_val_rec                OUT NOCOPY /* file.sql.39 change */ Header_Val_Rec_Type
3629 ,   x_Header_Adj_tbl                OUT NOCOPY /* file.sql.39 change */ Header_Adj_Tbl_Type
3630 ,   x_Header_Adj_val_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Val_Tbl_Type
3631 ,   x_Header_price_Att_tbl          OUT NOCOPY /* file.sql.39 change */ Header_Price_Att_Tbl_Type
3632 ,   x_Header_Adj_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Att_Tbl_Type
3633 ,   x_Header_Adj_Assoc_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Assoc_Tbl_Type
3634 ,   x_Header_Scredit_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Tbl_Type
3635 ,   x_Header_Scredit_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Val_Tbl_Type
3636 ,   x_Header_Payment_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Payment_Tbl_Type
3637 ,   x_Header_Payment_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Payment_Val_Tbl_Type
3638 ,   x_line_tbl                      OUT NOCOPY /* file.sql.39 change */ Line_Tbl_Type
3639 ,   x_line_val_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Val_Tbl_Type
3640 ,   x_Line_Adj_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Adj_Tbl_Type
3641 ,   x_Line_Adj_val_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Val_Tbl_Type
3642 ,   x_Line_price_Att_tbl            OUT NOCOPY /* file.sql.39 change */ Line_Price_Att_Tbl_Type
3643 ,   x_Line_Adj_Att_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Att_Tbl_Type
3644 ,   x_Line_Adj_Assoc_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Assoc_Tbl_Type
3645 ,   x_Line_Scredit_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Tbl_Type
3646 ,   x_Line_Scredit_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Val_Tbl_Type
3647 ,   x_Line_Payment_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Payment_Tbl_Type
3648 ,   x_Line_Payment_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Payment_Val_Tbl_Type
3649 ,   x_Lot_Serial_tbl                OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Tbl_Type
3650 ,   x_Lot_Serial_val_tbl            OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Val_Tbl_Type
3651 );
3652 
3653 /*#
3654 * Use this procedure to retrieve sales order attribute values when supplying the ID information for those attributes.  For instance, the Sold To Organization ID could be provided in order to retrieve the Sold To Organization name.
3655 * In case Order-To-Cash PIP is installed or OE_INBOUND_INT.Process_Order(...) is in use,
3656 * DO NOT use this API to generate WSDL. Otherwise, OE_INBOUND_INT.Process_Order() may become invalid
3657 * and break Order-To-Cash PIP.
3658 *	@param	 	p_header_rec	Input record structure containing header-level ID information for an order
3659 *	@param	 	p_Header_Adj_tbl	Input table containing header-level ID information for price adjustments
3660 *	@param	 	p_Header_Scredit_tbl	Input table containing header-level ID information for sales credits
3661 *	@param		p_Header_Payment_tbl	Input table containing current header-level ID information for payments
3662 *	@param	 	p_line_tbl	Input table containing line-level ID information for an order
3663 *	@param	 	p_Line_Adj_tbl	Input table containing line-level ID information for price adjustments
3664 *	@param	 	p_Line_Scredit_tbl	Input table containing line-level ID information for sales credits
3665 *	@param		p_Line_Payment_tbl	Input table containing current line-level ID information for payments
3666 *	@param		p_Lot_Serial_tbl	Input table containing id information for lot serials
3667 *   @param      p_org_id   Input OU Organization Id
3668 *   @param      p_operating_unit   Input Operating Unit Name
3669 *	@param	 	x_header_val_rec	Output record structure containing header-level value information for an order
3670 *	@param	 	x_Header_Adj_val_tbl	Output table containing header-level value information for price adjustments
3671 *	@param	 	x_Header_Scredit_val_tbl	Output table containing header-level value information for sales credits
3672 *	@param		x_Header_Payment_val_tbl	Output table containing current header-level value information for payments
3673 *	@param	 	x_line_val_tbl	Output table containing line-level value information for an order
3674 *	@param	 	x_Line_Adj_val_tbl	Output table containing line-level value information for price adjustments
3675 *	@param	 	x_Line_Scredit_val_tbl	Output table containing line-level value information for sales credits
3676 *	@param		x_Line_Payment_val_tbl	Output table containing current line-level value information for payments
3677 *	@param	 	x_Lot_Serial_val_tbl	Output table containing value information for lot and serial numbers
3678 *	@rep:scope	 	public
3679 *	@rep:lifecycle	 	active
3680 *	@rep:category	BUSINESS_ENTITY	ONT_SALES_ORDER
3681 *	@rep:displayname	 	ID To Value
3682 */
3683 PROCEDURE Id_To_Value
3684 (   p_header_rec                    IN  Header_Rec_Type
3685 ,   p_Header_Adj_tbl                IN  Header_Adj_Tbl_Type
3686 ,   p_Header_Scredit_tbl            IN  Header_Scredit_Tbl_Type
3687 ,   p_Header_Payment_tbl            IN  Header_Payment_Tbl_Type
3688 ,   p_line_tbl                      IN  Line_Tbl_Type
3689 ,   p_Line_Adj_tbl                  IN  Line_Adj_Tbl_Type
3690 ,   p_Line_Scredit_tbl              IN  Line_Scredit_Tbl_Type
3691 ,   p_Line_Payment_tbl              IN  Line_Payment_Tbl_Type
3692 ,   p_Lot_Serial_tbl                IN  Lot_Serial_Tbl_Type
3693 , p_org_id                        IN  NUMBER := NULL  --MOAC
3694 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3695 
3696 ,   x_header_val_rec                OUT NOCOPY /* file.sql.39 change */ Header_Val_Rec_Type
3697 ,   x_Header_Adj_val_tbl            OUT NOCOPY /* file.sql.39 change */ Header_Adj_Val_Tbl_Type
3698 ,   x_Header_Scredit_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Scredit_Val_Tbl_Type
3699 ,   x_Header_Payment_val_tbl        OUT NOCOPY /* file.sql.39 change */ Header_Payment_Val_Tbl_Type
3700 ,   x_line_val_tbl                  OUT NOCOPY /* file.sql.39 change */ Line_Val_Tbl_Type
3701 ,   x_Line_Adj_val_tbl              OUT NOCOPY /* file.sql.39 change */ Line_Adj_Val_Tbl_Type
3702 ,   x_Line_Scredit_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Scredit_Val_Tbl_Type
3703 ,   x_Line_Payment_val_tbl          OUT NOCOPY /* file.sql.39 change */ Line_Payment_Val_Tbl_Type
3704 ,   x_Lot_Serial_val_tbl            OUT NOCOPY /* file.sql.39 change */ Lot_Serial_Val_Tbl_Type
3705 );
3706 
3707 Procedure Process_MACD_Order
3708 (p_api_version_number     IN  NUMBER,
3709  p_organization_id        IN  NUMBER,
3710  p_sold_to_org_id         IN  NUMBER,
3711  p_header_id              IN  NUMBER,
3712  p_MACD_Action            IN  VARCHAR2,
3713  p_Instance_Tbl           IN  csi_datastructures_pub.instance_cz_tbl,
3714  p_x_line_tbl             IN  OUT NOCOPY Line_Tbl_Type,
3715  p_Extended_Attrib_Tbl    IN  csi_datastructures_pub.ext_attrib_values_tbl,
3716  p_org_id                        IN  NUMBER := NULL  --MOAC
3717 ,   p_operating_unit                IN  VARCHAR2 := NULL -- MOAC
3718 
3719 ,x_container_line_id      OUT NOCOPY NUMBER,
3720  x_return_status          OUT NOCOPY VARCHAR2,
3721  x_msg_count              OUT NOCOPY VARCHAR2,
3722  x_msg_data               OUT NOCOPY VARCHAR2
3723 );
3724 
3725 
3726 END OE_Order_PUB;