DBA Data[Home] [Help]

PACKAGE BODY: APPS.OZF_RESALE_LINES_INT_PKG

Source


1 PACKAGE BODY OZF_RESALE_LINES_INT_PKG as
2 /* $Header: ozftrlib.pls 120.4 2010/10/21 09:39:39 muthsubr ship $ */
3 -- ===============================================================
4 -- Start of Comments
5 -- Package name
6 --          OZF_RESALE_LINES_INT_PKG
7 -- Purpose
8 --
9 -- History
10 -- Anuj Teotia              28/05/2007       bug # 5997978 fixed
11 -- Muthuganesh              13/10/2010       bug # 9447673 fixed
12 -- NOTE
13 --
14 -- End of Comments
15 -- ===============================================================
16 
17 
18 G_PKG_NAME CONSTANT VARCHAR2(30):= 'OZF_RESALE_LINES_INT_PKG';
19 G_FILE_NAME CONSTANT VARCHAR2(12) := 'ozftrlib.pls';
20 
21 
22 ----------------------------------------------------------
23 ----          MEDIA           ----
24 ----------------------------------------------------------
25 
26 --  ========================================================
27 --
28 --  NAME
29 --  createInsertBody
30 --
31 --  PURPOSE
32 --
33 --  NOTES
34 --
35 --  HISTORY
36 --
37 --  ========================================================
38 PROCEDURE Insert_Row(
39           px_resale_line_int_id   IN OUT NOCOPY NUMBER,
40           px_object_version_number   IN OUT NOCOPY NUMBER,
41           p_last_update_date    DATE,
42           p_last_updated_by    NUMBER,
43           p_creation_date    DATE,
44           p_request_id    NUMBER,
45           p_created_by    NUMBER,
46           p_created_from    VARCHAR2,
47           p_last_update_login    NUMBER,
48           p_program_application_id    NUMBER,
49           p_program_update_date    DATE,
50           p_program_id    NUMBER,
51           p_response_type    VARCHAR2,
52           p_response_code    VARCHAR2,
53           p_reject_reason_code    VARCHAR2,
54           p_followup_action_code    VARCHAR2,
55           p_resale_transfer_type    VARCHAR2,
56           p_product_trans_movement_type    VARCHAR2,
57           p_product_transfer_date    DATE,
58           p_resale_batch_id    NUMBER,
59           p_status_code    VARCHAR2,
60           p_end_cust_party_id    NUMBER,
61           p_end_cust_site_use_id    NUMBER,
62           p_end_cust_site_use_code    VARCHAR2,
63           p_end_cust_party_site_id    NUMBER,
64           p_end_cust_party_name    VARCHAR2,
65           p_end_cust_location    VARCHAR2,
66           p_end_cust_address    VARCHAR2,
67           p_end_cust_city    VARCHAR2,
68           p_end_cust_state    VARCHAR2,
69           p_end_cust_postal_code    VARCHAR2,
70           p_end_cust_country    VARCHAR2,
71           p_end_cust_contact_party_id   NUMBER,
72           p_end_cust_contact_name    VARCHAR2,
73           p_end_cust_email    VARCHAR2,
74           p_end_cust_phone    VARCHAR2,
75           p_end_cust_fax    VARCHAR2,
76           p_bill_to_cust_account_id    NUMBER,
77           p_bill_to_site_use_id    NUMBER,
78           p_bill_to_PARTY_NAME    VARCHAR2,
79           p_bill_to_PARTY_ID      NUMBER,
80           p_bill_to_PARTY_site_id NUMBER,
81           p_bill_to_location    VARCHAR2,
82 	  p_bill_to_duns_number varchar2,
83           p_bill_to_address    VARCHAR2,
84           p_bill_to_city    VARCHAR2,
85           p_bill_to_state    VARCHAR2,
86           p_bill_to_postal_code    VARCHAR2,
87           p_bill_to_country    VARCHAR2,
88 	  p_bill_to_contact_party_id   NUMBER,
89           p_bill_to_contact_name    VARCHAR2,
90           p_bill_to_email    VARCHAR2,
91           p_bill_to_phone    VARCHAR2,
92           p_bill_to_fax    VARCHAR2,
93 	  p_ship_to_cust_account_id    NUMBER,
94           p_ship_to_site_use_id    NUMBER,
95           p_ship_to_PARTY_NAME    VARCHAR2,
96 	  p_ship_to_PARTY_ID      NUMBER,
97           p_ship_to_PARTY_site_id NUMBER,
98           p_ship_to_duns_number varchar2,
99           p_ship_to_location    VARCHAR2,
100           p_ship_to_address    VARCHAR2,
101           p_ship_to_city    VARCHAR2,
102           p_ship_to_state    VARCHAR2,
103           p_ship_to_postal_code    VARCHAR2,
104           p_ship_to_country    VARCHAR2,
105 	  p_ship_to_contact_party_id   NUMBER,
106           p_ship_to_contact_name    VARCHAR2,
107           p_ship_to_email    VARCHAR2,
108           p_ship_to_phone    VARCHAR2,
109           p_ship_to_fax    VARCHAR2,
110 	  p_ship_from_cust_account_id    NUMBER,
111           p_ship_from_site_id    NUMBER,
112           p_ship_from_PARTY_NAME    VARCHAR2,
113           p_ship_from_location    VARCHAR2,
114           p_ship_from_address    VARCHAR2,
115           p_ship_from_city    VARCHAR2,
116           p_ship_from_state    VARCHAR2,
117           p_ship_from_postal_code    VARCHAR2,
118           p_ship_from_country    VARCHAR2,
119           p_ship_from_contact_party_id   NUMBER,
120 	  p_ship_from_contact_name    VARCHAR2,
121           p_ship_from_email    VARCHAR2,
122           p_ship_from_phone    VARCHAR2,
123           p_ship_from_fax    VARCHAR2,
124 	  p_sold_from_cust_account_id    NUMBER,
125           p_sold_from_site_id    NUMBER,
126           p_sold_from_PARTY_NAME    VARCHAR2,
127           p_sold_from_location    VARCHAR2,
128           p_sold_from_address    VARCHAR2,
129           p_sold_from_city    VARCHAR2,
130           p_sold_from_state    VARCHAR2,
131           p_sold_from_postal_code    VARCHAR2,
132           p_sold_from_country    VARCHAR2,
133 	  p_sold_from_contact_party_id   NUMBER,
134           p_sold_from_contact_name    VARCHAR2,
135           p_sold_from_email    VARCHAR2,
136           p_sold_from_phone    VARCHAR2,
137           p_sold_from_fax    VARCHAR2,
138 	  p_order_number    VARCHAR2,
139           p_date_ordered    DATE,
140           p_po_number    VARCHAR2,
141           p_po_release_number    VARCHAR2,
142           p_po_type    VARCHAR2,
143           p_agreement_id    NUMBER,
144           p_agreement_name    VARCHAR2,
145           p_agreement_type    VARCHAR2,
146           p_agreement_price    NUMBER,
147           p_agreement_uom_code    VARCHAR2,
148           p_corrected_agreement_id    NUMBER,
149           p_corrected_agreement_name    VARCHAR2,
150           p_price_list_id    NUMBER,
151           p_price_list_name    VARCHAR2,
152           p_orig_system_quantity    NUMBER,
153           p_orig_system_uom    VARCHAR2,
154           p_orig_system_currency_code    VARCHAR2,
155           p_orig_system_selling_price    NUMBER,
156           p_orig_system_reference    VARCHAR2,
157           p_orig_system_line_reference    VARCHAR2,
158 	  p_orig_system_purchase_uom  varchar2,
162           p_orig_system_agreement_uom	varchar2,
159 	  p_orig_system_purchase_curr      VARCHAR2,
160           p_orig_system_purchase_price      NUMBER,
161           p_orig_system_purchase_quant   NUMBER,
163           p_ORIG_SYSTEM_AGREEMENT_name  varchar2,
164           p_orig_system_agreement_type      VARCHAR2,
165           p_orig_system_agreement_status    VARCHAR2,
166           p_orig_system_agreement_curr       VARCHAR2,
167           p_orig_system_agreement_price     NUMBER,
168           p_orig_system_agreement_quant  NUMBER,
169           p_orig_system_item_number  varchar2,
170           p_quantity    NUMBER,
171           p_uom_code    VARCHAR2,
172           p_currency_code    VARCHAR2,
173           p_exchange_rate    NUMBER,
174           p_exchange_rate_type    VARCHAR2,
175           p_exchange_rate_date    DATE,
176           p_selling_price    NUMBER,
177           p_purchase_uom_code    VARCHAR2,
178           p_invoice_number    VARCHAR2,
179           p_date_invoiced   DATE,
180           p_date_shipped    DATE,
181           p_credit_advice_date    DATE,
182           p_product_category_id    NUMBER,
183           p_category_name    VARCHAR2,
184           p_inventory_item_segment1    VARCHAR2,
185           p_inventory_item_segment2    VARCHAR2,
186           p_inventory_item_segment3    VARCHAR2,
187           p_inventory_item_segment4    VARCHAR2,
188           p_inventory_item_segment5    VARCHAR2,
189           p_inventory_item_segment6    VARCHAR2,
190           p_inventory_item_segment7    VARCHAR2,
191           p_inventory_item_segment8    VARCHAR2,
192           p_inventory_item_segment9    VARCHAR2,
193           p_inventory_item_segment10    VARCHAR2,
194           p_inventory_item_segment11    VARCHAR2,
195           p_inventory_item_segment12    VARCHAR2,
196           p_inventory_item_segment13    VARCHAR2,
197           p_inventory_item_segment14    VARCHAR2,
198           p_inventory_item_segment15    VARCHAR2,
199           p_inventory_item_segment16    VARCHAR2,
200           p_inventory_item_segment17    VARCHAR2,
201           p_inventory_item_segment18    VARCHAR2,
202           p_inventory_item_segment19    VARCHAR2,
203           p_inventory_item_segment20    VARCHAR2,
204           p_inventory_item_id    NUMBER,
205           p_item_description    VARCHAR2,
206           p_upc_code    VARCHAR2,
207           p_item_number    VARCHAR2,
208           p_claimed_amount    NUMBER,
209           p_purchase_price    NUMBER,
210 	  p_acctd_purchase_price    NUMBER,
211           p_net_adjusted_amount    NUMBER,
212           p_accepted_amount    NUMBER,
213           p_total_accepted_amount    NUMBER,
214           p_allowed_amount    NUMBER,
215 	  p_total_allowed_amount    NUMBER,
216 	  p_calculated_price  NUMBER,
217           p_acctd_calculated_price  NUMBER,
218           p_calculated_amount   NUMBER,
219           p_line_tolerance_amount    NUMBER,
220           p_total_claimed_amount    NUMBER,
221           p_credit_code    VARCHAR2,
222           p_direct_customer_flag    VARCHAR2,
223 	  p_duplicated_line_id number,
224 	  p_duplicated_adjustment_id number,
225           p_order_type_id    NUMBER,
226           p_order_type    VARCHAR2,
227           p_order_category    VARCHAR2,
228 	  p_dispute_code VARCHAR2,
229 	  p_data_source_code VARCHAR2,
230 	  p_tracing_flag     VARCHAR2,
231           p_header_attribute_category    VARCHAR2,
232           p_header_attribute1    VARCHAR2,
233           p_header_attribute2    VARCHAR2,
234           p_header_attribute3    VARCHAR2,
235           p_header_attribute4    VARCHAR2,
236           p_header_attribute5    VARCHAR2,
237           p_header_attribute6    VARCHAR2,
238           p_header_attribute7    VARCHAR2,
239           p_header_attribute8    VARCHAR2,
240           p_header_attribute9    VARCHAR2,
241           p_header_attribute10    VARCHAR2,
242           p_header_attribute11    VARCHAR2,
243           p_header_attribute12    VARCHAR2,
244           p_header_attribute13    VARCHAR2,
245           p_header_attribute14    VARCHAR2,
246           p_header_attribute15    VARCHAR2,
247           p_line_attribute_category    VARCHAR2,
248           p_line_attribute1    VARCHAR2,
249           p_line_attribute2    VARCHAR2,
250           p_line_attribute3    VARCHAR2,
251           p_line_attribute4    VARCHAR2,
252           p_line_attribute5    VARCHAR2,
253           p_line_attribute6    VARCHAR2,
254           p_line_attribute7    VARCHAR2,
255           p_line_attribute8    VARCHAR2,
256           p_line_attribute9    VARCHAR2,
257           p_line_attribute10    VARCHAR2,
258           p_line_attribute11    VARCHAR2,
259           p_line_attribute12    VARCHAR2,
260           p_line_attribute13    VARCHAR2,
261           p_line_attribute14    VARCHAR2,
262           p_line_attribute15    VARCHAR2,
263           px_org_id   IN OUT NOCOPY NUMBER,
264 
265 	  -- For Bug#9447673 SSD IDSM ER(+)
266 	  p_invoice_line_number VARCHAR2,
267 	  p_order_line_number VARCHAR2,
268 	  p_supplier_item_cost NUMBER,
269 	  p_supplier_item_uom VARCHAR2
270 	  -- For Bug#9447673 SSD IDSM ER(-)
271 	  )
272 
273  IS
274    x_rowid    VARCHAR2(30);
275    l_batch_org_id NUMBER; -- bug # 5997978 fixed
276 
277 BEGIN
278 
279    -- Start: bug # 5997978 fixed
280    IF px_org_id IS NULL THEN
281       OPEN OZF_RESALE_COMMON_PVT.g_resale_batch_org_id_csr(p_resale_batch_id);
282       FETCH OZF_RESALE_COMMON_PVT.g_resale_batch_org_id_csr INTO l_batch_org_id;
283       CLOSE OZF_RESALE_COMMON_PVT.g_resale_batch_org_id_csr;
284       px_org_id := MO_GLOBAL.get_valid_org(l_batch_org_id);
285       IF (l_batch_org_id IS NULL OR px_org_id IS NULL) THEN
286          OZF_UTILITY_PVT.error_message(p_message_name => 'OZF_ORG_ID_NOTFOUND');
287          RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
288       END IF;
289       /*IF (px_org_id IS NULL OR px_org_id = FND_API.G_MISS_NUM) THEN
290       SELECT NVL(SUBSTRB(USERENV('CLIENT_INFO'),1,10),-99)
291       INTO px_org_id
292       FROM DUAL;*/
293    END IF;
294    -- End: bug # 5997978 fixed
295 
296    px_object_version_number := 1;
297 
298 
299    INSERT INTO OZF_RESALE_LINES_INT_ALL(
300            resale_line_int_id,
301            object_version_number,
302            last_update_date,
303            last_updated_by,
304            creation_date,
305            request_id,
306            created_by,
307            created_from,
308            last_update_login,
309            program_application_id,
310            program_update_date,
311            program_id,
312            response_type,
313            response_code,
314            reject_reason_code,
315            followup_action_code,
316            resale_transfer_type,
317            product_transfer_movement_type,
318            product_transfer_date,
319            resale_batch_id,
320            status_code,
321            end_cust_party_id,
322            end_cust_site_use_id,
323            end_cust_site_use_code,
324            end_cust_party_site_id,
325            end_cust_party_name,
326            end_cust_location,
327            end_cust_address,
328            end_cust_city,
329            end_cust_state,
330            end_cust_postal_code,
331            end_cust_country,
332            end_cust_contact_party_id,
333            end_cust_contact_name,
334            end_cust_email,
335            end_cust_phone,
336            end_cust_fax,
337 	   bill_to_cust_account_id,
338            bill_to_site_use_id,
339            bill_to_PARTY_NAME,
340 	   bill_to_PARTY_ID,
341            bill_to_PARTY_site_id,
342            bill_to_duns_number,
343            bill_to_location,
344            bill_to_address,
345            bill_to_city,
346            bill_to_state,
347            bill_to_postal_code,
348            bill_to_country,
349            bill_to_contact_party_id,
350            bill_to_contact_name,
351            bill_to_email,
352            bill_to_phone,
353            bill_to_fax,
354            ship_to_cust_account_id,
355            ship_to_site_use_id,
356            ship_to_PARTY_NAME,
357 	   ship_to_PARTY_ID,
358            ship_to_PARTY_site_id,
359            ship_to_duns_number,
360            ship_to_location,
361            ship_to_address,
362            ship_to_city,
363            ship_to_state,
364            ship_to_postal_code,
365            ship_to_country,
366            ship_to_contact_party_id,
367            ship_to_contact_name,
368            ship_to_email,
369            ship_to_phone,
370            ship_to_fax,
371            ship_from_cust_account_id,
372            ship_from_site_id,
373            ship_from_PARTY_NAME,
374            ship_from_location,
375            ship_from_address,
376            ship_from_city,
377            ship_from_state,
378            ship_from_postal_code,
379            ship_from_country,
380            ship_from_contact_party_id,
381 	   ship_from_contact_name,
382            ship_from_email,
383            ship_from_phone,
384            ship_from_fax,
385            sold_from_cust_account_id,
386            sold_from_site_id,
387            sold_from_PARTY_NAME,
388            sold_from_location,
389            sold_from_address,
390            sold_from_city,
391            sold_from_state,
392            sold_from_postal_code,
393            sold_from_country,
394            sold_from_contact_party_id,
395            sold_from_contact_name,
396            sold_from_email,
397            sold_from_phone,
398            sold_from_fax,
399            order_number,
400            date_ordered,
401            po_number,
402            po_release_number,
403            po_type,
404            agreement_id,
405            agreement_name,
406            agreement_type,
407            agreement_price,
408            agreement_uom_code,
409            corrected_agreement_id,
410            corrected_agreement_name,
411            price_list_id,
412            price_list_name,
413            orig_system_quantity,
414            orig_system_uom,
415            orig_system_currency_code,
416            orig_system_selling_price,
417            orig_system_reference,
418            orig_system_line_reference,
419 	   orig_system_purchase_uom,
420 	   orig_system_purchase_curr,
421            orig_system_purchase_price,
422            orig_system_purchase_quantity,
423            orig_system_agreement_uom,
424            ORIG_SYSTEM_AGREEMENT_name,
425            orig_system_agreement_type,
426            orig_system_agreement_status ,
427            orig_system_agreement_curr,
428            orig_system_agreement_price,
429            orig_system_agreement_quantity,
430 	   orig_system_item_number,
431            quantity,
432            uom_code,
433            currency_code,
434            exchange_rate,
435            exchange_rate_type,
436            exchange_rate_date,
437            selling_price,
438            purchase_uom_code,
439            invoice_number,
440            date_invoiced,
441            date_shipped,
442            credit_advice_date,
443            product_category_id,
444            category_name,
445            inventory_item_segment1,
446            inventory_item_segment2,
447            inventory_item_segment3,
448            inventory_item_segment4,
449            inventory_item_segment5,
450            inventory_item_segment6,
451            inventory_item_segment7,
452            inventory_item_segment8,
456            inventory_item_segment12,
453            inventory_item_segment9,
454            inventory_item_segment10,
455            inventory_item_segment11,
457            inventory_item_segment13,
458            inventory_item_segment14,
459            inventory_item_segment15,
460            inventory_item_segment16,
461            inventory_item_segment17,
462            inventory_item_segment18,
463            inventory_item_segment19,
464            inventory_item_segment20,
465            inventory_item_id,
466            item_description,
467            upc_code,
468            item_number,
469            claimed_amount,
470            purchase_price,
471 	   acctd_purchase_price,
472            net_adjusted_amount,
473            accepted_amount,
474            total_accepted_amount,
475 	   allowed_amount,
476 	   total_allowed_amount,
477 	   calculated_price,
478            acctd_calculated_price,
479            calculated_amount,
480            line_tolerance_amount,
481            total_claimed_amount,
482            credit_code,
483            direct_customer_flag,
484 	   duplicated_line_id,
485 	   duplicated_adjustment_id,
486            order_type_id,
487            order_type,
488            order_category,
489 	   dispute_code,
490            data_source_code,
491 	   tracing_flag,
492            header_attribute_category,
493            header_attribute1,
494            header_attribute2,
495            header_attribute3,
496            header_attribute4,
497            header_attribute5,
498            header_attribute6,
499            header_attribute7,
500            header_attribute8,
501            header_attribute9,
502            header_attribute10,
503            header_attribute11,
504            header_attribute12,
505            header_attribute13,
506            header_attribute14,
507            header_attribute15,
508            line_attribute_category,
509            line_attribute1,
510            line_attribute2,
511            line_attribute3,
512            line_attribute4,
513            line_attribute5,
514            line_attribute6,
515            line_attribute7,
516            line_attribute8,
517            line_attribute9,
518            line_attribute10,
519            line_attribute11,
520            line_attribute12,
521            line_attribute13,
522            line_attribute14,
523            line_attribute15,
524            org_id,
525 	   -- For Bug#9447673 SSD IDSM(+)
526 	   invoice_line_number,
527 	   order_line_number,
528 	   supplier_item_cost,
529 	   supplier_item_uom
530 	   -- For Bug#9447673 SSD IDSM(-)
531    ) VALUES (
532            px_resale_line_int_id,
533            px_object_version_number,
534            p_last_update_date,
535            p_last_updated_by,
536            p_creation_date,
537            p_request_id,
538            p_created_by,
539            p_created_from,
540            p_last_update_login,
541            p_program_application_id,
542            p_program_update_date,
543            p_program_id,
544            p_response_type,
545            p_response_code,
546            p_reject_reason_code,
547            p_followup_action_code,
548            p_resale_transfer_type,
549            p_product_trans_movement_type,
550            p_product_transfer_date,
554            p_end_cust_site_use_id,
551            p_resale_batch_id,
552            p_status_code,
553            p_end_cust_party_id,
555            p_end_cust_site_use_code,
556 	   p_end_cust_party_site_id,
557            p_end_cust_party_name,
558            p_end_cust_location,
559            p_end_cust_address,
560            p_end_cust_city,
561            p_end_cust_state,
562            p_end_cust_postal_code,
563            p_end_cust_country,
564            p_end_cust_contact_party_id,
565            p_end_cust_contact_name,
566            p_end_cust_email,
567            p_end_cust_phone,
568            p_end_cust_fax,
569 	   p_bill_to_cust_account_id,
570            p_bill_to_site_use_id,
571            p_bill_to_PARTY_NAME,
572 	   p_bill_to_PARTY_ID,
573            p_bill_to_PARTY_site_id,
574            p_bill_to_duns_number ,
575            p_bill_to_location,
576            p_bill_to_address,
577            p_bill_to_city,
578            p_bill_to_state,
579            p_bill_to_postal_code,
580            p_bill_to_country,
581            p_bill_to_contact_party_id,
582            p_bill_to_contact_name,
583            p_bill_to_email,
584            p_bill_to_phone,
585            p_bill_to_fax,
586 	   p_ship_to_cust_account_id,
587            p_ship_to_site_use_id,
588            p_ship_to_PARTY_NAME,
589 	   p_ship_to_PARTY_ID,
590            p_ship_to_PARTY_site_id,
591            p_ship_to_duns_number,
592            p_ship_to_location,
593            p_ship_to_address,
594            p_ship_to_city,
595            p_ship_to_state,
596            p_ship_to_postal_code,
597            p_ship_to_country,
598            p_ship_to_contact_party_id,
599            p_ship_to_contact_name,
600            p_ship_to_email,
601            p_ship_to_phone,
602            p_ship_to_fax,
603 	   p_ship_from_cust_account_id,
604            p_ship_from_site_id,
605            p_ship_from_PARTY_NAME,
606            p_ship_from_location,
607            p_ship_from_address,
608            p_ship_from_city,
609            p_ship_from_state,
610            p_ship_from_postal_code,
611            p_ship_from_country,
612            p_ship_from_contact_party_id,
613            p_ship_from_contact_name,
614            p_ship_from_email,
615            p_ship_from_phone,
616            p_ship_from_fax,
617 	   p_sold_from_cust_account_id,
618            p_sold_from_site_id,
619            p_sold_from_PARTY_NAME,
620            p_sold_from_location,
621            p_sold_from_address,
622            p_sold_from_city,
623            p_sold_from_state,
624            p_sold_from_postal_code,
625            p_sold_from_country,
626            p_sold_from_contact_party_id,
627            p_sold_from_contact_name,
628            p_sold_from_email,
629            p_sold_from_phone,
630            p_sold_from_fax,
631 	   p_order_number,
632            p_date_ordered,
633            p_po_number,
634            p_po_release_number,
635            p_po_type,
636            p_agreement_id,
637            p_agreement_name,
638            p_agreement_type,
639            p_agreement_price,
640            p_agreement_uom_code,
641            p_corrected_agreement_id,
642            p_corrected_agreement_name,
643            p_price_list_id,
644            p_price_list_name,
645            p_orig_system_quantity,
646            p_orig_system_uom,
647            p_orig_system_currency_code,
648            p_orig_system_selling_price,
649            p_orig_system_reference,
650            p_orig_system_line_reference,
651            p_orig_system_purchase_uom,
652 	   p_orig_system_purchase_curr,
653            p_orig_system_purchase_price,
654            p_orig_system_purchase_quant,
655            p_orig_system_agreement_uom,
656            p_ORIG_SYSTEM_AGREEMENT_name,
657            p_orig_system_agreement_type,
658            p_orig_system_agreement_status ,
659            p_orig_system_agreement_curr,
660            p_orig_system_agreement_price,
661            p_orig_system_agreement_quant,
662            p_orig_system_item_number,
663            p_quantity,
664            p_uom_code,
665 	   p_currency_code,
666            p_exchange_rate,
667            p_exchange_rate_type,
668            p_exchange_rate_date,
669            p_selling_price,
670            p_purchase_uom_code,
671            p_invoice_number,
672            p_date_invoiced,
673            p_date_shipped,
674            p_credit_advice_date,
675            p_product_category_id,
676            p_category_name,
677            p_inventory_item_segment1,
678            p_inventory_item_segment2,
679            p_inventory_item_segment3,
680            p_inventory_item_segment4,
681            p_inventory_item_segment5,
682            p_inventory_item_segment6,
683            p_inventory_item_segment7,
684            p_inventory_item_segment8,
685            p_inventory_item_segment9,
686            p_inventory_item_segment10,
687            p_inventory_item_segment11,
688            p_inventory_item_segment12,
689            p_inventory_item_segment13,
690            p_inventory_item_segment14,
691            p_inventory_item_segment15,
692            p_inventory_item_segment16,
693            p_inventory_item_segment17,
694            p_inventory_item_segment18,
695            p_inventory_item_segment19,
696            p_inventory_item_segment20,
700            p_item_number,
697            p_inventory_item_id,
698            p_item_description,
699            p_upc_code,
701            p_claimed_amount,
702            p_purchase_price,
703            p_acctd_purchase_price,
704            p_net_adjusted_amount,
705            p_accepted_amount,
706            p_total_accepted_amount,
707 	   p_allowed_amount,
708 	   p_total_allowed_amount,
709 	   p_calculated_price,
710            p_acctd_calculated_price,
711            p_calculated_amount,
712            p_line_tolerance_amount,
713            p_total_claimed_amount,
714            p_credit_code,
715            p_direct_customer_flag,
716 	   p_duplicated_line_id,
717            p_duplicated_adjustment_id,
718            p_order_type_id,
719            p_order_type,
720            p_order_category,
721 	   p_dispute_code,
722 	   p_data_source_code,
723 	   p_tracing_flag,
724            p_header_attribute_category,
725            p_header_attribute1,
726            p_header_attribute2,
727            p_header_attribute3,
728            p_header_attribute4,
729            p_header_attribute5,
730            p_header_attribute6,
731            p_header_attribute7,
732            p_header_attribute8,
733            p_header_attribute9,
734            p_header_attribute10,
735            p_header_attribute11,
736            p_header_attribute12,
737            p_header_attribute13,
738            p_header_attribute14,
739            p_header_attribute15,
740            p_line_attribute_category,
741            p_line_attribute1,
742            p_line_attribute2,
743            p_line_attribute3,
744            p_line_attribute4,
745            p_line_attribute5,
746            p_line_attribute6,
747            p_line_attribute7,
748            p_line_attribute8,
749            p_line_attribute9,
750            p_line_attribute10,
751            p_line_attribute11,
752            p_line_attribute12,
753            p_line_attribute13,
754            p_line_attribute14,
755            p_line_attribute15,
756            px_org_id,
757 
758 	   -- For Bug#9447673 SSD IDSM ER(+)
759 	   p_invoice_line_number,
760 	   p_order_line_number,
761 	   p_supplier_item_cost,
762 	   p_supplier_item_uom
763 	   -- For Bug#9447673 SSD IDSM ER(-)
764 	   );
765 END Insert_Row;
766 
767 
768 ----------------------------------------------------------
769 ----          MEDIA           ----
770 ----------------------------------------------------------
771 
772 --  ========================================================
773 --
774 --  NAME
775 --  createUpdateBody
776 --
777 --  PURPOSE
778 --
779 --  NOTES
780 --
781 --  HISTORY
782 --
783 --  ========================================================
784 PROCEDURE Update_Row(
785           p_resale_line_int_id    NUMBER,
786           p_object_version_number    NUMBER,
787           p_last_update_date    DATE,
788           p_last_updated_by    NUMBER,
789           p_request_id    NUMBER,
790           p_created_from    VARCHAR2,
791           p_last_update_login    NUMBER,
792           p_program_application_id    NUMBER,
793           p_program_update_date    DATE,
794           p_program_id    NUMBER,
795           p_response_type    VARCHAR2,
796           p_response_code    VARCHAR2,
797           p_reject_reason_code    VARCHAR2,
798           p_followup_action_code    VARCHAR2,
799           p_resale_transfer_type    VARCHAR2,
800           p_product_trans_movement_type    VARCHAR2,
801           p_product_transfer_date    DATE,
802           p_resale_batch_id    NUMBER,
803           p_status_code    VARCHAR2,
804           p_end_cust_party_id    NUMBER,
805           p_end_cust_site_use_id    NUMBER,
806           p_end_cust_site_use_code    VARCHAR2,
807           p_end_cust_party_site_id    NUMBER,
808           p_end_cust_party_name    VARCHAR2,
809           p_end_cust_location    VARCHAR2,
810           p_end_cust_address    VARCHAR2,
811           p_end_cust_city    VARCHAR2,
812           p_end_cust_state    VARCHAR2,
813           p_end_cust_postal_code    VARCHAR2,
814           p_end_cust_country    VARCHAR2,
815           p_end_cust_contact_party_id   NUMBER,
816           p_end_cust_contact_name    VARCHAR2,
817           p_end_cust_email    VARCHAR2,
818           p_end_cust_phone    VARCHAR2,
819           p_end_cust_fax    VARCHAR2,
820           p_bill_to_cust_account_id    NUMBER,
821           p_bill_to_site_use_id    NUMBER,
822           p_bill_to_PARTY_NAME    VARCHAR2,
823           p_bill_to_PARTY_ID      NUMBER,
824           p_bill_to_PARTY_site_id NUMBER,
825           p_bill_to_location    VARCHAR2,
826 	  p_bill_to_duns_number varchar2,
827           p_bill_to_address    VARCHAR2,
828           p_bill_to_city    VARCHAR2,
829           p_bill_to_state    VARCHAR2,
830           p_bill_to_postal_code    VARCHAR2,
831           p_bill_to_country    VARCHAR2,
832 	  p_bill_to_contact_party_id   NUMBER,
833           p_bill_to_contact_name    VARCHAR2,
834           p_bill_to_email    VARCHAR2,
835           p_bill_to_phone    VARCHAR2,
836           p_bill_to_fax    VARCHAR2,
837 	  p_ship_to_cust_account_id    NUMBER,
838           p_ship_to_site_use_id    NUMBER,
839           p_ship_to_PARTY_NAME    VARCHAR2,
840 	  p_ship_to_PARTY_ID      NUMBER,
841           p_ship_to_PARTY_site_id NUMBER,
847           p_ship_to_postal_code    VARCHAR2,
842           p_ship_to_duns_number varchar2,
843           p_ship_to_location    VARCHAR2,
844           p_ship_to_address    VARCHAR2,
845           p_ship_to_city    VARCHAR2,
846           p_ship_to_state    VARCHAR2,
848           p_ship_to_country    VARCHAR2,
849 	  p_ship_to_contact_party_id   NUMBER,
850           p_ship_to_contact_name    VARCHAR2,
851           p_ship_to_email    VARCHAR2,
852           p_ship_to_phone    VARCHAR2,
853           p_ship_to_fax    VARCHAR2,
854 	  p_ship_from_cust_account_id    NUMBER,
855           p_ship_from_site_id    NUMBER,
856           p_ship_from_PARTY_NAME    VARCHAR2,
857           p_ship_from_location    VARCHAR2,
858           p_ship_from_address    VARCHAR2,
859           p_ship_from_city    VARCHAR2,
860           p_ship_from_state    VARCHAR2,
861           p_ship_from_postal_code    VARCHAR2,
862           p_ship_from_country    VARCHAR2,
863           p_ship_from_contact_party_id   NUMBER,
864 	  p_ship_from_contact_name    VARCHAR2,
865           p_ship_from_email    VARCHAR2,
866           p_ship_from_phone    VARCHAR2,
867           p_ship_from_fax    VARCHAR2,
868 	  p_sold_from_cust_account_id    NUMBER,
869           p_sold_from_site_id    NUMBER,
870           p_sold_from_PARTY_NAME    VARCHAR2,
871           p_sold_from_location    VARCHAR2,
872           p_sold_from_address    VARCHAR2,
873           p_sold_from_city    VARCHAR2,
874           p_sold_from_state    VARCHAR2,
875           p_sold_from_postal_code    VARCHAR2,
876           p_sold_from_country    VARCHAR2,
877 	  p_sold_from_contact_party_id   NUMBER,
878           p_sold_from_contact_name    VARCHAR2,
879           p_sold_from_email    VARCHAR2,
880           p_sold_from_phone    VARCHAR2,
881           p_sold_from_fax    VARCHAR2,
882 	  p_order_number    VARCHAR2,
883           p_date_ordered    DATE,
884           p_po_number    VARCHAR2,
885           p_po_release_number    VARCHAR2,
886           p_po_type    VARCHAR2,
887           p_agreement_id    NUMBER,
888           p_agreement_name    VARCHAR2,
889           p_agreement_type    VARCHAR2,
890           p_agreement_price    NUMBER,
891           p_agreement_uom_code    VARCHAR2,
892           p_corrected_agreement_id    NUMBER,
893           p_corrected_agreement_name    VARCHAR2,
894           p_price_list_id    NUMBER,
895           p_price_list_name    VARCHAR2,
896           p_orig_system_quantity    NUMBER,
897           p_orig_system_uom    VARCHAR2,
898           p_orig_system_currency_code    VARCHAR2,
899           p_orig_system_selling_price    NUMBER,
900           p_orig_system_reference    VARCHAR2,
901           p_orig_system_line_reference    VARCHAR2,
902 	  p_orig_system_purchase_uom  varchar2,
903 	  p_orig_system_purchase_curr      VARCHAR2,
904           p_orig_system_purchase_price      NUMBER,
905           p_orig_system_purchase_quant   NUMBER,
906           p_orig_system_agreement_uom	varchar2,
907           p_ORIG_SYSTEM_AGREEMENT_name  varchar2,
908           p_orig_system_agreement_type      VARCHAR2,
909           p_orig_system_agreement_status    VARCHAR2,
910           p_orig_system_agreement_curr       VARCHAR2,
911           p_orig_system_agreement_price     NUMBER,
912           p_orig_system_agreement_quant  NUMBER,
913           p_orig_system_item_number  varchar2,
914           p_quantity    NUMBER,
915           p_uom_code    VARCHAR2,
916           p_currency_code    VARCHAR2,
917           p_exchange_rate    NUMBER,
918           p_exchange_rate_type    VARCHAR2,
919           p_exchange_rate_date    DATE,
920           p_selling_price    NUMBER,
921           p_purchase_uom_code    VARCHAR2,
922           p_invoice_number    VARCHAR2,
923           p_date_invoiced   DATE,
924           p_date_shipped    DATE,
925           p_credit_advice_date    DATE,
926           p_product_category_id    NUMBER,
927           p_category_name    VARCHAR2,
928           p_inventory_item_segment1    VARCHAR2,
929           p_inventory_item_segment2    VARCHAR2,
930           p_inventory_item_segment3    VARCHAR2,
931           p_inventory_item_segment4    VARCHAR2,
932           p_inventory_item_segment5    VARCHAR2,
933           p_inventory_item_segment6    VARCHAR2,
934           p_inventory_item_segment7    VARCHAR2,
935           p_inventory_item_segment8    VARCHAR2,
936           p_inventory_item_segment9    VARCHAR2,
937           p_inventory_item_segment10    VARCHAR2,
938           p_inventory_item_segment11    VARCHAR2,
939           p_inventory_item_segment12    VARCHAR2,
940           p_inventory_item_segment13    VARCHAR2,
941           p_inventory_item_segment14    VARCHAR2,
942           p_inventory_item_segment15    VARCHAR2,
946           p_inventory_item_segment19    VARCHAR2,
943           p_inventory_item_segment16    VARCHAR2,
944           p_inventory_item_segment17    VARCHAR2,
945           p_inventory_item_segment18    VARCHAR2,
947           p_inventory_item_segment20    VARCHAR2,
948           p_inventory_item_id    NUMBER,
949           p_item_description    VARCHAR2,
950           p_upc_code    VARCHAR2,
951           p_item_number    VARCHAR2,
952           p_claimed_amount    NUMBER,
953           p_purchase_price    NUMBER,
954           p_acctd_purchase_price    NUMBER,
955           p_net_adjusted_amount    NUMBER,
956           p_accepted_amount    NUMBER,
957           p_total_accepted_amount    NUMBER,
958           p_allowed_amount    NUMBER,
959 	  p_total_allowed_amount    NUMBER,
960 	  p_calculated_price  NUMBER,
961           p_acctd_calculated_price  NUMBER,
962           p_calculated_amount   NUMBER,
963           p_line_tolerance_amount    NUMBER,
964           p_total_claimed_amount    NUMBER,
965           p_credit_code    VARCHAR2,
966           p_direct_customer_flag    VARCHAR2,
967 	  p_duplicated_line_id number,
968 	  p_duplicated_adjustment_id number,
969           p_order_type_id    NUMBER,
970           p_order_type    VARCHAR2,
971           p_order_category    VARCHAR2,
972 	  p_dispute_code VARCHAR2,
973 	  p_data_source_code VARCHAR2,
974 	  p_tracing_flag     VARCHAR2,
975           p_header_attribute_category    VARCHAR2,
976           p_header_attribute1    VARCHAR2,
977           p_header_attribute2    VARCHAR2,
978           p_header_attribute3    VARCHAR2,
979           p_header_attribute4    VARCHAR2,
980           p_header_attribute5    VARCHAR2,
981           p_header_attribute6    VARCHAR2,
982           p_header_attribute7    VARCHAR2,
983           p_header_attribute8    VARCHAR2,
984           p_header_attribute9    VARCHAR2,
985           p_header_attribute10    VARCHAR2,
986           p_header_attribute11    VARCHAR2,
990           p_header_attribute15    VARCHAR2,
987           p_header_attribute12    VARCHAR2,
988           p_header_attribute13    VARCHAR2,
989           p_header_attribute14    VARCHAR2,
991           p_line_attribute_category    VARCHAR2,
992           p_line_attribute1    VARCHAR2,
993           p_line_attribute2    VARCHAR2,
994           p_line_attribute3    VARCHAR2,
995           p_line_attribute4    VARCHAR2,
996           p_line_attribute5    VARCHAR2,
997           p_line_attribute6    VARCHAR2,
998           p_line_attribute7    VARCHAR2,
999           p_line_attribute8    VARCHAR2,
1000           p_line_attribute9    VARCHAR2,
1001           p_line_attribute10    VARCHAR2,
1002           p_line_attribute11    VARCHAR2,
1003           p_line_attribute12    VARCHAR2,
1004           p_line_attribute13    VARCHAR2,
1005           p_line_attribute14    VARCHAR2,
1006           p_line_attribute15    VARCHAR2,
1007           p_org_id    NUMBER,
1008 
1009 	  -- For Bug#9447673 SSD IDSM ER(+)
1010 	  p_invoice_line_number VARCHAR2,
1011 	  p_order_line_number VARCHAR2,
1012 	  p_supplier_item_cost NUMBER,
1013 	  p_supplier_item_uom VARCHAR2
1014 	  -- For Bug#9447673 SSD IDSM ER(-)
1015 	  )
1016 
1017  IS
1018  BEGIN
1019     Update OZF_RESALE_LINES_INT_ALL
1020     SET
1021               resale_line_int_id = p_resale_line_int_id,
1022               object_version_number = p_object_version_number,
1023               last_update_date = p_last_update_date,
1024               last_updated_by = p_last_updated_by,
1025               request_id = p_request_id,
1026               created_from = p_created_from,
1027               last_update_login = p_last_update_login,
1031               response_type = p_response_type,
1028               program_application_id = p_program_application_id,
1029               program_update_date = p_program_update_date,
1030               program_id = p_program_id,
1032               response_code = p_response_code,
1033               reject_reason_code = p_reject_reason_code,
1034               followup_action_code = p_followup_action_code,
1035               resale_transfer_type = p_resale_transfer_type,
1036               product_transfer_movement_type = p_product_trans_movement_type,
1037               product_transfer_date = p_product_transfer_date,
1038               resale_batch_id = p_resale_batch_id,
1039               status_code = p_status_code,
1040               end_cust_party_id = p_end_cust_party_id,
1041               end_cust_site_use_id = p_end_cust_site_use_id,
1042               end_cust_site_use_code = p_end_cust_site_use_code,
1043 	      end_cust_party_site_id = p_end_cust_party_site_id,
1044               end_cust_party_name = p_end_cust_party_name,
1045               end_cust_location = p_end_cust_location,
1046               end_cust_address = p_end_cust_address,
1047               end_cust_city = p_end_cust_city,
1048               end_cust_state = p_end_cust_state,
1049               end_cust_postal_code = p_end_cust_postal_code,
1050               end_cust_country = p_end_cust_country,
1051               end_cust_contact_party_id = p_end_cust_contact_party_id,
1052               end_cust_contact_name = p_end_cust_contact_name,
1053               end_cust_email = p_end_cust_email,
1054               end_cust_phone = p_end_cust_phone,
1055               end_cust_fax = p_end_cust_fax,
1056 	      bill_to_cust_account_id = p_bill_to_cust_account_id,
1057               bill_to_site_use_id = p_bill_to_site_use_id,
1058               bill_to_PARTY_NAME = p_bill_to_PARTY_NAME,
1059 	      bill_to_PARTY_ID = p_bill_to_PARTY_ID,
1060               bill_to_PARTY_site_id = p_bill_to_PARTY_site_id,
1061               bill_to_duns_number = p_bill_to_duns_number,
1062               bill_to_location = p_bill_to_location,
1063               bill_to_address = p_bill_to_address,
1064               bill_to_city = p_bill_to_city,
1065               bill_to_state = p_bill_to_state,
1066               bill_to_postal_code = p_bill_to_postal_code,
1067               bill_to_country = p_bill_to_country,
1068               bill_to_contact_party_id = p_bill_to_contact_party_id,
1069               bill_to_contact_name = p_bill_to_contact_name,
1070               bill_to_email = p_bill_to_email,
1071               bill_to_phone = p_bill_to_phone,
1072               bill_to_fax = p_bill_to_fax,
1073 	      ship_to_cust_account_id = p_ship_to_cust_account_id,
1074               ship_to_site_use_id = p_ship_to_site_use_id,
1075               ship_to_PARTY_NAME = p_ship_to_PARTY_NAME,
1076 	      ship_to_PARTY_ID = p_ship_to_PARTY_ID,
1077               ship_to_PARTY_site_id = p_ship_to_PARTY_site_id,
1078               ship_to_duns_number = p_ship_to_duns_number,
1079               ship_to_location = p_ship_to_location,
1080               ship_to_address = p_ship_to_address,
1081               ship_to_city = p_ship_to_city,
1082               ship_to_state = p_ship_to_state,
1083               ship_to_postal_code = p_ship_to_postal_code,
1084               ship_to_country = p_ship_to_country,
1085               ship_to_contact_party_id = p_ship_to_contact_party_id,
1086               ship_to_contact_name = p_ship_to_contact_name,
1087               ship_to_email = p_ship_to_email,
1088               ship_to_phone = p_ship_to_phone,
1089               ship_to_fax = p_ship_to_fax,
1090 	      ship_from_cust_account_id = p_ship_from_cust_account_id,
1091               ship_from_site_id = p_ship_from_site_id,
1092               ship_from_PARTY_NAME = p_ship_from_PARTY_NAME,
1093               ship_from_location = p_ship_from_location,
1094               ship_from_address = p_ship_from_address,
1095               ship_from_city = p_ship_from_city,
1096               ship_from_state = p_ship_from_state,
1097               ship_from_postal_code = p_ship_from_postal_code,
1098               ship_from_country = p_ship_from_country,
1099               ship_from_contact_party_id = p_ship_from_contact_party_id,
1100               ship_from_contact_name = p_ship_from_contact_name,
1101               ship_from_email = p_ship_from_email,
1102               ship_from_phone = p_ship_from_phone,
1103               ship_from_fax = p_ship_from_fax,
1104 	      sold_from_cust_account_id = p_sold_from_cust_account_id,
1105               sold_from_site_id = p_sold_from_site_id,
1106               sold_from_PARTY_NAME = p_sold_from_PARTY_NAME,
1107               sold_from_address = p_sold_from_address,
1108               sold_from_location = p_sold_from_location,
1109               sold_from_city = p_sold_from_city,
1110               sold_from_state = p_sold_from_state,
1111               sold_from_postal_code = p_sold_from_postal_code,
1112               sold_from_country = p_sold_from_country,
1113               sold_from_contact_party_id = p_sold_from_contact_party_id,
1114               sold_from_contact_name = p_sold_from_contact_name,
1118 	      order_number = p_order_number,
1115               sold_from_email = p_sold_from_email,
1116               sold_from_phone = p_sold_from_phone,
1117               sold_from_fax = p_sold_from_fax,
1119               date_ordered = p_date_ordered,
1120               po_number = p_po_number,
1121               po_release_number = p_po_release_number,
1122               po_type = p_po_type,
1123               agreement_id = p_agreement_id,
1124               agreement_name = p_agreement_name,
1125               agreement_type = p_agreement_type,
1126               agreement_price = p_agreement_price,
1127               agreement_uom_code = p_agreement_uom_code,
1128               corrected_agreement_id = p_corrected_agreement_id,
1129               corrected_agreement_name = p_corrected_agreement_name,
1130               price_list_id = p_price_list_id,
1131               price_list_name = p_price_list_name,
1132               orig_system_quantity = p_orig_system_quantity,
1133               orig_system_uom = p_orig_system_uom,
1134               orig_system_currency_code = p_orig_system_currency_code,
1135               orig_system_selling_price = p_orig_system_selling_price,
1136               orig_system_reference = p_orig_system_reference,
1137               orig_system_line_reference = p_orig_system_line_reference,
1138 	      orig_system_purchase_uom = p_orig_system_purchase_uom,
1139 	      orig_system_purchase_curr = p_orig_system_purchase_curr,
1140               orig_system_purchase_price = p_orig_system_purchase_price,
1141               orig_system_purchase_quantity = p_orig_system_purchase_quant,
1142               orig_system_agreement_uom = p_orig_system_agreement_uom,
1143               ORIG_SYSTEM_AGREEMENT_name = p_ORIG_SYSTEM_AGREEMENT_name,
1144 	      orig_system_agreement_type = p_orig_system_agreement_type,
1145               orig_system_agreement_status = p_orig_system_agreement_status,
1146 	      orig_system_agreement_curr = p_orig_system_agreement_curr,
1147               orig_system_agreement_price = p_orig_system_agreement_price,
1148               orig_system_agreement_quantity = p_orig_system_agreement_quant,
1149               orig_system_item_number = p_orig_system_item_number,
1150               quantity = p_quantity,
1151               uom_code = p_uom_code,
1152               currency_code = p_currency_code,
1153               exchange_rate = p_exchange_rate,
1154               exchange_rate_type = p_exchange_rate_type,
1155               exchange_rate_date = p_exchange_rate_date,
1156               selling_price = p_selling_price,
1157               purchase_uom_code = p_purchase_uom_code,
1158               invoice_number = p_invoice_number,
1159               date_invoiced= p_date_invoiced,
1160               date_shipped = p_date_shipped,
1161               credit_advice_date = p_credit_advice_date,
1162               product_category_id = p_product_category_id,
1163               category_name = p_category_name,
1164               inventory_item_segment1 = p_inventory_item_segment1,
1165               inventory_item_segment2 = p_inventory_item_segment2,
1166               inventory_item_segment3 = p_inventory_item_segment3,
1167               inventory_item_segment4 = p_inventory_item_segment4,
1168               inventory_item_segment5 = p_inventory_item_segment5,
1169               inventory_item_segment6 = p_inventory_item_segment6,
1170               inventory_item_segment7 = p_inventory_item_segment7,
1171               inventory_item_segment8 = p_inventory_item_segment8,
1172               inventory_item_segment9 = p_inventory_item_segment9,
1173               inventory_item_segment10 = p_inventory_item_segment10,
1174               inventory_item_segment11 = p_inventory_item_segment11,
1175               inventory_item_segment12 = p_inventory_item_segment12,
1176               inventory_item_segment13 = p_inventory_item_segment13,
1177               inventory_item_segment14 = p_inventory_item_segment14,
1178               inventory_item_segment15 = p_inventory_item_segment15,
1179               inventory_item_segment16 = p_inventory_item_segment16,
1180               inventory_item_segment17 = p_inventory_item_segment17,
1181               inventory_item_segment18 = p_inventory_item_segment18,
1182               inventory_item_segment19 = p_inventory_item_segment19,
1183               inventory_item_segment20 = p_inventory_item_segment20,
1184               inventory_item_id = p_inventory_item_id,
1185               item_description = p_item_description,
1186               upc_code = p_upc_code,
1187               item_number = p_item_number,
1188               claimed_amount = p_claimed_amount,
1189               purchase_price = p_purchase_price,
1190               acctd_purchase_price = p_acctd_purchase_price,
1191               net_adjusted_amount = p_net_adjusted_amount,
1192               accepted_amount = p_accepted_amount,
1193               total_accepted_amount = p_total_accepted_amount,
1194 	      allowed_amount = p_allowed_amount,
1195 	      total_allowed_amount = p_total_allowed_amount,
1196 	      calculated_price = p_calculated_price,
1197               acctd_calculated_price = p_acctd_calculated_price,
1198               calculated_amount = p_calculated_amount,
1199               line_tolerance_amount = p_line_tolerance_amount,
1200               total_claimed_amount = p_total_claimed_amount,
1201               credit_code = p_credit_code,
1202               direct_customer_flag = p_direct_customer_flag,
1203 	      duplicated_line_id = p_duplicated_line_id,
1207               order_category = p_order_category,
1204 	      duplicated_adjustment_id = p_duplicated_adjustment_id,
1205               order_type_id = p_order_type_id,
1206               order_type = p_order_type,
1208 	      dispute_code = p_dispute_code,
1209 	      data_source_code = p_data_source_code,
1210 	      tracing_flag = p_tracing_flag,
1211               header_attribute_category = p_header_attribute_category,
1212               header_attribute1 = p_header_attribute1,
1213               header_attribute2 = p_header_attribute2,
1214               header_attribute3 = p_header_attribute3,
1215               header_attribute4 = p_header_attribute4,
1216               header_attribute5 = p_header_attribute5,
1217               header_attribute6 = p_header_attribute6,
1218               header_attribute7 = p_header_attribute7,
1219               header_attribute8 = p_header_attribute8,
1220               header_attribute9 = p_header_attribute9,
1221               header_attribute10 = p_header_attribute10,
1222               header_attribute11 = p_header_attribute11,
1223               header_attribute12 = p_header_attribute12,
1224               header_attribute13 = p_header_attribute13,
1225               header_attribute14 = p_header_attribute14,
1226               header_attribute15 = p_header_attribute15,
1227               line_attribute_category = p_line_attribute_category,
1228               line_attribute1 = p_line_attribute1,
1229               line_attribute2 = p_line_attribute2,
1230               line_attribute3 = p_line_attribute3,
1231               line_attribute4 = p_line_attribute4,
1232               line_attribute5 = p_line_attribute5,
1233               line_attribute6 = p_line_attribute6,
1234               line_attribute7 = p_line_attribute7,
1235               line_attribute8 = p_line_attribute8,
1236               line_attribute9 = p_line_attribute9,
1237               line_attribute10 = p_line_attribute10,
1238               line_attribute11 = p_line_attribute11,
1239               line_attribute12 = p_line_attribute12,
1240               line_attribute13 = p_line_attribute13,
1241               line_attribute14 = p_line_attribute14,
1242               line_attribute15 = p_line_attribute15,
1243               org_id = p_org_id,
1244 
1245 	      -- For Bug#9447673 SSD IDSM ER(+)
1246 	      invoice_line_number = p_invoice_line_number,
1247 	      order_line_number = p_order_line_number,
1248 	      supplier_item_cost = p_supplier_item_cost,
1249 	      supplier_item_uom = p_supplier_item_uom
1250 	      -- For Bug#9447673 SSD IDSM ER(-)
1251 
1252 
1253    WHERE RESALE_LINE_INT_ID = p_RESALE_LINE_INT_ID
1254    AND   object_version_number = p_object_version_number;
1255 
1256    IF (SQL%NOTFOUND) THEN
1257 RAISE  FND_API.G_EXC_UNEXPECTED_ERROR;
1258    END IF;
1259 END Update_Row;
1260 
1261 
1262 ----------------------------------------------------------
1263 ----          MEDIA           ----
1264 ----------------------------------------------------------
1265 
1266 --  ========================================================
1267 --
1268 --  NAME
1269 --  createDeleteBody
1270 --
1271 --  PURPOSE
1272 --
1273 --  NOTES
1274 --
1275 --  HISTORY
1276 --
1277 --  ========================================================
1278 PROCEDURE Delete_Row(
1279     p_RESALE_LINE_INT_ID  NUMBER)
1280  IS
1281  BEGIN
1282    DELETE FROM OZF_RESALE_LINES_INT_ALL
1283     WHERE RESALE_LINE_INT_ID = p_RESALE_LINE_INT_ID;
1284    If (SQL%NOTFOUND) then
1285 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1286    End If;
1287  END Delete_Row ;
1288 
1289 
1290 
1291 ----------------------------------------------------------
1292 ----          MEDIA           ----
1293 ----------------------------------------------------------
1294 
1295 --  ========================================================
1296 --
1297 --  NAME
1298 --  createLockBody
1299 --
1300 --  PURPOSE
1301 --
1302 --  NOTES
1303 --
1304 --  HISTORY
1305 --
1306 --  ========================================================
1307 PROCEDURE Lock_Row(
1308           p_resale_line_int_id    NUMBER,
1309           p_object_version_number    NUMBER,
1310           p_last_update_date    DATE,
1311           p_last_updated_by    NUMBER,
1312           p_creation_date    DATE,
1313           p_request_id    NUMBER,
1314           p_created_by    NUMBER,
1315           p_created_from    VARCHAR2,
1316           p_last_update_login    NUMBER,
1317           p_program_application_id    NUMBER,
1318           p_program_update_date    DATE,
1319           p_program_id    NUMBER,
1320           p_response_type    VARCHAR2,
1321           p_response_code    VARCHAR2,
1322           p_reject_reason_code    VARCHAR2,
1323           p_followup_action_code    VARCHAR2,
1324           p_resale_transfer_type    VARCHAR2,
1325           p_product_trans_movement_type    VARCHAR2,
1326           p_product_transfer_date    DATE,
1327           p_resale_batch_id    NUMBER,
1328           p_status_code    VARCHAR2,
1329           p_end_cust_party_id    NUMBER,
1330           p_end_cust_site_use_id    NUMBER,
1331 	  p_end_cust_site_use_code    VARCHAR2,
1332           p_end_cust_party_site_id    NUMBER,
1333           p_end_cust_party_name    VARCHAR2,
1334           p_end_cust_location    VARCHAR2,
1335           p_end_cust_address    VARCHAR2,
1336           p_end_cust_city    VARCHAR2,
1337           p_end_cust_state    VARCHAR2,
1338           p_end_cust_postal_code    VARCHAR2,
1339           p_end_cust_country    VARCHAR2,
1340           p_end_cust_contact_party_id   NUMBER,
1341           p_end_cust_contact_name    VARCHAR2,
1342           p_end_cust_email    VARCHAR2,
1346           p_bill_to_site_use_id    NUMBER,
1343           p_end_cust_phone    VARCHAR2,
1344           p_end_cust_fax    VARCHAR2,
1345           p_bill_to_cust_account_id    NUMBER,
1347           p_bill_to_PARTY_NAME    VARCHAR2,
1348           p_bill_to_PARTY_ID      NUMBER,
1349           p_bill_to_PARTY_site_id NUMBER,
1350           p_bill_to_location    VARCHAR2,
1351 	  p_bill_to_duns_number varchar2,
1352           p_bill_to_address    VARCHAR2,
1353           p_bill_to_city    VARCHAR2,
1354           p_bill_to_state    VARCHAR2,
1355           p_bill_to_postal_code    VARCHAR2,
1356           p_bill_to_country    VARCHAR2,
1357 	  p_bill_to_contact_party_id   NUMBER,
1358           p_bill_to_contact_name    VARCHAR2,
1359           p_bill_to_email    VARCHAR2,
1360           p_bill_to_phone    VARCHAR2,
1361           p_bill_to_fax    VARCHAR2,
1362 	  p_ship_to_cust_account_id    NUMBER,
1363           p_ship_to_site_use_id    NUMBER,
1364           p_ship_to_PARTY_NAME    VARCHAR2,
1365 	  p_ship_to_PARTY_ID      NUMBER,
1366           p_ship_to_PARTY_site_id NUMBER,
1367           p_ship_to_duns_number varchar2,
1368           p_ship_to_location    VARCHAR2,
1369           p_ship_to_address    VARCHAR2,
1370           p_ship_to_city    VARCHAR2,
1371           p_ship_to_state    VARCHAR2,
1372           p_ship_to_postal_code    VARCHAR2,
1373           p_ship_to_country    VARCHAR2,
1374 	  p_ship_to_contact_party_id   NUMBER,
1375           p_ship_to_contact_name    VARCHAR2,
1376           p_ship_to_email    VARCHAR2,
1377           p_ship_to_phone    VARCHAR2,
1378           p_ship_to_fax    VARCHAR2,
1379 	  p_ship_from_cust_account_id    NUMBER,
1380           p_ship_from_site_id    NUMBER,
1381           p_ship_from_PARTY_NAME    VARCHAR2,
1382           p_ship_from_location    VARCHAR2,
1383           p_ship_from_address    VARCHAR2,
1384           p_ship_from_city    VARCHAR2,
1385           p_ship_from_state    VARCHAR2,
1386           p_ship_from_postal_code    VARCHAR2,
1387           p_ship_from_country    VARCHAR2,
1388           p_ship_from_contact_party_id   NUMBER,
1389 	  p_ship_from_contact_name    VARCHAR2,
1390           p_ship_from_email    VARCHAR2,
1391           p_ship_from_phone    VARCHAR2,
1392           p_ship_from_fax    VARCHAR2,
1393 	  p_sold_from_cust_account_id    NUMBER,
1394           p_sold_from_site_id    NUMBER,
1395           p_sold_from_PARTY_NAME    VARCHAR2,
1399           p_sold_from_state    VARCHAR2,
1396           p_sold_from_location    VARCHAR2,
1397           p_sold_from_address    VARCHAR2,
1398           p_sold_from_city    VARCHAR2,
1400           p_sold_from_postal_code    VARCHAR2,
1401           p_sold_from_country    VARCHAR2,
1402 	  p_sold_from_contact_party_id   NUMBER,
1403           p_sold_from_contact_name    VARCHAR2,
1404           p_sold_from_email    VARCHAR2,
1405           p_sold_from_phone    VARCHAR2,
1406           p_sold_from_fax    VARCHAR2,
1407 	  p_order_number    VARCHAR2,
1408           p_date_ordered    DATE,
1409           p_po_number    VARCHAR2,
1410           p_po_release_number    VARCHAR2,
1411           p_po_type    VARCHAR2,
1412           p_agreement_id    NUMBER,
1413           p_agreement_name    VARCHAR2,
1414           p_agreement_type    VARCHAR2,
1415           p_agreement_price    NUMBER,
1416           p_agreement_uom_code    VARCHAR2,
1417           p_corrected_agreement_id    NUMBER,
1418           p_corrected_agreement_name    VARCHAR2,
1419           p_price_list_id    NUMBER,
1420           p_price_list_name    VARCHAR2,
1421           p_orig_system_quantity    NUMBER,
1422           p_orig_system_uom    VARCHAR2,
1423           p_orig_system_currency_code    VARCHAR2,
1424           p_orig_system_selling_price    NUMBER,
1425           p_orig_system_reference    VARCHAR2,
1426           p_orig_system_line_reference    VARCHAR2,
1427 	  p_orig_system_purchase_uom  varchar2,
1428 	  p_orig_system_purchase_curr      VARCHAR2,
1429           p_orig_system_purchase_price      NUMBER,
1430           p_orig_system_purchase_quant   NUMBER,
1431           p_orig_system_agreement_uom	varchar2,
1432           p_ORIG_SYSTEM_AGREEMENT_name  varchar2,
1433           p_orig_system_agreement_type      VARCHAR2,
1434           p_orig_system_agreement_status    VARCHAR2,
1435           p_orig_system_agreement_curr       VARCHAR2,
1436           p_orig_system_agreement_price     NUMBER,
1437           p_orig_system_agreement_quant  NUMBER,
1438           p_orig_system_item_number  varchar2,
1439           p_quantity    NUMBER,
1440           p_uom_code    VARCHAR2,
1441           p_currency_code    VARCHAR2,
1442           p_exchange_rate    NUMBER,
1446           p_purchase_uom_code    VARCHAR2,
1443           p_exchange_rate_type    VARCHAR2,
1444           p_exchange_rate_date    DATE,
1445           p_selling_price    NUMBER,
1447           p_invoice_number    VARCHAR2,
1448           p_date_invoiced   DATE,
1449           p_date_shipped    DATE,
1450           p_credit_advice_date    DATE,
1451           p_product_category_id    NUMBER,
1452           p_category_name    VARCHAR2,
1453           p_inventory_item_segment1    VARCHAR2,
1454           p_inventory_item_segment2    VARCHAR2,
1455           p_inventory_item_segment3    VARCHAR2,
1456           p_inventory_item_segment4    VARCHAR2,
1457           p_inventory_item_segment5    VARCHAR2,
1458           p_inventory_item_segment6    VARCHAR2,
1459           p_inventory_item_segment7    VARCHAR2,
1460           p_inventory_item_segment8    VARCHAR2,
1461           p_inventory_item_segment9    VARCHAR2,
1462           p_inventory_item_segment10    VARCHAR2,
1463           p_inventory_item_segment11    VARCHAR2,
1464           p_inventory_item_segment12    VARCHAR2,
1465           p_inventory_item_segment13    VARCHAR2,
1466           p_inventory_item_segment14    VARCHAR2,
1467           p_inventory_item_segment15    VARCHAR2,
1468           p_inventory_item_segment16    VARCHAR2,
1469           p_inventory_item_segment17    VARCHAR2,
1470           p_inventory_item_segment18    VARCHAR2,
1471           p_inventory_item_segment19    VARCHAR2,
1472           p_inventory_item_segment20    VARCHAR2,
1473           p_inventory_item_id    NUMBER,
1474           p_item_description    VARCHAR2,
1475           p_upc_code    VARCHAR2,
1476           p_item_number    VARCHAR2,
1477           p_claimed_amount    NUMBER,
1478           p_purchase_price    NUMBER,
1479           p_acctd_purchase_price    NUMBER,
1480           p_net_adjusted_amount    NUMBER,
1481           p_accepted_amount    NUMBER,
1482           p_total_accepted_amount    NUMBER,
1483           p_allowed_amount    NUMBER,
1484 	  p_total_allowed_amount    NUMBER,
1485 	  p_calculated_price  NUMBER,
1486           p_acctd_calculated_price  NUMBER,
1487           p_calculated_amount   NUMBER,
1488           p_line_tolerance_amount    NUMBER,
1489           p_total_claimed_amount    NUMBER,
1490           p_credit_code    VARCHAR2,
1491           p_direct_customer_flag    VARCHAR2,
1492 	  p_duplicated_line_id number,
1493 	  p_duplicated_adjustment_id number,
1494           p_order_type_id    NUMBER,
1495           p_order_type    VARCHAR2,
1496           p_order_category    VARCHAR2,
1497 	  p_dispute_code VARCHAR2,
1498 	  p_data_source_code VARCHAR2,
1499 	  p_tracing_flag     VARCHAR2,
1500           p_header_attribute_category    VARCHAR2,
1501           p_header_attribute1    VARCHAR2,
1502           p_header_attribute2    VARCHAR2,
1503           p_header_attribute3    VARCHAR2,
1504           p_header_attribute4    VARCHAR2,
1505           p_header_attribute5    VARCHAR2,
1506           p_header_attribute6    VARCHAR2,
1507           p_header_attribute7    VARCHAR2,
1508           p_header_attribute8    VARCHAR2,
1509           p_header_attribute9    VARCHAR2,
1510           p_header_attribute10    VARCHAR2,
1511           p_header_attribute11    VARCHAR2,
1512           p_header_attribute12    VARCHAR2,
1513           p_header_attribute13    VARCHAR2,
1514           p_header_attribute14    VARCHAR2,
1515           p_header_attribute15    VARCHAR2,
1516           p_line_attribute_category    VARCHAR2,
1517           p_line_attribute1    VARCHAR2,
1518           p_line_attribute2    VARCHAR2,
1519           p_line_attribute3    VARCHAR2,
1520           p_line_attribute4    VARCHAR2,
1521           p_line_attribute5    VARCHAR2,
1522           p_line_attribute6    VARCHAR2,
1523           p_line_attribute7    VARCHAR2,
1524           p_line_attribute8    VARCHAR2,
1525           p_line_attribute9    VARCHAR2,
1526           p_line_attribute10    VARCHAR2,
1527           p_line_attribute11    VARCHAR2,
1528           p_line_attribute12    VARCHAR2,
1529           p_line_attribute13    VARCHAR2,
1530           p_line_attribute14    VARCHAR2,
1531           p_line_attribute15    VARCHAR2,
1532           p_org_id    NUMBER,
1533 
1534 	  -- For Bug#9447673 SSD IDSM ER(+)
1535 	  p_invoice_line_number VARCHAR2,
1536 	  p_order_line_number VARCHAR2,
1537 	  p_supplier_item_cost NUMBER,
1538 	  p_supplier_item_uom VARCHAR2
1539 	  -- For Bug#9447673 SSD IDSM ER(-)
1540 	  )
1541 
1547         FOR UPDATE of RESALE_LINE_INT_ID NOWAIT;
1542  IS
1543    CURSOR C IS
1544         SELECT *
1545          FROM OZF_RESALE_LINES_INT_ALL
1546         WHERE RESALE_LINE_INT_ID =  p_RESALE_LINE_INT_ID
1548    Recinfo C%ROWTYPE;
1549  BEGIN
1550     OPEN c;
1551     FETCH c INTO Recinfo;
1552     If (c%NOTFOUND) then
1553         CLOSE c;
1554         FND_MESSAGE.SET_NAME('FND', 'FORM_RECORD_DELETED');
1555         APP_EXCEPTION.RAISE_EXCEPTION;
1556     END IF;
1557     CLOSE C;
1558     IF (
1559            (      Recinfo.resale_line_int_id = p_resale_line_int_id)
1560        AND (    ( Recinfo.object_version_number = p_object_version_number)
1561             OR (    ( Recinfo.object_version_number IS NULL )
1562                 AND (  p_object_version_number IS NULL )))
1563        AND (    ( Recinfo.last_update_date = p_last_update_date)
1564             OR (    ( Recinfo.last_update_date IS NULL )
1565                 AND (  p_last_update_date IS NULL )))
1566        AND (    ( Recinfo.last_updated_by = p_last_updated_by)
1567             OR (    ( Recinfo.last_updated_by IS NULL )
1568                 AND (  p_last_updated_by IS NULL )))
1569        AND (    ( Recinfo.creation_date = p_creation_date)
1570             OR (    ( Recinfo.creation_date IS NULL )
1571                 AND (  p_creation_date IS NULL )))
1572        AND (    ( Recinfo.request_id = p_request_id)
1573             OR (    ( Recinfo.request_id IS NULL )
1574                 AND (  p_request_id IS NULL )))
1575        AND (    ( Recinfo.created_by = p_created_by)
1576             OR (    ( Recinfo.created_by IS NULL )
1577                 AND (  p_created_by IS NULL )))
1578        AND (    ( Recinfo.created_from = p_created_from)
1579             OR (    ( Recinfo.created_from IS NULL )
1580                 AND (  p_created_from IS NULL )))
1581        AND (    ( Recinfo.last_update_login = p_last_update_login)
1582             OR (    ( Recinfo.last_update_login IS NULL )
1583                 AND (  p_last_update_login IS NULL )))
1584        AND (    ( Recinfo.program_application_id = p_program_application_id)
1585             OR (    ( Recinfo.program_application_id IS NULL )
1586                 AND (  p_program_application_id IS NULL )))
1587        AND (    ( Recinfo.program_update_date = p_program_update_date)
1588             OR (    ( Recinfo.program_update_date IS NULL )
1589                 AND (  p_program_update_date IS NULL )))
1590        AND (    ( Recinfo.program_id = p_program_id)
1591             OR (    ( Recinfo.program_id IS NULL )
1592                 AND (  p_program_id IS NULL )))
1593        AND (    ( Recinfo.response_type = p_response_type)
1594             OR (    ( Recinfo.response_type IS NULL )
1595                 AND (  p_response_type IS NULL )))
1596        AND (    ( Recinfo.response_code = p_response_code)
1597             OR (    ( Recinfo.response_code IS NULL )
1598                 AND (  p_response_code IS NULL )))
1599        AND (    ( Recinfo.reject_reason_code = p_reject_reason_code)
1600             OR (    ( Recinfo.reject_reason_code IS NULL )
1601                 AND (  p_reject_reason_code IS NULL )))
1602        AND (    ( Recinfo.followup_action_code = p_followup_action_code)
1603             OR (    ( Recinfo.followup_action_code IS NULL )
1604                 AND (  p_followup_action_code IS NULL )))
1605        AND (    ( Recinfo.resale_transfer_type = p_resale_transfer_type)
1606             OR (    ( Recinfo.resale_transfer_type IS NULL )
1607                 AND (  p_resale_transfer_type IS NULL )))
1608        AND (    ( Recinfo.product_transfer_movement_type = p_product_trans_movement_type)
1609             OR (    ( Recinfo.product_transfer_movement_type IS NULL )
1610                 AND (  p_product_trans_movement_type IS NULL )))
1611        AND (    ( Recinfo.product_transfer_date = p_product_transfer_date)
1612             OR (    ( Recinfo.product_transfer_date IS NULL )
1613                 AND (  p_product_transfer_date IS NULL )))
1614        AND (    ( Recinfo.resale_batch_id = p_resale_batch_id)
1615             OR (    ( Recinfo.resale_batch_id IS NULL )
1616                 AND (  p_resale_batch_id IS NULL )))
1617        AND (    ( Recinfo.status_code = p_status_code)
1618             OR (    ( Recinfo.status_code IS NULL )
1619                 AND (  p_status_code IS NULL )))
1620        AND (    ( Recinfo.end_cust_party_id = p_end_cust_party_id)
1621             OR (    ( Recinfo.end_cust_party_id IS NULL )
1622                 AND (  p_end_cust_party_id IS NULL )))
1623        AND (    ( Recinfo.end_cust_site_use_id = p_end_cust_site_use_id)
1624             OR (    ( Recinfo.end_cust_site_use_id IS NULL )
1625                 AND (  p_end_cust_site_use_id IS NULL )))
1626        AND (    ( Recinfo.end_cust_site_use_code = p_end_cust_site_use_code)
1627             OR (    ( Recinfo.end_cust_site_use_code IS NULL )
1628                 AND (  p_end_cust_site_use_code IS NULL )))
1629        AND (    ( Recinfo.end_cust_party_site_id = p_end_cust_party_site_id)
1630             OR (    ( Recinfo.end_cust_party_site_id IS NULL )
1631                 AND (  p_end_cust_party_site_id IS NULL )))
1632        AND (    ( Recinfo.end_cust_party_name = p_end_cust_party_name)
1633             OR (    ( Recinfo.end_cust_party_name IS NULL )
1634                 AND (  p_end_cust_party_name IS NULL )))
1635        AND (    ( Recinfo.end_cust_location = p_end_cust_location)
1636             OR (    ( Recinfo.end_cust_location IS NULL )
1637                 AND (  p_end_cust_location IS NULL )))
1638        AND (    ( Recinfo.end_cust_address = p_end_cust_address)
1639             OR (    ( Recinfo.end_cust_address IS NULL )
1640                 AND (  p_end_cust_address IS NULL )))
1641        AND (    ( Recinfo.end_cust_city = p_end_cust_city)
1642             OR (    ( Recinfo.end_cust_city IS NULL )
1643                 AND (  p_end_cust_city IS NULL )))
1647        AND (    ( Recinfo.end_cust_postal_code = p_end_cust_postal_code)
1644        AND (    ( Recinfo.end_cust_state = p_end_cust_state)
1645             OR (    ( Recinfo.end_cust_state IS NULL )
1646                 AND (  p_end_cust_state IS NULL )))
1648             OR (    ( Recinfo.end_cust_postal_code IS NULL )
1649                 AND (  p_end_cust_postal_code IS NULL )))
1650        AND (    ( Recinfo.end_cust_country = p_end_cust_country)
1651             OR (    ( Recinfo.end_cust_country IS NULL )
1652                 AND (  p_end_cust_country IS NULL )))
1653        AND (    ( Recinfo.end_cust_contact_party_id = p_end_cust_contact_party_id)
1654             OR (    ( Recinfo.end_cust_contact_party_id IS NULL )
1655                 AND (  p_end_cust_contact_party_id IS NULL )))
1656        AND (    ( Recinfo.end_cust_contact_name = p_end_cust_contact_name)
1657             OR (    ( Recinfo.end_cust_contact_name IS NULL )
1658                 AND (  p_end_cust_contact_name IS NULL )))
1659        AND (    ( Recinfo.end_cust_email = p_end_cust_email)
1663             OR (    ( Recinfo.end_cust_phone IS NULL )
1660             OR (    ( Recinfo.end_cust_email IS NULL )
1661                 AND (  p_end_cust_email IS NULL )))
1662        AND (    ( Recinfo.end_cust_phone = p_end_cust_phone)
1664                 AND (  p_end_cust_phone IS NULL )))
1665        AND (    ( Recinfo.end_cust_fax = p_end_cust_fax)
1666             OR (    ( Recinfo.end_cust_fax IS NULL )
1667                 AND (  p_end_cust_fax IS NULL )))
1668        AND (    ( Recinfo.bill_to_cust_account_id = p_bill_to_cust_account_id)
1669             OR (    ( Recinfo.bill_to_cust_account_id IS NULL )
1670                 AND (  p_bill_to_cust_account_id IS NULL )))
1671        AND (    ( Recinfo.bill_to_site_use_id = p_bill_to_site_use_id)
1672             OR (    ( Recinfo.bill_to_site_use_id IS NULL )
1673                 AND (  p_bill_to_site_use_id IS NULL )))
1674        AND (    ( Recinfo.bill_to_PARTY_NAME = p_bill_to_PARTY_NAME)
1675             OR (    ( Recinfo.bill_to_PARTY_NAME IS NULL )
1676                 AND (  p_bill_to_PARTY_NAME IS NULL )))
1677        AND (    ( Recinfo.bill_to_PARTY_ID = p_bill_to_PARTY_ID)
1678             OR (    ( Recinfo.bill_to_PARTY_ID IS NULL )
1679                 AND (  p_bill_to_PARTY_ID IS NULL )))
1680        AND (    ( Recinfo.bill_to_PARTY_site_id = p_bill_to_PARTY_site_id)
1681             OR (    ( Recinfo.bill_to_PARTY_site_id IS NULL )
1682                 AND (  p_bill_to_PARTY_site_id IS NULL )))
1683        AND (    ( Recinfo.bill_to_duns_number = p_bill_to_duns_number)
1684             OR (    ( Recinfo.bill_to_duns_number IS NULL )
1685                 AND (  p_bill_to_duns_number IS NULL )))
1686        AND (    ( Recinfo.bill_to_location = p_bill_to_location)
1687             OR (    ( Recinfo.bill_to_location IS NULL )
1688                 AND (  p_bill_to_location IS NULL )))
1689        AND (    ( Recinfo.bill_to_address = p_bill_to_address)
1690             OR (    ( Recinfo.bill_to_address IS NULL )
1691                 AND (  p_bill_to_address IS NULL )))
1692        AND (    ( Recinfo.bill_to_city = p_bill_to_city)
1693             OR (    ( Recinfo.bill_to_city IS NULL )
1694                 AND (  p_bill_to_city IS NULL )))
1695        AND (    ( Recinfo.bill_to_state = p_bill_to_state)
1696             OR (    ( Recinfo.bill_to_state IS NULL )
1697                 AND (  p_bill_to_state IS NULL )))
1698        AND (    ( Recinfo.bill_to_postal_code = p_bill_to_postal_code)
1699             OR (    ( Recinfo.bill_to_postal_code IS NULL )
1700                 AND (  p_bill_to_postal_code IS NULL )))
1701        AND (    ( Recinfo.bill_to_country = p_bill_to_country)
1702             OR (    ( Recinfo.bill_to_country IS NULL )
1703                 AND (  p_bill_to_country IS NULL )))
1704        AND (    ( Recinfo.bill_to_contact_party_id = p_bill_to_contact_party_id)
1705             OR (    ( Recinfo.bill_to_contact_party_id IS NULL )
1706                 AND (  p_bill_to_contact_party_id IS NULL )))
1707        AND (    ( Recinfo.bill_to_contact_name = p_bill_to_contact_name)
1708             OR (    ( Recinfo.bill_to_contact_name IS NULL )
1709                 AND (  p_bill_to_contact_name IS NULL )))
1710        AND (    ( Recinfo.bill_to_email = p_bill_to_email)
1711             OR (    ( Recinfo.bill_to_email IS NULL )
1712                 AND (  p_bill_to_email IS NULL )))
1713        AND (    ( Recinfo.bill_to_phone = p_bill_to_phone)
1714             OR (    ( Recinfo.bill_to_phone IS NULL )
1715                 AND (  p_bill_to_phone IS NULL )))
1716        AND (    ( Recinfo.bill_to_fax = p_bill_to_fax)
1717             OR (    ( Recinfo.bill_to_fax IS NULL )
1718                 AND (  p_bill_to_fax IS NULL )))
1719        AND (    ( Recinfo.ship_to_cust_account_id = p_ship_to_cust_account_id)
1720             OR (    ( Recinfo.ship_to_cust_account_id IS NULL )
1721                 AND (  p_ship_to_cust_account_id IS NULL )))
1725        AND (    ( Recinfo.ship_to_PARTY_NAME = p_ship_to_PARTY_NAME)
1722        AND (    ( Recinfo.ship_to_site_use_id = p_ship_to_site_use_id)
1723             OR (    ( Recinfo.ship_to_site_use_id IS NULL )
1724                 AND (  p_ship_to_site_use_id IS NULL )))
1726             OR (    ( Recinfo.ship_to_PARTY_NAME IS NULL )
1727                 AND (  p_ship_to_PARTY_NAME IS NULL )))
1728        AND (    ( Recinfo.ship_to_PARTY_ID = p_ship_to_PARTY_ID)
1729             OR (    ( Recinfo.ship_to_PARTY_ID IS NULL )
1730                 AND (  p_ship_to_PARTY_ID IS NULL )))
1731        AND (    ( Recinfo.ship_to_PARTY_site_id = p_ship_to_PARTY_site_id)
1732             OR (    ( Recinfo.ship_to_PARTY_site_id IS NULL )
1733                 AND (  p_ship_to_PARTY_site_id IS NULL )))
1734        AND (    ( Recinfo.ship_to_duns_number = p_ship_to_duns_number)
1735             OR (    ( Recinfo.ship_to_duns_number IS NULL )
1736                 AND (  p_ship_to_duns_number IS NULL )))
1737        AND (    ( Recinfo.ship_to_location = p_ship_to_location)
1738             OR (    ( Recinfo.ship_to_location IS NULL )
1739                 AND (  p_ship_to_location IS NULL )))
1740        AND (    ( Recinfo.ship_to_address = p_ship_to_address)
1741             OR (    ( Recinfo.ship_to_address IS NULL )
1742                 AND (  p_ship_to_address IS NULL )))
1743        AND (    ( Recinfo.ship_to_city = p_ship_to_city)
1744             OR (    ( Recinfo.ship_to_city IS NULL )
1745                 AND (  p_ship_to_city IS NULL )))
1746        AND (    ( Recinfo.ship_to_state = p_ship_to_state)
1747             OR (    ( Recinfo.ship_to_state IS NULL )
1748                 AND (  p_ship_to_state IS NULL )))
1749        AND (    ( Recinfo.ship_to_postal_code = p_ship_to_postal_code)
1750             OR (    ( Recinfo.ship_to_postal_code IS NULL )
1751                 AND (  p_ship_to_postal_code IS NULL )))
1752        AND (    ( Recinfo.ship_to_country = p_ship_to_country)
1753             OR (    ( Recinfo.ship_to_country IS NULL )
1754                 AND (  p_ship_to_country IS NULL )))
1755        AND (    ( Recinfo.ship_to_contact_party_id = p_ship_to_contact_party_id)
1756             OR (    ( Recinfo.ship_to_contact_party_id IS NULL )
1757                 AND (  p_ship_to_contact_party_id IS NULL )))
1758        AND (    ( Recinfo.ship_to_contact_party_id = p_ship_to_contact_party_id)
1759             OR (    ( Recinfo.ship_to_contact_name IS NULL )
1760                 AND (  p_ship_to_contact_name IS NULL )))
1761        AND (    ( Recinfo.ship_to_email = p_ship_to_email)
1762             OR (    ( Recinfo.ship_to_email IS NULL )
1763                 AND (  p_ship_to_email IS NULL )))
1764        AND (    ( Recinfo.ship_to_phone = p_ship_to_phone)
1765             OR (    ( Recinfo.ship_to_phone IS NULL )
1766                 AND (  p_ship_to_phone IS NULL )))
1767        AND (    ( Recinfo.ship_to_fax = p_ship_to_fax)
1768             OR (    ( Recinfo.ship_to_fax IS NULL )
1769                 AND (  p_ship_to_fax IS NULL )))
1773        AND (    ( Recinfo.ship_from_site_id = p_ship_from_site_id)
1770        AND (    ( Recinfo.ship_from_cust_account_id = p_ship_from_cust_account_id)
1771             OR (    ( Recinfo.ship_from_cust_account_id IS NULL )
1772                 AND (  p_ship_from_cust_account_id IS NULL )))
1774             OR (    ( Recinfo.ship_from_site_id IS NULL )
1775                 AND (  p_ship_from_site_id IS NULL )))
1776        AND (    ( Recinfo.ship_from_PARTY_NAME = p_ship_from_PARTY_NAME)
1777             OR (    ( Recinfo.ship_from_PARTY_NAME IS NULL )
1778                 AND (  p_ship_from_PARTY_NAME IS NULL )))
1779        AND (    ( Recinfo.ship_from_location = p_ship_from_location)
1780             OR (    ( Recinfo.ship_from_location IS NULL )
1781                 AND (  p_ship_from_location IS NULL )))
1782        AND (    ( Recinfo.ship_from_address = p_ship_from_address)
1783             OR (    ( Recinfo.ship_from_address IS NULL )
1784                 AND (  p_ship_from_address IS NULL )))
1785        AND (    ( Recinfo.ship_from_city = p_ship_from_city)
1786             OR (    ( Recinfo.ship_from_city IS NULL )
1787                 AND (  p_ship_from_city IS NULL )))
1788        AND (    ( Recinfo.ship_from_state = p_ship_from_state)
1789             OR (    ( Recinfo.ship_from_state IS NULL )
1790                 AND (  p_ship_from_state IS NULL )))
1791        AND (    ( Recinfo.ship_from_postal_code = p_ship_from_postal_code)
1792             OR (    ( Recinfo.ship_from_postal_code IS NULL )
1793                 AND (  p_ship_from_postal_code IS NULL )))
1794        AND (    ( Recinfo.ship_from_country = p_ship_from_country)
1795             OR (    ( Recinfo.ship_from_country IS NULL )
1796                 AND (  p_ship_from_country IS NULL )))
1800        AND (    ( Recinfo.ship_from_contact_name = p_ship_from_contact_name)
1797        AND (    ( Recinfo.ship_from_contact_party_id = p_ship_from_contact_party_id)
1798             OR (    ( Recinfo.ship_from_contact_party_id IS NULL )
1799                 AND (  p_ship_from_contact_party_id IS NULL )))
1801             OR (    ( Recinfo.ship_from_contact_name IS NULL )
1802                 AND (  p_ship_from_contact_name IS NULL )))
1803        AND (    ( Recinfo.ship_from_email = p_ship_from_email)
1804             OR (    ( Recinfo.ship_from_email IS NULL )
1805                 AND (  p_ship_from_email IS NULL )))
1806        AND (    ( Recinfo.ship_from_phone = p_ship_from_phone)
1807             OR (    ( Recinfo.ship_from_phone IS NULL )
1808                 AND (  p_ship_from_phone IS NULL )))
1809        AND (    ( Recinfo.ship_from_fax = p_ship_from_fax)
1810             OR (    ( Recinfo.ship_from_fax IS NULL )
1811                 AND (  p_ship_from_fax IS NULL )))
1812        AND (    ( Recinfo.sold_from_cust_account_id = p_sold_from_cust_account_id)
1813             OR (    ( Recinfo.sold_from_cust_account_id IS NULL )
1814                 AND (  p_sold_from_cust_account_id IS NULL )))
1815        AND (    ( Recinfo.sold_from_site_id = p_sold_from_site_id)
1816             OR (    ( Recinfo.sold_from_site_id IS NULL )
1817                 AND (  p_sold_from_site_id IS NULL )))
1818        AND (    ( Recinfo.sold_from_PARTY_NAME = p_sold_from_PARTY_NAME)
1819             OR (    ( Recinfo.sold_from_PARTY_NAME IS NULL )
1820                 AND (  p_sold_from_PARTY_NAME IS NULL )))
1821        AND (    ( Recinfo.sold_from_location = p_sold_from_location)
1822             OR (    ( Recinfo.sold_from_location IS NULL )
1823                 AND (  p_sold_from_location IS NULL )))
1824        AND (    ( Recinfo.sold_from_address = p_sold_from_address)
1825             OR (    ( Recinfo.sold_from_address IS NULL )
1826                 AND (  p_sold_from_address IS NULL )))
1827        AND (    ( Recinfo.sold_from_city = p_sold_from_city)
1828             OR (    ( Recinfo.sold_from_city IS NULL )
1829                 AND (  p_sold_from_city IS NULL )))
1830        AND (    ( Recinfo.sold_from_state = p_sold_from_state)
1831             OR (    ( Recinfo.sold_from_state IS NULL )
1832                 AND (  p_sold_from_state IS NULL )))
1833        AND (    ( Recinfo.sold_from_postal_code = p_sold_from_postal_code)
1834             OR (    ( Recinfo.sold_from_postal_code IS NULL )
1835                 AND (  p_sold_from_postal_code IS NULL )))
1836        AND (    ( Recinfo.sold_from_country = p_sold_from_country)
1837             OR (    ( Recinfo.sold_from_country IS NULL )
1838                 AND (  p_sold_from_country IS NULL )))
1839        AND (    ( Recinfo.sold_from_contact_party_id = p_sold_from_contact_party_id)
1840             OR (    ( Recinfo.sold_from_contact_party_id IS NULL )
1841                 AND (  p_sold_from_contact_party_id IS NULL )))
1842        AND (    ( Recinfo.sold_from_contact_name = p_sold_from_contact_name)
1843             OR (    ( Recinfo.sold_from_contact_name IS NULL )
1844                 AND (  p_sold_from_contact_name IS NULL )))
1845        AND (    ( Recinfo.sold_from_email = p_sold_from_email)
1846             OR (    ( Recinfo.sold_from_email IS NULL )
1847                 AND (  p_sold_from_email IS NULL )))
1848        AND (    ( Recinfo.sold_from_phone = p_sold_from_phone)
1849             OR (    ( Recinfo.sold_from_phone IS NULL )
1850                 AND (  p_sold_from_phone IS NULL )))
1851        AND (    ( Recinfo.sold_from_fax = p_sold_from_fax)
1852             OR (    ( Recinfo.sold_from_fax IS NULL )
1853                 AND (  p_sold_from_fax IS NULL )))
1854        AND (    ( Recinfo.order_number = p_order_number)
1855             OR (    ( Recinfo.order_number IS NULL )
1856                 AND (  p_order_number IS NULL )))
1857        AND (    ( Recinfo.date_ordered = p_date_ordered)
1858             OR (    ( Recinfo.date_ordered IS NULL )
1859                 AND (  p_date_ordered IS NULL )))
1860        AND (    ( Recinfo.po_number = p_po_number)
1861             OR (    ( Recinfo.po_number IS NULL )
1862                 AND (  p_po_number IS NULL )))
1863        AND (    ( Recinfo.po_release_number = p_po_release_number)
1864             OR (    ( Recinfo.po_release_number IS NULL )
1865                 AND (  p_po_release_number IS NULL )))
1866        AND (    ( Recinfo.po_type = p_po_type)
1867             OR (    ( Recinfo.po_type IS NULL )
1868                 AND (  p_po_type IS NULL )))
1869        AND (    ( Recinfo.agreement_id = p_agreement_id)
1870             OR (    ( Recinfo.agreement_id IS NULL )
1871                 AND (  p_agreement_id IS NULL )))
1872        AND (    ( Recinfo.agreement_name = p_agreement_name)
1873             OR (    ( Recinfo.agreement_name IS NULL )
1874                 AND (  p_agreement_name IS NULL )))
1875        AND (    ( Recinfo.agreement_type = p_agreement_type)
1876             OR (    ( Recinfo.agreement_type IS NULL )
1877                 AND (  p_agreement_type IS NULL )))
1878        AND (    ( Recinfo.agreement_price = p_agreement_price)
1879             OR (    ( Recinfo.agreement_price IS NULL )
1883                 AND (  p_agreement_uom_code IS NULL )))
1880                 AND (  p_agreement_price IS NULL )))
1881        AND (    ( Recinfo.agreement_uom_code = p_agreement_uom_code)
1882             OR (    ( Recinfo.agreement_uom_code IS NULL )
1884        AND (    ( Recinfo.corrected_agreement_id = p_corrected_agreement_id)
1885             OR (    ( Recinfo.corrected_agreement_id IS NULL )
1886                 AND (  p_corrected_agreement_id IS NULL )))
1887        AND (    ( Recinfo.corrected_agreement_name = p_corrected_agreement_name)
1888             OR (    ( Recinfo.corrected_agreement_name IS NULL )
1889                 AND (  p_corrected_agreement_name IS NULL )))
1890        AND (    ( Recinfo.price_list_id = p_price_list_id)
1891             OR (    ( Recinfo.price_list_id IS NULL )
1892                 AND (  p_price_list_id IS NULL )))
1893        AND (    ( Recinfo.price_list_name = p_price_list_name)
1894             OR (    ( Recinfo.price_list_name IS NULL )
1895                 AND (  p_price_list_name IS NULL )))
1896        AND (    ( Recinfo.orig_system_quantity = p_orig_system_quantity)
1897             OR (    ( Recinfo.orig_system_quantity IS NULL )
1898                 AND (  p_orig_system_quantity IS NULL )))
1899        AND (    ( Recinfo.orig_system_uom = p_orig_system_uom)
1900             OR (    ( Recinfo.orig_system_uom IS NULL )
1901                 AND (  p_orig_system_uom IS NULL )))
1902        AND (    ( Recinfo.orig_system_currency_code = p_orig_system_currency_code)
1903             OR (    ( Recinfo.orig_system_currency_code IS NULL )
1904                 AND (  p_orig_system_currency_code IS NULL )))
1905        AND (    ( Recinfo.orig_system_selling_price = p_orig_system_selling_price)
1906             OR (    ( Recinfo.orig_system_selling_price IS NULL )
1907                 AND (  p_orig_system_selling_price IS NULL )))
1908        AND (    ( Recinfo.orig_system_reference = p_orig_system_reference)
1909             OR (    ( Recinfo.orig_system_reference IS NULL )
1910                 AND (  p_orig_system_reference IS NULL )))
1911        AND (    ( Recinfo.orig_system_line_reference = p_orig_system_line_reference)
1912             OR (    ( Recinfo.orig_system_line_reference IS NULL )
1913                 AND (  p_orig_system_line_reference IS NULL )))
1914        AND (    ( Recinfo.orig_system_purchase_uom = p_orig_system_purchase_uom)
1915             OR (    ( Recinfo.orig_system_purchase_uom IS NULL )
1916                 AND (  p_orig_system_purchase_uom IS NULL )))
1917        AND (    ( Recinfo.orig_system_purchase_curr = p_orig_system_purchase_curr)
1918             OR (    ( Recinfo.orig_system_purchase_curr IS NULL )
1919                 AND (  p_orig_system_purchase_curr IS NULL )))
1920        AND (    ( Recinfo.orig_system_purchase_price = p_orig_system_purchase_price)
1921             OR (    ( Recinfo.orig_system_purchase_price IS NULL )
1922                 AND (  p_orig_system_purchase_price IS NULL )))
1923        AND (    ( Recinfo.orig_system_purchase_quantity = p_orig_system_purchase_quant)
1924             OR (    ( Recinfo.orig_system_purchase_quantity IS NULL )
1925                 AND (  p_orig_system_purchase_quant IS NULL )))
1926        AND (    ( Recinfo.orig_system_agreement_uom = p_orig_system_agreement_uom)
1927             OR (    ( Recinfo.orig_system_agreement_uom IS NULL )
1928                 AND (  p_orig_system_agreement_uom IS NULL )))
1929        AND (    ( Recinfo.ORIG_SYSTEM_AGREEMENT_name = p_ORIG_SYSTEM_AGREEMENT_name)
1930             OR (    ( Recinfo.ORIG_SYSTEM_AGREEMENT_name IS NULL )
1931                 AND (  p_ORIG_SYSTEM_AGREEMENT_name IS NULL )))
1932        AND (    ( Recinfo.orig_system_agreement_type = p_orig_system_agreement_type)
1933             OR (    ( Recinfo.orig_system_agreement_type IS NULL )
1934                 AND (  p_orig_system_agreement_type IS NULL )))
1935        AND (    ( Recinfo.orig_system_agreement_status = p_orig_system_agreement_status)
1936             OR (    ( Recinfo.orig_system_agreement_status IS NULL )
1937                 AND (  p_orig_system_agreement_status IS NULL )))
1938       AND (    ( Recinfo.orig_system_agreement_curr = p_orig_system_agreement_curr)
1939             OR (    ( Recinfo.orig_system_agreement_curr IS NULL )
1940                 AND (  p_orig_system_agreement_curr IS NULL )))
1941        AND (    ( Recinfo.orig_system_agreement_price = p_orig_system_agreement_price)
1942             OR (    ( Recinfo.orig_system_agreement_price IS NULL )
1943                 AND (  p_orig_system_agreement_price IS NULL )))
1944        AND (    ( Recinfo.orig_system_agreement_quantity = p_orig_system_agreement_quant)
1945             OR (    ( Recinfo.orig_system_agreement_quantity IS NULL )
1946                 AND (  p_orig_system_agreement_quant IS NULL )))
1947        AND (    ( Recinfo.orig_system_item_number = p_orig_system_item_number)
1948             OR (    ( Recinfo.orig_system_item_number IS NULL )
1949                 AND (  p_orig_system_item_number IS NULL )))
1950        AND (    ( Recinfo.quantity = p_quantity)
1951             OR (    ( Recinfo.quantity IS NULL )
1952                 AND (  p_quantity IS NULL )))
1953        AND (    ( Recinfo.uom_code = p_uom_code)
1954             OR (    ( Recinfo.uom_code IS NULL )
1955                 AND (  p_uom_code IS NULL )))
1956        AND (    ( Recinfo.currency_code = p_currency_code)
1957             OR (    ( Recinfo.currency_code IS NULL )
1958                 AND (  p_currency_code IS NULL )))
1959        AND (    ( Recinfo.exchange_rate = p_exchange_rate)
1960             OR (    ( Recinfo.exchange_rate IS NULL )
1961                 AND (  p_exchange_rate IS NULL )))
1965        AND (    ( Recinfo.exchange_rate_date = p_exchange_rate_date)
1962        AND (    ( Recinfo.exchange_rate_type = p_exchange_rate_type)
1963             OR (    ( Recinfo.exchange_rate_type IS NULL )
1964                 AND (  p_exchange_rate_type IS NULL )))
1966             OR (    ( Recinfo.exchange_rate_date IS NULL )
1967                 AND (  p_exchange_rate_date IS NULL )))
1968        AND (    ( Recinfo.selling_price = p_selling_price)
1969             OR (    ( Recinfo.selling_price IS NULL )
1970                 AND (  p_selling_price IS NULL )))
1971        AND (    ( Recinfo.purchase_uom_code = p_purchase_uom_code)
1972             OR (    ( Recinfo.purchase_uom_code IS NULL )
1973                 AND (  p_purchase_uom_code IS NULL )))
1974        AND (    ( Recinfo.invoice_number = p_invoice_number)
1975             OR (    ( Recinfo.invoice_number IS NULL )
1976                 AND (  p_invoice_number IS NULL )))
1977        AND (    ( Recinfo.date_invoiced= p_date_invoiced)
1978             OR (    ( Recinfo.date_invoiced IS NULL )
1979                 AND (  p_date_invoiced IS NULL )))
1980        AND (    ( Recinfo.date_shipped = p_date_shipped)
1981             OR (    ( Recinfo.date_shipped IS NULL )
1982                 AND (  p_date_shipped IS NULL )))
1983        AND (    ( Recinfo.credit_advice_date = p_credit_advice_date)
1984             OR (    ( Recinfo.credit_advice_date IS NULL )
1985                 AND (  p_credit_advice_date IS NULL )))
1986        AND (    ( Recinfo.product_category_id = p_product_category_id)
1987             OR (    ( Recinfo.product_category_id IS NULL )
1988                 AND (  p_product_category_id IS NULL )))
1989        AND (    ( Recinfo.category_name = p_category_name)
1990             OR (    ( Recinfo.category_name IS NULL )
1991                 AND (  p_category_name IS NULL )))
1992        AND (    ( Recinfo.inventory_item_segment1 = p_inventory_item_segment1)
1993             OR (    ( Recinfo.inventory_item_segment1 IS NULL )
1994                 AND (  p_inventory_item_segment1 IS NULL )))
1995        AND (    ( Recinfo.inventory_item_segment2 = p_inventory_item_segment2)
1996             OR (    ( Recinfo.inventory_item_segment2 IS NULL )
1997                 AND (  p_inventory_item_segment2 IS NULL )))
1998        AND (    ( Recinfo.inventory_item_segment3 = p_inventory_item_segment3)
1999             OR (    ( Recinfo.inventory_item_segment3 IS NULL )
2000                 AND (  p_inventory_item_segment3 IS NULL )))
2001        AND (    ( Recinfo.inventory_item_segment4 = p_inventory_item_segment4)
2002             OR (    ( Recinfo.inventory_item_segment4 IS NULL )
2003                 AND (  p_inventory_item_segment4 IS NULL )))
2004        AND (    ( Recinfo.inventory_item_segment5 = p_inventory_item_segment5)
2005             OR (    ( Recinfo.inventory_item_segment5 IS NULL )
2006                 AND (  p_inventory_item_segment5 IS NULL )))
2007        AND (    ( Recinfo.inventory_item_segment6 = p_inventory_item_segment6)
2008             OR (    ( Recinfo.inventory_item_segment6 IS NULL )
2009                 AND (  p_inventory_item_segment6 IS NULL )))
2010        AND (    ( Recinfo.inventory_item_segment7 = p_inventory_item_segment7)
2011             OR (    ( Recinfo.inventory_item_segment7 IS NULL )
2012                 AND (  p_inventory_item_segment7 IS NULL )))
2013        AND (    ( Recinfo.inventory_item_segment8 = p_inventory_item_segment8)
2014             OR (    ( Recinfo.inventory_item_segment8 IS NULL )
2015                 AND (  p_inventory_item_segment8 IS NULL )))
2016        AND (    ( Recinfo.inventory_item_segment9 = p_inventory_item_segment9)
2017             OR (    ( Recinfo.inventory_item_segment9 IS NULL )
2018                 AND (  p_inventory_item_segment9 IS NULL )))
2019        AND (    ( Recinfo.inventory_item_segment10 = p_inventory_item_segment10)
2020             OR (    ( Recinfo.inventory_item_segment10 IS NULL )
2021                 AND (  p_inventory_item_segment10 IS NULL )))
2022        AND (    ( Recinfo.inventory_item_segment11 = p_inventory_item_segment11)
2023             OR (    ( Recinfo.inventory_item_segment11 IS NULL )
2024                 AND (  p_inventory_item_segment11 IS NULL )))
2025        AND (    ( Recinfo.inventory_item_segment12 = p_inventory_item_segment12)
2026             OR (    ( Recinfo.inventory_item_segment12 IS NULL )
2027                 AND (  p_inventory_item_segment12 IS NULL )))
2028        AND (    ( Recinfo.inventory_item_segment13 = p_inventory_item_segment13)
2029             OR (    ( Recinfo.inventory_item_segment13 IS NULL )
2030                 AND (  p_inventory_item_segment13 IS NULL )))
2031        AND (    ( Recinfo.inventory_item_segment14 = p_inventory_item_segment14)
2032             OR (    ( Recinfo.inventory_item_segment14 IS NULL )
2033                 AND (  p_inventory_item_segment14 IS NULL )))
2034        AND (    ( Recinfo.inventory_item_segment15 = p_inventory_item_segment15)
2035             OR (    ( Recinfo.inventory_item_segment15 IS NULL )
2036                 AND (  p_inventory_item_segment15 IS NULL )))
2037        AND (    ( Recinfo.inventory_item_segment16 = p_inventory_item_segment16)
2038             OR (    ( Recinfo.inventory_item_segment16 IS NULL )
2039                 AND (  p_inventory_item_segment16 IS NULL )))
2040        AND (    ( Recinfo.inventory_item_segment17 = p_inventory_item_segment17)
2041             OR (    ( Recinfo.inventory_item_segment17 IS NULL )
2042                 AND (  p_inventory_item_segment17 IS NULL )))
2043        AND (    ( Recinfo.inventory_item_segment18 = p_inventory_item_segment18)
2044             OR (    ( Recinfo.inventory_item_segment18 IS NULL )
2045                 AND (  p_inventory_item_segment18 IS NULL )))
2046        AND (    ( Recinfo.inventory_item_segment19 = p_inventory_item_segment19)
2047             OR (    ( Recinfo.inventory_item_segment19 IS NULL )
2048                 AND (  p_inventory_item_segment19 IS NULL )))
2049        AND (    ( Recinfo.inventory_item_segment20 = p_inventory_item_segment20)
2053             OR (    ( Recinfo.inventory_item_id IS NULL )
2050             OR (    ( Recinfo.inventory_item_segment20 IS NULL )
2051                 AND (  p_inventory_item_segment20 IS NULL )))
2052        AND (    ( Recinfo.inventory_item_id = p_inventory_item_id)
2054                 AND (  p_inventory_item_id IS NULL )))
2055        AND (    ( Recinfo.item_description = p_item_description)
2056             OR (    ( Recinfo.item_description IS NULL )
2057                 AND (  p_item_description IS NULL )))
2058        AND (    ( Recinfo.upc_code = p_upc_code)
2059             OR (    ( Recinfo.upc_code IS NULL )
2060                 AND (  p_upc_code IS NULL )))
2061        AND (    ( Recinfo.item_number = p_item_number)
2062             OR (    ( Recinfo.item_number IS NULL )
2063                 AND (  p_item_number IS NULL )))
2064        AND (    ( Recinfo.claimed_amount = p_claimed_amount)
2065             OR (    ( Recinfo.claimed_amount IS NULL )
2066                 AND (  p_claimed_amount IS NULL )))
2067        AND (    ( Recinfo.purchase_price = p_purchase_price)
2068             OR (    ( Recinfo.purchase_price IS NULL )
2069                 AND (  p_purchase_price IS NULL )))
2070        AND (    ( Recinfo.acctd_purchase_price = p_acctd_purchase_price)
2071             OR (    ( Recinfo.acctd_purchase_price IS NULL )
2072                 AND (  p_acctd_purchase_price IS NULL )))
2073        AND (    ( Recinfo.net_adjusted_amount = p_net_adjusted_amount)
2074             OR (    ( Recinfo.net_adjusted_amount IS NULL )
2075                 AND (  p_net_adjusted_amount IS NULL )))
2076        AND (    ( Recinfo.accepted_amount = p_accepted_amount)
2077             OR (    ( Recinfo.accepted_amount IS NULL )
2078                 AND (  p_accepted_amount IS NULL )))
2079        AND (    ( Recinfo.total_accepted_amount = p_total_accepted_amount)
2080             OR (    ( Recinfo.total_accepted_amount IS NULL )
2081                 AND (  p_total_accepted_amount IS NULL )))
2082        AND (    ( Recinfo.allowed_amount = p_allowed_amount)
2083             OR (    ( Recinfo.allowed_amount IS NULL )
2084                 AND (  p_allowed_amount IS NULL )))
2085        AND (    ( Recinfo.total_allowed_amount = p_total_allowed_amount)
2086             OR (    ( Recinfo.total_allowed_amount IS NULL )
2087                 AND (  p_total_allowed_amount IS NULL )))
2088        AND (    ( Recinfo.calculated_price = p_calculated_price)
2089             OR (    ( Recinfo.calculated_price IS NULL )
2090                 AND (  p_calculated_price IS NULL )))
2091        AND (    ( Recinfo.acctd_calculated_price = p_acctd_calculated_price)
2092             OR (    ( Recinfo.acctd_calculated_price IS NULL )
2093                 AND (  p_acctd_calculated_price IS NULL )))
2094        AND (    ( Recinfo.calculated_amount = p_calculated_amount)
2095             OR (    ( Recinfo.calculated_amount IS NULL )
2096                 AND (  p_calculated_amount IS NULL )))
2097        AND (    ( Recinfo.line_tolerance_amount = p_line_tolerance_amount)
2098             OR (    ( Recinfo.line_tolerance_amount IS NULL )
2099                 AND (  p_line_tolerance_amount IS NULL )))
2100        AND (    ( Recinfo.total_claimed_amount = p_total_claimed_amount)
2101             OR (    ( Recinfo.total_claimed_amount IS NULL )
2102                 AND (  p_total_claimed_amount IS NULL )))
2103        AND (    ( Recinfo.credit_code = p_credit_code)
2104             OR (    ( Recinfo.credit_code IS NULL )
2105                 AND (  p_credit_code IS NULL )))
2106        AND (    ( Recinfo.direct_customer_flag = p_direct_customer_flag)
2107             OR (    ( Recinfo.direct_customer_flag IS NULL )
2108                 AND (  p_direct_customer_flag IS NULL )))
2109        AND (    ( Recinfo.duplicated_line_id = p_duplicated_line_id)
2110             OR (    ( Recinfo.duplicated_line_id IS NULL )
2111                 AND (  p_duplicated_line_id IS NULL )))
2112        AND (    ( Recinfo.duplicated_adjustment_id = p_duplicated_adjustment_id)
2113             OR (    ( Recinfo.duplicated_adjustment_id IS NULL )
2114                 AND (  p_duplicated_adjustment_id IS NULL )))
2115        AND (    ( Recinfo.order_type_id = p_order_type_id)
2116             OR (    ( Recinfo.order_type_id IS NULL )
2117                 AND (  p_order_type_id IS NULL )))
2118        AND (    ( Recinfo.order_type = p_order_type)
2119             OR (    ( Recinfo.order_type IS NULL )
2120                 AND (  p_order_type IS NULL )))
2121        AND (    ( Recinfo.order_category = p_order_category)
2122             OR (    ( Recinfo.order_category IS NULL )
2123                 AND (  p_order_category IS NULL )))
2124        AND (    ( Recinfo.dispute_code = p_dispute_code)
2125             OR (    ( Recinfo.dispute_code IS NULL )
2126                 AND (  p_dispute_code IS NULL )))
2127        AND (    ( Recinfo.data_source_code = p_data_source_code)
2128             OR (    ( Recinfo.data_source_code IS NULL )
2129                 AND (  p_data_source_code IS NULL )))
2130        AND (    ( Recinfo.tracing_flag = p_tracing_flag)
2131             OR (    ( Recinfo.tracing_flag IS NULL )
2132                 AND (  p_tracing_flag IS NULL )))
2133        AND (    ( Recinfo.header_attribute_category = p_header_attribute_category)
2134             OR (    ( Recinfo.header_attribute_category IS NULL )
2135                 AND (  p_header_attribute_category IS NULL )))
2136        AND (    ( Recinfo.header_attribute1 = p_header_attribute1)
2137             OR (    ( Recinfo.header_attribute1 IS NULL )
2138                 AND (  p_header_attribute1 IS NULL )))
2139        AND (    ( Recinfo.header_attribute2 = p_header_attribute2)
2140             OR (    ( Recinfo.header_attribute2 IS NULL )
2141                 AND (  p_header_attribute2 IS NULL )))
2142        AND (    ( Recinfo.header_attribute3 = p_header_attribute3)
2143             OR (    ( Recinfo.header_attribute3 IS NULL )
2144                 AND (  p_header_attribute3 IS NULL )))
2148        AND (    ( Recinfo.header_attribute5 = p_header_attribute5)
2145        AND (    ( Recinfo.header_attribute4 = p_header_attribute4)
2146             OR (    ( Recinfo.header_attribute4 IS NULL )
2147                 AND (  p_header_attribute4 IS NULL )))
2149             OR (    ( Recinfo.header_attribute5 IS NULL )
2150                 AND (  p_header_attribute5 IS NULL )))
2151        AND (    ( Recinfo.header_attribute6 = p_header_attribute6)
2152             OR (    ( Recinfo.header_attribute6 IS NULL )
2153                 AND (  p_header_attribute6 IS NULL )))
2154        AND (    ( Recinfo.header_attribute7 = p_header_attribute7)
2155             OR (    ( Recinfo.header_attribute7 IS NULL )
2156                 AND (  p_header_attribute7 IS NULL )))
2157        AND (    ( Recinfo.header_attribute8 = p_header_attribute8)
2158             OR (    ( Recinfo.header_attribute8 IS NULL )
2159                 AND (  p_header_attribute8 IS NULL )))
2160        AND (    ( Recinfo.header_attribute9 = p_header_attribute9)
2161             OR (    ( Recinfo.header_attribute9 IS NULL )
2162                 AND (  p_header_attribute9 IS NULL )))
2163        AND (    ( Recinfo.header_attribute10 = p_header_attribute10)
2164             OR (    ( Recinfo.header_attribute10 IS NULL )
2165                 AND (  p_header_attribute10 IS NULL )))
2166        AND (    ( Recinfo.header_attribute11 = p_header_attribute11)
2167             OR (    ( Recinfo.header_attribute11 IS NULL )
2168                 AND (  p_header_attribute11 IS NULL )))
2169        AND (    ( Recinfo.header_attribute12 = p_header_attribute12)
2170             OR (    ( Recinfo.header_attribute12 IS NULL )
2171                 AND (  p_header_attribute12 IS NULL )))
2172        AND (    ( Recinfo.header_attribute13 = p_header_attribute13)
2173             OR (    ( Recinfo.header_attribute13 IS NULL )
2174                 AND (  p_header_attribute13 IS NULL )))
2175        AND (    ( Recinfo.header_attribute14 = p_header_attribute14)
2176             OR (    ( Recinfo.header_attribute14 IS NULL )
2177                 AND (  p_header_attribute14 IS NULL )))
2178        AND (    ( Recinfo.header_attribute15 = p_header_attribute15)
2179             OR (    ( Recinfo.header_attribute15 IS NULL )
2180                 AND (  p_header_attribute15 IS NULL )))
2181        AND (    ( Recinfo.line_attribute_category = p_line_attribute_category)
2182             OR (    ( Recinfo.line_attribute_category IS NULL )
2183                 AND (  p_line_attribute_category IS NULL )))
2184        AND (    ( Recinfo.line_attribute1 = p_line_attribute1)
2185             OR (    ( Recinfo.line_attribute1 IS NULL )
2186                 AND (  p_line_attribute1 IS NULL )))
2187        AND (    ( Recinfo.line_attribute2 = p_line_attribute2)
2188             OR (    ( Recinfo.line_attribute2 IS NULL )
2189                 AND (  p_line_attribute2 IS NULL )))
2190        AND (    ( Recinfo.line_attribute3 = p_line_attribute3)
2191             OR (    ( Recinfo.line_attribute3 IS NULL )
2192                 AND (  p_line_attribute3 IS NULL )))
2193        AND (    ( Recinfo.line_attribute4 = p_line_attribute4)
2194             OR (    ( Recinfo.line_attribute4 IS NULL )
2195                 AND (  p_line_attribute4 IS NULL )))
2196        AND (    ( Recinfo.line_attribute5 = p_line_attribute5)
2197             OR (    ( Recinfo.line_attribute5 IS NULL )
2198                 AND (  p_line_attribute5 IS NULL )))
2199        AND (    ( Recinfo.line_attribute6 = p_line_attribute6)
2200             OR (    ( Recinfo.line_attribute6 IS NULL )
2201                 AND (  p_line_attribute6 IS NULL )))
2202        AND (    ( Recinfo.line_attribute7 = p_line_attribute7)
2203             OR (    ( Recinfo.line_attribute7 IS NULL )
2204                 AND (  p_line_attribute7 IS NULL )))
2205        AND (    ( Recinfo.line_attribute8 = p_line_attribute8)
2206             OR (    ( Recinfo.line_attribute8 IS NULL )
2207                 AND (  p_line_attribute8 IS NULL )))
2208        AND (    ( Recinfo.line_attribute9 = p_line_attribute9)
2209             OR (    ( Recinfo.line_attribute9 IS NULL )
2210                 AND (  p_line_attribute9 IS NULL )))
2211        AND (    ( Recinfo.line_attribute10 = p_line_attribute10)
2212             OR (    ( Recinfo.line_attribute10 IS NULL )
2213                 AND (  p_line_attribute10 IS NULL )))
2214        AND (    ( Recinfo.line_attribute11 = p_line_attribute11)
2215             OR (    ( Recinfo.line_attribute11 IS NULL )
2216                 AND (  p_line_attribute11 IS NULL )))
2217        AND (    ( Recinfo.line_attribute12 = p_line_attribute12)
2218             OR (    ( Recinfo.line_attribute12 IS NULL )
2219                 AND (  p_line_attribute12 IS NULL )))
2220        AND (    ( Recinfo.line_attribute13 = p_line_attribute13)
2221             OR (    ( Recinfo.line_attribute13 IS NULL )
2222                 AND (  p_line_attribute13 IS NULL )))
2223        AND (    ( Recinfo.line_attribute14 = p_line_attribute14)
2224             OR (    ( Recinfo.line_attribute14 IS NULL )
2225                 AND (  p_line_attribute14 IS NULL )))
2226        AND (    ( Recinfo.line_attribute15 = p_line_attribute15)
2227             OR (    ( Recinfo.line_attribute15 IS NULL )
2228                 AND (  p_line_attribute15 IS NULL )))
2229        AND (    ( Recinfo.org_id = p_org_id)
2230             OR (    ( Recinfo.org_id IS NULL )
2231                 AND (  p_org_id IS NULL )))
2232 
2233 	  -- For Bug#9447673 SSD IDSM ER(+)
2234 
2235        AND (    ( Recinfo.invoice_line_number = p_invoice_line_number)
2236             OR (    ( Recinfo.invoice_line_number IS NULL )
2237                 AND (  p_invoice_line_number IS NULL )))
2238 
2239        AND (    ( Recinfo.order_line_number = p_order_line_number)
2240             OR (    ( Recinfo.order_line_number IS NULL )
2241                 AND (  p_order_line_number IS NULL )))
2242 
2246 
2243        AND (    ( Recinfo.supplier_item_cost = p_supplier_item_cost)
2244             OR (    ( Recinfo.supplier_item_cost IS NULL )
2245                 AND (  p_supplier_item_cost IS NULL )))
2247        AND (    ( Recinfo.supplier_item_uom = p_supplier_item_uom)
2248             OR (    ( Recinfo.supplier_item_uom IS NULL )
2249                 AND (  p_supplier_item_uom IS NULL )))
2250 
2251 	  -- For Bug#9447673 SSD IDSM ER(-)
2252 
2253 
2254 
2255 
2256 
2257        ) THEN
2258        RETURN;
2259    ELSE
2260        FND_MESSAGE.SET_NAME('FND', 'FORM_RECORD_CHANGED');
2261        APP_EXCEPTION.RAISE_EXCEPTION;
2262    END IF;
2263 END Lock_Row;
2264 
2265 END OZF_RESALE_LINES_INT_PKG;