DBA Data[Home] [Help]

PACKAGE: APPS.OE_ORDER_PUB

Source


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