DBA Data[Home] [Help]

PACKAGE BODY: APPS.OZF_RESALE_LINES_PKG

Source


1 PACKAGE BODY OZF_RESALE_LINES_PKG as
2 /* $Header: ozftrslb.pls 120.1.12000000.2 2007/05/28 10:44:23 ateotia ship $ */
3 -- ===============================================================
4 -- Start of Comments
5 -- Package name
6 --          OZF_RESALE_LINES_PKG
7 -- Purpose
8 --
9 -- History
10 -- Anuj Teotia              28/05/2007       bug # 5997978 fixed
11 --
12 -- NOTE
13 --
14 -- End of Comments
15 -- ===============================================================
16 
17 
18 G_PKG_NAME CONSTANT VARCHAR2(30):= 'OZF_RESALE_LINES_PKG';
19 G_FILE_NAME CONSTANT VARCHAR2(12) := 'ozftrslb.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           p_resale_line_id    NUMBER,
40           p_resale_header_id    NUMBER,
41           p_resale_transfer_type    VARCHAR2,
42           px_object_version_number   IN OUT NOCOPY  NUMBER,
43           p_last_update_date    DATE,
44           p_last_updated_by    NUMBER,
45           p_creation_date    DATE,
46           p_request_id    NUMBER,
47           p_created_by    NUMBER,
48           p_created_from    VARCHAR2,
49           p_last_update_login    NUMBER,
50           p_program_application_id    NUMBER,
51           p_program_update_date    DATE,
52           p_program_id    NUMBER,
53           p_status_code    VARCHAR2,
54           p_product_trans_movement_type    VARCHAR2,
55           p_product_transfer_date    DATE,
56           p_end_cust_party_id    NUMBER,
57           p_end_cust_site_use_id    NUMBER,
58           p_end_cust_site_use_code   VARCHAR2,
59           p_end_cust_party_site_id    NUMBER,
60           p_end_cust_party_name    VARCHAR2,
61           p_end_cust_location    VARCHAR2,
62           p_end_cust_address    VARCHAR2,
63           p_end_cust_city    VARCHAR2,
64           p_end_cust_state    VARCHAR2,
65           p_end_cust_postal_code    VARCHAR2,
66           p_end_cust_country    VARCHAR2,
67           p_end_cust_contact_party_id    NUMBER,
68 	  p_end_cust_contact_name    VARCHAR2,
69 	  p_end_cust_email    VARCHAR2,
70           p_end_cust_phone    VARCHAR2,
71           p_end_cust_fax    VARCHAR2,
72           p_bill_to_cust_account_id    NUMBER,
73           p_bill_to_site_use_id    NUMBER,
74           p_bill_to_PARTY_NAME    VARCHAR2,
75           p_bill_to_PARTY_ID      NUMBER,
76           p_bill_to_PARTY_site_id NUMBER,
77           p_bill_to_duns_number     VARCHAR2,
78 	  p_bill_to_location    VARCHAR2,
79           p_bill_to_address    VARCHAR2,
80           p_bill_to_city    VARCHAR2,
81           p_bill_to_state    VARCHAR2,
82           p_bill_to_postal_code    VARCHAR2,
83           p_bill_to_country    VARCHAR2,
84           p_bill_to_contact_party_id    NUMBER,
85           p_bill_to_contact_name    VARCHAR2,
86           p_bill_to_email  VARCHAR2,
87           p_bill_to_phone  VARCHAR2,
88           p_bill_to_fax   VARCHAR2,
89           p_ship_to_cust_account_id    NUMBER,
90           p_ship_to_site_use_id    NUMBER,
91           p_ship_to_PARTY_NAME    VARCHAR2,
92           p_ship_to_PARTY_ID      NUMBER,
93           p_ship_to_PARTY_site_id NUMBER,
94           p_ship_to_duns_number     VARCHAR2,
95           p_ship_to_location    VARCHAR2,
96           p_ship_to_address    VARCHAR2,
97           p_ship_to_city    VARCHAR2,
98           p_ship_to_state    VARCHAR2,
99           p_ship_to_postal_code    VARCHAR2,
100           p_ship_to_country    VARCHAR2,
101           p_ship_to_contact_party_id    NUMBER,
102           p_ship_to_contact_name    VARCHAR2,
103           p_ship_to_email  VARCHAR2,
104           p_ship_to_phone  VARCHAR2,
105           p_ship_to_fax   VARCHAR2,
106           p_ship_from_cust_account_id    NUMBER,
107           p_ship_from_site_id    NUMBER,
108           p_ship_from_PARTY_NAME    VARCHAR2,
109           p_ship_from_location    VARCHAR2,
110           p_ship_from_address    VARCHAR2,
111           p_ship_from_city    VARCHAR2,
112           p_ship_from_state    VARCHAR2,
113           p_ship_from_postal_code    VARCHAR2,
114           p_ship_from_country    VARCHAR2,
115           p_ship_from_contact_party_id    NUMBER,
116           p_ship_from_contact_name    VARCHAR2,
117           p_ship_from_email  VARCHAR2,
118           p_ship_from_phone  VARCHAR2,
119           p_ship_from_fax   VARCHAR2,
120           p_sold_from_cust_account_id    NUMBER,
121           p_sold_from_site_id    NUMBER,
122           p_sold_from_PARTY_NAME    VARCHAR2,
123           p_sold_from_location    VARCHAR2,
124           p_sold_from_address    VARCHAR2,
125           p_sold_from_city    VARCHAR2,
126           p_sold_from_state    VARCHAR2,
127           p_sold_from_postal_code    VARCHAR2,
128           p_sold_from_country    VARCHAR2,
129           p_sold_from_contact_party_id    NUMBER,
130           p_sold_from_contact_name    VARCHAR2,
131           p_sold_from_email  VARCHAR2,
132           p_sold_from_phone  VARCHAR2,
133           p_sold_from_fax   VARCHAR2,
134           p_price_list_id    NUMBER,
135           p_price_list_name    VARCHAR2,
136           p_invoice_number    VARCHAR2,
137           p_date_invoiced   DATE,
138           p_po_number    VARCHAR2,
139           p_po_release_number    VARCHAR2,
140           p_po_type    VARCHAR2,
141           p_order_number    VARCHAR2,
142           p_date_ordered    DATE,
143           p_date_shipped    DATE,
144 	  p_purchase_uom_code    VARCHAR2,
145           p_quantity    NUMBER,
146           p_uom_code    VARCHAR2,
147           p_currency_code    VARCHAR2,
148           p_exchange_rate    NUMBER,
149           p_exchange_rate_type    VARCHAR2,
150           p_exchange_rate_date    DATE,
151           p_selling_price    NUMBER,
152           p_acctd_selling_price    NUMBER,
153           p_purchase_price    NUMBER,
154           p_acctd_purchase_price    NUMBER,
155 	  p_tracing_flag     VARCHAR2,
156           p_orig_system_quantity    NUMBER,
157           p_orig_system_uom    VARCHAR2,
158           p_orig_system_currency_code    VARCHAR2,
159           p_orig_system_selling_price    NUMBER,
160           p_orig_system_reference    VARCHAR2,
161           p_orig_system_line_reference    VARCHAR2,
162 	  p_orig_system_purchase_uom  varchar2,
163 	  p_orig_system_purchase_curr      VARCHAR2,
164           p_orig_system_purchase_price      NUMBER,
165           p_orig_system_purchase_quant   NUMBER,
166           p_orig_system_item_number  varchar2,
167           p_product_category_id    NUMBER,
168           p_category_name    VARCHAR2,
169           p_inventory_item_segment1    VARCHAR2,
170           p_inventory_item_segment2    VARCHAR2,
171           p_inventory_item_segment3    VARCHAR2,
172           p_inventory_item_segment4    VARCHAR2,
173           p_inventory_item_segment5    VARCHAR2,
174           p_inventory_item_segment6    VARCHAR2,
175           p_inventory_item_segment7    VARCHAR2,
176           p_inventory_item_segment8    VARCHAR2,
177           p_inventory_item_segment9    VARCHAR2,
178           p_inventory_item_segment10    VARCHAR2,
179           p_inventory_item_segment11    VARCHAR2,
180           p_inventory_item_segment12    VARCHAR2,
181           p_inventory_item_segment13    VARCHAR2,
182           p_inventory_item_segment14    VARCHAR2,
183           p_inventory_item_segment15    VARCHAR2,
184           p_inventory_item_segment16    VARCHAR2,
185           p_inventory_item_segment17    VARCHAR2,
186           p_inventory_item_segment18    VARCHAR2,
187           p_inventory_item_segment19    VARCHAR2,
188           p_inventory_item_segment20    VARCHAR2,
189           p_inventory_item_id    NUMBER,
190           p_item_description    VARCHAR2,
191           p_upc_code    VARCHAR2,
192           p_item_number    VARCHAR2,
193           p_direct_customer_flag    VARCHAR2,
194           p_attribute_category    VARCHAR2,
195           p_attribute1    VARCHAR2,
196           p_attribute2    VARCHAR2,
197           p_attribute3    VARCHAR2,
198           p_attribute4    VARCHAR2,
199           p_attribute5    VARCHAR2,
200           p_attribute6    VARCHAR2,
201           p_attribute7    VARCHAR2,
202           p_attribute8    VARCHAR2,
203           p_attribute9    VARCHAR2,
204           p_attribute10    VARCHAR2,
205           p_attribute11    VARCHAR2,
206           p_attribute12    VARCHAR2,
207           p_attribute13    VARCHAR2,
208           p_attribute14    VARCHAR2,
209           p_attribute15    VARCHAR2,
210           p_line_attribute_category    VARCHAR2,
211           p_line_attribute1    VARCHAR2,
212           p_line_attribute2    VARCHAR2,
213           p_line_attribute3    VARCHAR2,
214           p_line_attribute4    VARCHAR2,
215           p_line_attribute5    VARCHAR2,
216           p_line_attribute6    VARCHAR2,
217           p_line_attribute7    VARCHAR2,
218           p_line_attribute8    VARCHAR2,
219           p_line_attribute9    VARCHAR2,
220           p_line_attribute10    VARCHAR2,
221           p_line_attribute11    VARCHAR2,
222           p_line_attribute12    VARCHAR2,
223           p_line_attribute13    VARCHAR2,
224           p_line_attribute14    VARCHAR2,
225           p_line_attribute15    VARCHAR2,
226           px_org_id   IN OUT NOCOPY  NUMBER)
227 
228  IS
229    x_rowid    VARCHAR2(30);
230    l_batch_org_id NUMBER; -- bug # 5997978 fixed
231 
232 
233 BEGIN
234    -- Start: bug # 5997978 fixed
235    IF px_org_id IS NULL THEN
236       OPEN OZF_RESALE_COMMON_PVT.g_resale_header_org_id_csr(p_resale_header_id);
237       FETCH OZF_RESALE_COMMON_PVT.g_resale_header_org_id_csr INTO l_batch_org_id;
238       CLOSE OZF_RESALE_COMMON_PVT.g_resale_header_org_id_csr;
239       px_org_id := MO_GLOBAL.get_valid_org(l_batch_org_id);
240       IF (l_batch_org_id IS NULL OR px_org_id IS NULL) THEN
241          OZF_UTILITY_PVT.error_message(p_message_name => 'OZF_ORG_ID_NOTFOUND');
242          RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
243       END IF;
244       /* IF (px_org_id IS NULL OR px_org_id = FND_API.G_MISS_NUM) THEN
245       SELECT NVL(SUBSTRB(USERENV('CLIENT_INFO'),1,10),-99)
246       INTO px_org_id
247       FROM DUAL;*/
248    END IF;
249    -- End: bug # 5997978 fixed
250 
251 
252    px_object_version_number := 1;
253 
254 
255    INSERT INTO OZF_RESALE_LINES_ALL(
256            resale_line_id,
257            resale_header_id,
258            resale_transfer_type,
259            object_version_number,
260            last_update_date,
261            last_updated_by,
262            creation_date,
263            request_id,
264            created_by,
265            created_from,
266            last_update_login,
267            program_application_id,
268            program_update_date,
269            program_id,
270            status_code,
271            product_transfer_movement_type,
272            product_transfer_date,
273            end_cust_party_id,
274            end_cust_site_use_id,
275 	   end_cust_site_use_code,
276            end_cust_party_site_id,
277            end_cust_party_name,
278            end_cust_location,
279            end_cust_address,
280            end_cust_city,
281            end_cust_state,
282            end_cust_postal_code,
283            end_cust_country,
284            end_cust_contact_party_id,
285 	   end_cust_contact_name,
286            end_cust_email,
287            end_cust_phone,
288            end_cust_fax,
289            bill_to_cust_account_id,
290            bill_to_site_use_id,
291            bill_to_PARTY_NAME,
292 	   bill_to_PARTY_ID,
293            bill_to_PARTY_site_id,
294            bill_to_duns_number,
295            bill_to_location,
296            bill_to_address,
297            bill_to_city,
298            bill_to_state,
299            bill_to_postal_code,
300            bill_to_country,
301            bill_to_contact_party_id,
302            bill_to_contact_name,
303            bill_to_email,
304            bill_to_phone,
305            bill_to_fax,
306            ship_to_cust_account_id,
307            ship_to_site_use_id,
308            ship_to_PARTY_NAME,
309 	   ship_to_PARTY_ID,
310            ship_to_PARTY_site_id,
311            ship_to_duns_number,
312            ship_to_location,
313            ship_to_address,
314            ship_to_city,
315            ship_to_state,
316            ship_to_postal_code,
317            ship_to_country,
318            ship_to_contact_party_id,
319            ship_to_contact_name,
320            ship_to_email,
321            ship_to_phone,
322            ship_to_fax,
323            ship_from_cust_account_id,
324            ship_from_site_id,
325            ship_from_PARTY_NAME,
326            ship_from_location,
327            ship_from_address,
328            ship_from_city,
329            ship_from_state,
330            ship_from_postal_code,
331            ship_from_country,
332            ship_from_contact_party_id,
333 	   ship_from_contact_name,
334            ship_from_email,
335            ship_from_phone,
336            ship_from_fax,
337            sold_from_cust_account_id,
338            sold_from_site_id,
339            sold_from_PARTY_NAME,
340            sold_from_location,
341            sold_from_address,
342            sold_from_city,
343            sold_from_state,
344            sold_from_postal_code,
345            sold_from_country,
346            sold_from_contact_party_id,
347            sold_from_contact_name,
348            sold_from_email,
349            sold_from_phone,
350            sold_from_fax,
351            price_list_id,
352            price_list_name,
353            invoice_number,
354            date_invoiced,
355            po_number,
356            po_release_number,
357            po_type,
358            order_number,
359            date_ordered,
360            date_shipped,
361            purchase_uom_code,
362            quantity,
363            uom_code,
364            currency_code,
365            exchange_rate,
366            exchange_rate_type,
367            exchange_rate_date,
368            selling_price,
369            acctd_selling_price,
370            purchase_price,
371            acctd_purchase_price,
372 	   tracing_flag,
373            orig_system_quantity,
374            orig_system_uom,
375            orig_system_currency_code,
376            orig_system_selling_price,
377            orig_system_reference,
378 	   orig_system_line_reference,
379 	   orig_system_purchase_uom,
380 	   orig_system_purchase_curr,
381            orig_system_purchase_price,
382            orig_system_purchase_quantity,
383 	   orig_system_item_number,
384            product_category_id,
385            category_name,
386            inventory_item_segment1,
387            inventory_item_segment2,
388            inventory_item_segment3,
389            inventory_item_segment4,
390            inventory_item_segment5,
391            inventory_item_segment6,
392            inventory_item_segment7,
393            inventory_item_segment8,
394            inventory_item_segment9,
395            inventory_item_segment10,
396            inventory_item_segment11,
397            inventory_item_segment12,
398            inventory_item_segment13,
399            inventory_item_segment14,
400            inventory_item_segment15,
401            inventory_item_segment16,
402            inventory_item_segment17,
403            inventory_item_segment18,
404            inventory_item_segment19,
405            inventory_item_segment20,
406            inventory_item_id,
407            item_description,
408            upc_code,
409            item_number,
410            direct_customer_flag,
411            attribute_category,
412            attribute1,
413            attribute2,
414            attribute3,
415            attribute4,
416            attribute5,
417            attribute6,
418            attribute7,
419            attribute8,
420            attribute9,
421            attribute10,
422            attribute11,
423            attribute12,
424            attribute13,
425            attribute14,
426            attribute15,
427            line_attribute_category,
428            line_attribute1,
429            line_attribute2,
430            line_attribute3,
431            line_attribute4,
432            line_attribute5,
433            line_attribute6,
434            line_attribute7,
435            line_attribute8,
436            line_attribute9,
437            line_attribute10,
438            line_attribute11,
439            line_attribute12,
440            line_attribute13,
441            line_attribute14,
442            line_attribute15,
443            org_id
444    ) VALUES (
445            p_resale_line_id,
446            p_resale_header_id,
447            p_resale_transfer_type,
448            px_object_version_number,
449            p_last_update_date,
450            p_last_updated_by,
451            p_creation_date,
452            p_request_id,
453            p_created_by,
454            p_created_from,
455            p_last_update_login,
456            p_program_application_id,
457            p_program_update_date,
458            p_program_id,
459            p_status_code,
460            p_product_trans_movement_type,
461            p_product_transfer_date,
462            p_end_cust_party_id,
463            p_end_cust_site_use_id,
464            p_end_cust_site_use_code,
465            p_end_cust_party_site_id,
466            p_end_cust_party_name,
467            p_end_cust_location,
468            p_end_cust_address,
469            p_end_cust_city,
470            p_end_cust_state,
471            p_end_cust_postal_code,
472            p_end_cust_country,
473            p_end_cust_contact_party_id,
474            p_end_cust_contact_name,
475            p_end_cust_email,
476            p_end_cust_phone,
477            p_end_cust_fax,
478 	   p_bill_to_cust_account_id,
479            p_bill_to_site_use_id,
480            p_bill_to_PARTY_NAME,
481            p_bill_to_PARTY_ID,
482            p_bill_to_PARTY_site_id,
483            p_bill_to_duns_number,
484 	   p_bill_to_location,
485            p_bill_to_address,
486            p_bill_to_city,
487            p_bill_to_state,
488            p_bill_to_postal_code,
489            p_bill_to_country,
490            p_bill_to_contact_party_id,
491            p_bill_to_contact_name,
492 	   p_bill_to_email,
493            p_bill_to_phone,
494            p_bill_to_fax,
495            p_ship_to_cust_account_id,
496            p_ship_to_site_use_id,
497            p_ship_to_PARTY_NAME,
498            p_ship_to_PARTY_ID,
499            p_ship_to_PARTY_site_id,
500            p_ship_to_duns_number,
501            p_ship_to_location,
502            p_ship_to_address,
503            p_ship_to_city,
504            p_ship_to_state,
505            p_ship_to_postal_code,
506            p_ship_to_country,
507            p_ship_to_contact_party_id,
508            p_ship_to_contact_name,
509 	   p_ship_to_email,
510            p_ship_to_phone,
511            p_ship_to_fax,
512            p_ship_from_cust_account_id,
513            p_ship_from_site_id,
514            p_ship_from_PARTY_NAME,
515 	   p_ship_from_location,
516            p_ship_from_address,
517            p_ship_from_city,
518            p_ship_from_state,
519            p_ship_from_postal_code,
520            p_ship_from_country,
521            p_ship_from_contact_party_id,
522            p_ship_from_contact_name,
523 	   p_ship_from_email,
524            p_ship_from_phone,
525            p_ship_from_fax,
526            p_sold_from_cust_account_id,
527            p_sold_from_site_id,
528            p_sold_from_PARTY_NAME,
529            p_sold_from_location,
530            p_sold_from_address,
531            p_sold_from_city,
532            p_sold_from_state,
533            p_sold_from_postal_code,
534            p_sold_from_country,
535            p_sold_from_contact_party_id,
536            p_sold_from_contact_name,
537 	   p_sold_from_email,
538            p_sold_from_phone,
539            p_sold_from_fax,
540 	   p_price_list_id,
541            p_price_list_name,
542            p_invoice_number,
543            p_date_invoiced,
544            p_po_number,
545            p_po_release_number,
546            p_po_type,
547            p_order_number,
548            p_date_ordered,
549            p_date_shipped,
550 	   p_purchase_uom_code,
551            p_quantity,
552            p_uom_code,
553            p_currency_code,
554            p_exchange_rate,
555            p_exchange_rate_type,
556            p_exchange_rate_date,
557            p_selling_price,
558            p_acctd_selling_price,
559 	   p_purchase_price,
560 	   p_acctd_purchase_price,
561            p_tracing_flag,
562 	   p_orig_system_quantity,
563            p_orig_system_uom,
564            p_orig_system_currency_code,
565            p_orig_system_selling_price,
566 	   p_orig_system_reference,
567            p_orig_system_line_reference,
568 	   p_orig_system_purchase_uom,
569 	   p_orig_system_purchase_curr,
570            p_orig_system_purchase_price,
571            p_orig_system_purchase_quant,
572            p_orig_system_item_number,
573            p_product_category_id,
574            p_category_name,
575            p_inventory_item_segment1,
576            p_inventory_item_segment2,
577            p_inventory_item_segment3,
578            p_inventory_item_segment4,
579            p_inventory_item_segment5,
580            p_inventory_item_segment6,
581            p_inventory_item_segment7,
582            p_inventory_item_segment8,
583            p_inventory_item_segment9,
584            p_inventory_item_segment10,
585            p_inventory_item_segment11,
586            p_inventory_item_segment12,
587            p_inventory_item_segment13,
588            p_inventory_item_segment14,
589            p_inventory_item_segment15,
590            p_inventory_item_segment16,
591            p_inventory_item_segment17,
592            p_inventory_item_segment18,
593            p_inventory_item_segment19,
594            p_inventory_item_segment20,
595            p_inventory_item_id,
596            p_item_description,
597            p_upc_code,
598            p_item_number,
599            p_direct_customer_flag,
600            p_attribute_category,
601            p_attribute1,
602            p_attribute2,
603            p_attribute3,
604            p_attribute4,
605            p_attribute5,
606            p_attribute6,
607            p_attribute7,
608            p_attribute8,
609            p_attribute9,
610            p_attribute10,
611            p_attribute11,
612            p_attribute12,
613            p_attribute13,
614            p_attribute14,
615            p_attribute15,
616            p_line_attribute_category,
617            p_line_attribute1,
618            p_line_attribute2,
619            p_line_attribute3,
620            p_line_attribute4,
621            p_line_attribute5,
622            p_line_attribute6,
623            p_line_attribute7,
624            p_line_attribute8,
625            p_line_attribute9,
626            p_line_attribute10,
627            p_line_attribute11,
628            p_line_attribute12,
629            p_line_attribute13,
630            p_line_attribute14,
631            p_line_attribute15,
632            px_org_id);
633 END Insert_Row;
634 
635 
636 ----------------------------------------------------------
637 ----          MEDIA           ----
638 ----------------------------------------------------------
639 
640 --  ========================================================
641 --
642 --  NAME
643 --  createUpdateBody
644 --
645 --  PURPOSE
646 --
647 --  NOTES
648 --
649 --  HISTORY
650 --
651 --  ========================================================
652 PROCEDURE Update_Row(
653           p_resale_line_id    NUMBER,
654           p_resale_header_id    NUMBER,
655           p_resale_transfer_type    VARCHAR2,
656           p_object_version_number    NUMBER,
657           p_last_update_date    DATE,
658           p_last_updated_by    NUMBER,
659           p_request_id    NUMBER,
660           p_created_from    VARCHAR2,
661           p_last_update_login    NUMBER,
662           p_program_application_id    NUMBER,
663           p_program_update_date    DATE,
664           p_program_id    NUMBER,
665           p_status_code    VARCHAR2,
666           p_product_trans_movement_type    VARCHAR2,
667           p_product_transfer_date    DATE,
668           p_end_cust_party_id    NUMBER,
669           p_end_cust_site_use_id    NUMBER,
670           p_end_cust_site_use_code   VARCHAR2,
671           p_end_cust_party_site_id    NUMBER,
672           p_end_cust_party_name    VARCHAR2,
673           p_end_cust_location    VARCHAR2,
674           p_end_cust_address    VARCHAR2,
675           p_end_cust_city    VARCHAR2,
676           p_end_cust_state    VARCHAR2,
677           p_end_cust_postal_code    VARCHAR2,
678           p_end_cust_country    VARCHAR2,
679           p_end_cust_contact_party_id   NUMBER,
680           p_end_cust_contact_name    VARCHAR2,
681 	  p_end_cust_email    VARCHAR2,
682           p_end_cust_phone    VARCHAR2,
683           p_end_cust_fax    VARCHAR2,
684           p_bill_to_cust_account_id    NUMBER,
685           p_bill_to_site_use_id    NUMBER,
686           p_bill_to_PARTY_NAME    VARCHAR2,
687 	  p_bill_to_PARTY_ID      NUMBER,
688           p_bill_to_PARTY_site_id NUMBER,
689           p_bill_to_duns_number     VARCHAR2,
690           p_bill_to_location    VARCHAR2,
691           p_bill_to_address    VARCHAR2,
692           p_bill_to_city    VARCHAR2,
693           p_bill_to_state    VARCHAR2,
694           p_bill_to_postal_code    VARCHAR2,
695           p_bill_to_country    VARCHAR2,
696           p_bill_to_contact_party_id   NUMBER,
697           p_bill_to_contact_name    VARCHAR2,
698 	  p_bill_to_email  VARCHAR2,
699           p_bill_to_phone  VARCHAR2,
700           p_bill_to_fax   VARCHAR2,
701           p_ship_to_cust_account_id    NUMBER,
702           p_ship_to_site_use_id    NUMBER,
703           p_ship_to_PARTY_NAME    VARCHAR2,
704           p_ship_to_PARTY_ID      NUMBER,
705           p_ship_to_PARTY_site_id NUMBER,
706           p_ship_to_duns_number     VARCHAR2,
707           p_ship_to_location    VARCHAR2,
708           p_ship_to_address    VARCHAR2,
709           p_ship_to_city    VARCHAR2,
710           p_ship_to_state    VARCHAR2,
711           p_ship_to_postal_code    VARCHAR2,
712           p_ship_to_country    VARCHAR2,
713           p_ship_to_contact_party_id  number,
714           p_ship_to_contact_name    VARCHAR2,
715 	  p_ship_to_email  VARCHAR2,
716           p_ship_to_phone  VARCHAR2,
717           p_ship_to_fax   VARCHAR2,
718           p_ship_from_cust_account_id    NUMBER,
719           p_ship_from_site_id    NUMBER,
720           p_ship_from_PARTY_NAME    VARCHAR2,
721           p_ship_from_location    VARCHAR2,
722           p_ship_from_address    VARCHAR2,
723           p_ship_from_city    VARCHAR2,
724           p_ship_from_state    VARCHAR2,
725           p_ship_from_postal_code    VARCHAR2,
726           p_ship_from_country    VARCHAR2,
727           p_ship_from_contact_party_id   NUMBER,
728           p_ship_from_contact_name    VARCHAR2,
729 	  p_ship_from_email  VARCHAR2,
730           p_ship_from_phone  VARCHAR2,
731           p_ship_from_fax   VARCHAR2,
732           p_sold_from_cust_account_id    NUMBER,
733           p_sold_from_site_id    NUMBER,
734           p_sold_from_PARTY_NAME    VARCHAR2,
735           p_sold_from_location    VARCHAR2,
736           p_sold_from_address    VARCHAR2,
737           p_sold_from_city    VARCHAR2,
738           p_sold_from_state    VARCHAR2,
739           p_sold_from_postal_code    VARCHAR2,
740           p_sold_from_country    VARCHAR2,
741           p_sold_from_contact_party_id number,
742           p_sold_from_contact_name    VARCHAR2,
743 	  p_sold_from_email  VARCHAR2,
744           p_sold_from_phone  VARCHAR2,
745           p_sold_from_fax   VARCHAR2,
746           p_price_list_id    NUMBER,
747           p_price_list_name    VARCHAR2,
748           p_invoice_number    VARCHAR2,
749           p_date_invoiced   DATE,
750           p_po_number    VARCHAR2,
751           p_po_release_number    VARCHAR2,
752           p_po_type    VARCHAR2,
753           p_order_number    VARCHAR2,
754           p_date_ordered    DATE,
755           p_date_shipped    DATE,
756 	  p_purchase_uom_code    VARCHAR2,
757           p_quantity    NUMBER,
758           p_uom_code    VARCHAR2,
759           p_currency_code    VARCHAR2,
760           p_exchange_rate    NUMBER,
761           p_exchange_rate_type    VARCHAR2,
762           p_exchange_rate_date    DATE,
763           p_selling_price    NUMBER,
764           p_acctd_selling_price    NUMBER,
765           p_purchase_price    NUMBER,
766           p_acctd_purchase_price    NUMBER,
767 	  p_tracing_flag     VARCHAR2,
768           p_orig_system_quantity    NUMBER,
769           p_orig_system_uom    VARCHAR2,
770           p_orig_system_currency_code    VARCHAR2,
771           p_orig_system_selling_price    NUMBER,
772           p_orig_system_reference    VARCHAR2,
773           p_orig_system_line_reference    VARCHAR2,
774 	  p_orig_system_purchase_uom  varchar2,
775 	  p_orig_system_purchase_curr      VARCHAR2,
776           p_orig_system_purchase_price      NUMBER,
777           p_orig_system_purchase_quant   NUMBER,
778           p_orig_system_item_number  varchar2,
779           p_product_category_id    NUMBER,
780           p_category_name    VARCHAR2,
781           p_inventory_item_segment1    VARCHAR2,
782           p_inventory_item_segment2    VARCHAR2,
783           p_inventory_item_segment3    VARCHAR2,
784           p_inventory_item_segment4    VARCHAR2,
785           p_inventory_item_segment5    VARCHAR2,
786           p_inventory_item_segment6    VARCHAR2,
787           p_inventory_item_segment7    VARCHAR2,
788           p_inventory_item_segment8    VARCHAR2,
789           p_inventory_item_segment9    VARCHAR2,
790           p_inventory_item_segment10    VARCHAR2,
791           p_inventory_item_segment11    VARCHAR2,
792           p_inventory_item_segment12    VARCHAR2,
793           p_inventory_item_segment13    VARCHAR2,
794           p_inventory_item_segment14    VARCHAR2,
795           p_inventory_item_segment15    VARCHAR2,
796           p_inventory_item_segment16    VARCHAR2,
797           p_inventory_item_segment17    VARCHAR2,
798           p_inventory_item_segment18    VARCHAR2,
799           p_inventory_item_segment19    VARCHAR2,
800           p_inventory_item_segment20    VARCHAR2,
801           p_inventory_item_id    NUMBER,
802           p_item_description    VARCHAR2,
803           p_upc_code    VARCHAR2,
804           p_item_number    VARCHAR2,
805           p_direct_customer_flag    VARCHAR2,
806           p_attribute_category    VARCHAR2,
807           p_attribute1    VARCHAR2,
808           p_attribute2    VARCHAR2,
809           p_attribute3    VARCHAR2,
810           p_attribute4    VARCHAR2,
811           p_attribute5    VARCHAR2,
812           p_attribute6    VARCHAR2,
813           p_attribute7    VARCHAR2,
814           p_attribute8    VARCHAR2,
815           p_attribute9    VARCHAR2,
816           p_attribute10    VARCHAR2,
817           p_attribute11    VARCHAR2,
818           p_attribute12    VARCHAR2,
819           p_attribute13    VARCHAR2,
820           p_attribute14    VARCHAR2,
821           p_attribute15    VARCHAR2,
822           p_line_attribute_category    VARCHAR2,
823           p_line_attribute1    VARCHAR2,
824           p_line_attribute2    VARCHAR2,
825           p_line_attribute3    VARCHAR2,
826           p_line_attribute4    VARCHAR2,
827           p_line_attribute5    VARCHAR2,
828           p_line_attribute6    VARCHAR2,
829           p_line_attribute7    VARCHAR2,
830           p_line_attribute8    VARCHAR2,
831           p_line_attribute9    VARCHAR2,
832           p_line_attribute10    VARCHAR2,
833           p_line_attribute11    VARCHAR2,
834           p_line_attribute12    VARCHAR2,
835           p_line_attribute13    VARCHAR2,
836           p_line_attribute14    VARCHAR2,
837           p_line_attribute15    VARCHAR2,
838           p_org_id    NUMBER)
839 
840  IS
841  BEGIN
842     Update OZF_RESALE_LINES_ALL
843     SET
844               resale_line_id = p_resale_line_id,
845               resale_header_id = p_resale_header_id,
846               resale_transfer_type = p_resale_transfer_type,
847               object_version_number = p_object_version_number,
848               last_update_date = p_last_update_date,
849               last_updated_by = p_last_updated_by,
850               request_id = p_request_id,
851               created_from = p_created_from,
852               last_update_login = p_last_update_login,
853               program_application_id = p_program_application_id,
854               program_update_date = p_program_update_date,
855               program_id = p_program_id,
856               status_code = p_status_code,
857               product_transfer_movement_type = p_product_trans_movement_type,
858               product_transfer_date = p_product_transfer_date,
859               end_cust_party_id = p_end_cust_party_id,
860               end_cust_site_use_id = p_end_cust_site_use_id,
861               end_cust_site_use_code = p_end_cust_site_use_code ,
862 	      end_cust_party_site_id = p_end_cust_party_site_id,
863               end_cust_party_name = p_end_cust_party_name,
864               end_cust_location = p_end_cust_location,
865               end_cust_address = p_end_cust_address,
866               end_cust_city = p_end_cust_city,
867               end_cust_state = p_end_cust_state,
868               end_cust_postal_code = p_end_cust_postal_code,
869               end_cust_country = p_end_cust_country,
870               end_cust_contact_party_id = p_end_cust_contact_party_id,
871               end_cust_contact_name = p_end_cust_contact_name,
872               end_cust_email = p_end_cust_email,
873               end_cust_phone = p_end_cust_phone,
874               end_cust_fax = p_end_cust_fax,
875 	      bill_to_cust_account_id = p_bill_to_cust_account_id,
876               bill_to_site_use_id = p_bill_to_site_use_id,
877               bill_to_PARTY_NAME = p_bill_to_PARTY_NAME,
878 	      bill_to_PARTY_ID = p_bill_to_PARTY_ID,
879               bill_to_PARTY_site_id = p_bill_to_PARTY_site_id,
880               bill_to_duns_number = p_bill_to_duns_number,
881               bill_to_location = p_bill_to_location,
882               bill_to_address = p_bill_to_address,
883               bill_to_city = p_bill_to_city,
884               bill_to_state = p_bill_to_state,
885               bill_to_postal_code = p_bill_to_postal_code,
886               bill_to_country = p_bill_to_country,
887               bill_to_contact_party_id = p_bill_to_contact_party_id,
888               bill_to_contact_name = p_bill_to_contact_name,
889 	      bill_to_email = p_bill_to_email,
890               bill_to_phone = p_bill_to_phone,
891               bill_to_fax = p_bill_to_fax,
892               ship_to_cust_account_id = p_ship_to_cust_account_id,
893               ship_to_site_use_id = p_ship_to_site_use_id,
894               ship_to_PARTY_NAME = p_ship_to_PARTY_NAME,
895 	      ship_to_PARTY_ID = p_ship_to_PARTY_ID,
896               ship_to_PARTY_site_id = p_ship_to_PARTY_site_id,
897               ship_to_duns_number = p_ship_to_duns_number,
898               ship_to_location = p_ship_to_location,
899               ship_to_address = p_ship_to_address,
900               ship_to_city = p_ship_to_city,
901               ship_to_state = p_ship_to_state,
902               ship_to_postal_code = p_ship_to_postal_code,
903               ship_to_country = p_ship_to_country,
904               ship_to_contact_party_id = p_ship_to_contact_party_id,
905               ship_to_contact_name = p_ship_to_contact_name,
906               ship_to_email = p_ship_to_email,
907               ship_to_phone = p_ship_to_phone,
908               ship_to_fax = p_ship_to_fax,
909               ship_from_cust_account_id = p_ship_from_cust_account_id,
910               ship_from_site_id = p_ship_from_site_id,
911               ship_from_PARTY_NAME = p_ship_from_PARTY_NAME,
912               ship_from_location = p_ship_from_location,
913 	      ship_from_address = p_ship_from_address,
914               ship_from_city = p_ship_from_city,
915               ship_from_state = p_ship_from_state,
916               ship_from_postal_code = p_ship_from_postal_code,
917               ship_from_country = p_ship_from_country,
918               ship_from_contact_party_id = p_ship_from_contact_party_id,
919 	      ship_from_contact_name = p_ship_from_contact_name,
920 	      ship_from_email = p_ship_from_email,
921               ship_from_phone = p_ship_from_phone,
922               ship_from_fax = p_ship_from_fax,
923               sold_from_cust_account_id = p_sold_from_cust_account_id,
924               sold_from_site_id = p_sold_from_site_id,
925               sold_from_PARTY_NAME = p_sold_from_PARTY_NAME,
926               sold_from_location = p_sold_from_location,
927               sold_from_address = p_sold_from_address,
928               sold_from_city = p_sold_from_city,
929               sold_from_state = p_sold_from_state,
930               sold_from_postal_code = p_sold_from_postal_code,
931               sold_from_country = p_sold_from_country,
932               sold_from_contact_party_id = p_sold_from_contact_party_id,
933               sold_from_contact_name = p_sold_from_contact_name,
934 	      sold_from_email = p_sold_from_email,
935               sold_from_phone = p_sold_from_phone,
936               sold_from_fax = p_sold_from_fax,
937               price_list_id = p_price_list_id,
938               price_list_name = p_price_list_name,
939               invoice_number = p_invoice_number,
940               date_invoiced= p_date_invoiced,
941               po_number = p_po_number,
942               po_release_number = p_po_release_number,
943               po_type = p_po_type,
944               order_number = p_order_number,
945               date_ordered = p_date_ordered,
946               date_shipped = p_date_shipped,
947               purchase_uom_code = p_purchase_uom_code,
948               quantity = p_quantity,
949               uom_code = p_uom_code,
950               currency_code = p_currency_code,
951               exchange_rate = p_exchange_rate,
952               exchange_rate_type = p_exchange_rate_type,
953               exchange_rate_date = p_exchange_rate_date,
954               selling_price = p_selling_price,
955               acctd_selling_price = p_acctd_selling_price,
956               purchase_price = p_purchase_price,
957               acctd_purchase_price = p_acctd_purchase_price,
958 	      tracing_flag = p_tracing_flag,
959               orig_system_quantity = p_orig_system_quantity,
960               orig_system_uom = p_orig_system_uom,
961               orig_system_currency_code = p_orig_system_currency_code,
962               orig_system_selling_price = p_orig_system_selling_price,
963               orig_system_reference = p_orig_system_reference,
964 	      orig_system_line_reference = p_orig_system_line_reference,
965 	      orig_system_purchase_uom = p_orig_system_purchase_uom,
966 	      orig_system_purchase_curr = p_orig_system_purchase_curr,
967               orig_system_purchase_price = p_orig_system_purchase_price,
968               orig_system_purchase_quantity = p_orig_system_purchase_quant,
969               orig_system_item_number = p_orig_system_item_number,
970               product_category_id = p_product_category_id,
971               category_name = p_category_name,
972               inventory_item_segment1 = p_inventory_item_segment1,
973               inventory_item_segment2 = p_inventory_item_segment2,
974               inventory_item_segment3 = p_inventory_item_segment3,
975               inventory_item_segment4 = p_inventory_item_segment4,
976               inventory_item_segment5 = p_inventory_item_segment5,
977               inventory_item_segment6 = p_inventory_item_segment6,
978               inventory_item_segment7 = p_inventory_item_segment7,
979               inventory_item_segment8 = p_inventory_item_segment8,
980               inventory_item_segment9 = p_inventory_item_segment9,
981               inventory_item_segment10 = p_inventory_item_segment10,
982               inventory_item_segment11 = p_inventory_item_segment11,
983               inventory_item_segment12 = p_inventory_item_segment12,
984               inventory_item_segment13 = p_inventory_item_segment13,
985               inventory_item_segment14 = p_inventory_item_segment14,
986               inventory_item_segment15 = p_inventory_item_segment15,
987               inventory_item_segment16 = p_inventory_item_segment16,
988               inventory_item_segment17 = p_inventory_item_segment17,
989               inventory_item_segment18 = p_inventory_item_segment18,
990               inventory_item_segment19 = p_inventory_item_segment19,
991               inventory_item_segment20 = p_inventory_item_segment20,
992               inventory_item_id = p_inventory_item_id,
993               item_description = p_item_description,
994               upc_code = p_upc_code,
995               item_number = p_item_number,
996               direct_customer_flag = p_direct_customer_flag,
997               attribute_category = p_attribute_category,
998               attribute1 = p_attribute1,
999               attribute2 = p_attribute2,
1000               attribute3 = p_attribute3,
1001               attribute4 = p_attribute4,
1002               attribute5 = p_attribute5,
1003               attribute6 = p_attribute6,
1004               attribute7 = p_attribute7,
1005               attribute8 = p_attribute8,
1006               attribute9 = p_attribute9,
1007               attribute10 = p_attribute10,
1008               attribute11 = p_attribute11,
1009               attribute12 = p_attribute12,
1010               attribute13 = p_attribute13,
1011               attribute14 = p_attribute14,
1012               attribute15 = p_attribute15,
1013               line_attribute_category = p_line_attribute_category,
1014               line_attribute1 = p_line_attribute1,
1015               line_attribute2 = p_line_attribute2,
1016               line_attribute3 = p_line_attribute3,
1017               line_attribute4 = p_line_attribute4,
1018               line_attribute5 = p_line_attribute5,
1019               line_attribute6 = p_line_attribute6,
1020               line_attribute7 = p_line_attribute7,
1021               line_attribute8 = p_line_attribute8,
1022               line_attribute9 = p_line_attribute9,
1023               line_attribute10 = p_line_attribute10,
1024               line_attribute11 = p_line_attribute11,
1025               line_attribute12 = p_line_attribute12,
1026               line_attribute13 = p_line_attribute13,
1027               line_attribute14 = p_line_attribute14,
1028               line_attribute15 = p_line_attribute15,
1029               org_id = p_org_id
1030    WHERE RESALE_LINE_ID = p_RESALE_LINE_ID
1031    AND   object_version_number = p_object_version_number;
1032 
1033    IF (SQL%NOTFOUND) THEN
1034 RAISE  FND_API.G_EXC_UNEXPECTED_ERROR;
1035    END IF;
1036 END Update_Row;
1037 
1038 
1039 ----------------------------------------------------------
1040 ----          MEDIA           ----
1041 ----------------------------------------------------------
1042 
1043 --  ========================================================
1044 --
1045 --  NAME
1046 --  createDeleteBody
1047 --
1048 --  PURPOSE
1049 --
1050 --  NOTES
1051 --
1052 --  HISTORY
1053 --
1054 --  ========================================================
1055 PROCEDURE Delete_Row(
1056     p_RESALE_LINE_ID  NUMBER)
1057  IS
1058  BEGIN
1059    DELETE FROM OZF_RESALE_LINES_ALL
1060     WHERE RESALE_LINE_ID = p_RESALE_LINE_ID;
1061    If (SQL%NOTFOUND) then
1062 RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1063    End If;
1064  END Delete_Row ;
1065 
1066 
1067 
1068 ----------------------------------------------------------
1069 ----          MEDIA           ----
1070 ----------------------------------------------------------
1071 
1072 --  ========================================================
1073 --
1074 --  NAME
1075 --  createLockBody
1076 --
1077 --  PURPOSE
1078 --
1079 --  NOTES
1080 --
1081 --  HISTORY
1082 --
1083 --  ========================================================
1084 PROCEDURE Lock_Row(
1085           p_resale_line_id    NUMBER,
1086           p_resale_header_id    NUMBER,
1087           p_resale_transfer_type    VARCHAR2,
1088           p_object_version_number    NUMBER,
1089           p_last_update_date    DATE,
1090           p_last_updated_by    NUMBER,
1091           p_creation_date    DATE,
1092           p_request_id    NUMBER,
1093           p_created_by    NUMBER,
1094           p_created_from    VARCHAR2,
1095           p_last_update_login    NUMBER,
1096           p_program_application_id    NUMBER,
1097           p_program_update_date    DATE,
1098           p_program_id    NUMBER,
1099           p_status_code    VARCHAR2,
1100           p_product_trans_movement_type    VARCHAR2,
1101           p_product_transfer_date    DATE,
1102           p_end_cust_party_id    NUMBER,
1103           p_end_cust_site_use_id    NUMBER,
1104           p_end_cust_site_use_code   VARCHAR2,
1105           p_end_cust_party_site_id    NUMBER,
1106           p_end_cust_party_name    VARCHAR2,
1107           p_end_cust_location    VARCHAR2,
1108           p_end_cust_address    VARCHAR2,
1109           p_end_cust_city    VARCHAR2,
1110           p_end_cust_state    VARCHAR2,
1111           p_end_cust_postal_code    VARCHAR2,
1112           p_end_cust_country    VARCHAR2,
1113           p_end_cust_contact_party_id   NUMBER,
1114           p_end_cust_contact_name    VARCHAR2,
1115 	  p_end_cust_email    VARCHAR2,
1116           p_end_cust_phone    VARCHAR2,
1117           p_end_cust_fax    VARCHAR2,
1118           p_bill_to_cust_account_id    NUMBER,
1119           p_bill_to_site_use_id    NUMBER,
1120           p_bill_to_PARTY_NAME    VARCHAR2,
1121 	  p_bill_to_PARTY_ID      NUMBER,
1122           p_bill_to_PARTY_site_id NUMBER,
1123           p_bill_to_duns_number    VARCHAR2,
1124           p_bill_to_location    VARCHAR2,
1125           p_bill_to_address    VARCHAR2,
1126           p_bill_to_city    VARCHAR2,
1127           p_bill_to_state    VARCHAR2,
1128           p_bill_to_postal_code    VARCHAR2,
1129           p_bill_to_country    VARCHAR2,
1130           p_bill_to_contact_party_id   NUMBER,
1131           p_bill_to_contact_name    VARCHAR2,
1132 	  p_bill_to_email  VARCHAR2,
1133           p_bill_to_phone  VARCHAR2,
1134           p_bill_to_fax   VARCHAR2,
1135           p_ship_to_cust_account_id    NUMBER,
1136           p_ship_to_site_use_id    NUMBER,
1137           p_ship_to_PARTY_NAME    VARCHAR2,
1138           p_ship_to_PARTY_ID      NUMBER,
1139           p_ship_to_PARTY_site_id NUMBER,
1140           p_ship_to_duns_number     VARCHAR2,
1141           p_ship_to_location    VARCHAR2,
1142           p_ship_to_address    VARCHAR2,
1143           p_ship_to_city    VARCHAR2,
1144           p_ship_to_state    VARCHAR2,
1145           p_ship_to_postal_code    VARCHAR2,
1146           p_ship_to_country    VARCHAR2,
1147           p_ship_to_contact_party_id   NUMBER,
1148           p_ship_to_contact_name    VARCHAR2,
1149 	  p_ship_to_email  VARCHAR2,
1150           p_ship_to_phone  VARCHAR2,
1151           p_ship_to_fax   VARCHAR2,
1152           p_ship_from_cust_account_id    NUMBER,
1153           p_ship_from_site_id    NUMBER,
1154           p_ship_from_PARTY_NAME    VARCHAR2,
1155           p_ship_from_location    VARCHAR2,
1156           p_ship_from_address    VARCHAR2,
1157           p_ship_from_city    VARCHAR2,
1158           p_ship_from_state    VARCHAR2,
1159           p_ship_from_postal_code    VARCHAR2,
1160           p_ship_from_country    VARCHAR2,
1161           p_ship_from_contact_party_id   NUMBER,
1162           p_ship_from_contact_name    VARCHAR2,
1163 	  p_ship_from_email  VARCHAR2,
1164           p_ship_from_phone  VARCHAR2,
1165           p_ship_from_fax   VARCHAR2,
1166           p_sold_from_cust_account_id    NUMBER,
1167           p_sold_from_site_id    NUMBER,
1168           p_sold_from_PARTY_NAME    VARCHAR2,
1169           p_sold_from_location    VARCHAR2,
1170           p_sold_from_address    VARCHAR2,
1171           p_sold_from_city    VARCHAR2,
1172           p_sold_from_state    VARCHAR2,
1173           p_sold_from_postal_code    VARCHAR2,
1174           p_sold_from_country    VARCHAR2,
1175           p_sold_from_contact_party_id   NUMBER,
1176           p_sold_from_contact_name    VARCHAR2,
1177 	  p_sold_from_email  VARCHAR2,
1178           p_sold_from_phone  VARCHAR2,
1179           p_sold_from_fax   VARCHAR2,
1180           p_price_list_id    NUMBER,
1181           p_price_list_name    VARCHAR2,
1182           p_invoice_number    VARCHAR2,
1183           p_date_invoiced   DATE,
1184           p_po_number    VARCHAR2,
1185           p_po_release_number    VARCHAR2,
1186           p_po_type    VARCHAR2,
1187           p_order_number    VARCHAR2,
1188           p_date_ordered    DATE,
1189           p_date_shipped    DATE,
1190 	  p_purchase_uom_code    VARCHAR2,
1191           p_quantity    NUMBER,
1192           p_uom_code    VARCHAR2,
1193           p_currency_code    VARCHAR2,
1194           p_exchange_rate    NUMBER,
1195           p_exchange_rate_type    VARCHAR2,
1196           p_exchange_rate_date    DATE,
1197           p_selling_price    NUMBER,
1198           p_acctd_selling_price    NUMBER,
1199           p_purchase_price    NUMBER,
1200           p_acctd_purchase_price    NUMBER,
1201 	  p_tracing_flag     VARCHAR2,
1202           p_orig_system_quantity    NUMBER,
1203           p_orig_system_uom    VARCHAR2,
1204           p_orig_system_currency_code    VARCHAR2,
1205           p_orig_system_selling_price    NUMBER,
1206           p_orig_system_reference    VARCHAR2,
1207           p_orig_system_line_reference    VARCHAR2,
1208 	  p_orig_system_purchase_uom  varchar2,
1209 	  p_orig_system_purchase_curr      VARCHAR2,
1210           p_orig_system_purchase_price      NUMBER,
1211           p_orig_system_purchase_quant   NUMBER,
1212           p_orig_system_item_number  varchar2,
1213           p_product_category_id    NUMBER,
1214           p_category_name    VARCHAR2,
1215           p_inventory_item_segment1    VARCHAR2,
1216           p_inventory_item_segment2    VARCHAR2,
1217           p_inventory_item_segment3    VARCHAR2,
1218           p_inventory_item_segment4    VARCHAR2,
1219           p_inventory_item_segment5    VARCHAR2,
1220           p_inventory_item_segment6    VARCHAR2,
1221           p_inventory_item_segment7    VARCHAR2,
1222           p_inventory_item_segment8    VARCHAR2,
1223           p_inventory_item_segment9    VARCHAR2,
1224           p_inventory_item_segment10    VARCHAR2,
1225           p_inventory_item_segment11    VARCHAR2,
1226           p_inventory_item_segment12    VARCHAR2,
1227           p_inventory_item_segment13    VARCHAR2,
1228           p_inventory_item_segment14    VARCHAR2,
1229           p_inventory_item_segment15    VARCHAR2,
1230           p_inventory_item_segment16    VARCHAR2,
1231           p_inventory_item_segment17    VARCHAR2,
1232           p_inventory_item_segment18    VARCHAR2,
1233           p_inventory_item_segment19    VARCHAR2,
1234           p_inventory_item_segment20    VARCHAR2,
1235           p_inventory_item_id    NUMBER,
1236           p_item_description    VARCHAR2,
1237           p_upc_code    VARCHAR2,
1238           p_item_number    VARCHAR2,
1239           p_direct_customer_flag    VARCHAR2,
1240           p_attribute_category    VARCHAR2,
1241           p_attribute1    VARCHAR2,
1242           p_attribute2    VARCHAR2,
1243           p_attribute3    VARCHAR2,
1244           p_attribute4    VARCHAR2,
1245           p_attribute5    VARCHAR2,
1246           p_attribute6    VARCHAR2,
1247           p_attribute7    VARCHAR2,
1248           p_attribute8    VARCHAR2,
1249           p_attribute9    VARCHAR2,
1250           p_attribute10    VARCHAR2,
1251           p_attribute11    VARCHAR2,
1252           p_attribute12    VARCHAR2,
1253           p_attribute13    VARCHAR2,
1254           p_attribute14    VARCHAR2,
1255           p_attribute15    VARCHAR2,
1256           p_line_attribute_category    VARCHAR2,
1257           p_line_attribute1    VARCHAR2,
1258           p_line_attribute2    VARCHAR2,
1259           p_line_attribute3    VARCHAR2,
1260           p_line_attribute4    VARCHAR2,
1261           p_line_attribute5    VARCHAR2,
1262           p_line_attribute6    VARCHAR2,
1263           p_line_attribute7    VARCHAR2,
1264           p_line_attribute8    VARCHAR2,
1265           p_line_attribute9    VARCHAR2,
1266           p_line_attribute10    VARCHAR2,
1267           p_line_attribute11    VARCHAR2,
1268           p_line_attribute12    VARCHAR2,
1269           p_line_attribute13    VARCHAR2,
1270           p_line_attribute14    VARCHAR2,
1271           p_line_attribute15    VARCHAR2,
1272           p_org_id    NUMBER)
1273 
1274  IS
1275    CURSOR C IS
1276         SELECT *
1277          FROM OZF_RESALE_LINES_ALL
1278         WHERE RESALE_LINE_ID =  p_RESALE_LINE_ID
1279         FOR UPDATE of RESALE_LINE_ID NOWAIT;
1280    Recinfo C%ROWTYPE;
1281  BEGIN
1282     OPEN c;
1283     FETCH c INTO Recinfo;
1284     If (c%NOTFOUND) then
1285         CLOSE c;
1286         FND_MESSAGE.SET_NAME('FND', 'FORM_RECORD_DELETED');
1287         APP_EXCEPTION.RAISE_EXCEPTION;
1288     END IF;
1289     CLOSE C;
1290     IF (
1291            (      Recinfo.resale_line_id = p_resale_line_id)
1292        AND (    ( Recinfo.resale_header_id = p_resale_header_id)
1293             OR (    ( Recinfo.resale_header_id IS NULL )
1294                 AND (  p_resale_header_id IS NULL )))
1295        AND (    ( Recinfo.resale_transfer_type = p_resale_transfer_type)
1296             OR (    ( Recinfo.resale_transfer_type IS NULL )
1297                 AND (  p_resale_transfer_type IS NULL )))
1298        AND (    ( Recinfo.object_version_number = p_object_version_number)
1299             OR (    ( Recinfo.object_version_number IS NULL )
1300                 AND (  p_object_version_number IS NULL )))
1301        AND (    ( Recinfo.last_update_date = p_last_update_date)
1302             OR (    ( Recinfo.last_update_date IS NULL )
1303                 AND (  p_last_update_date IS NULL )))
1304        AND (    ( Recinfo.last_updated_by = p_last_updated_by)
1305             OR (    ( Recinfo.last_updated_by IS NULL )
1306                 AND (  p_last_updated_by IS NULL )))
1307        AND (    ( Recinfo.creation_date = p_creation_date)
1308             OR (    ( Recinfo.creation_date IS NULL )
1309                 AND (  p_creation_date IS NULL )))
1310        AND (    ( Recinfo.request_id = p_request_id)
1311             OR (    ( Recinfo.request_id IS NULL )
1312                 AND (  p_request_id IS NULL )))
1313        AND (    ( Recinfo.created_by = p_created_by)
1314             OR (    ( Recinfo.created_by IS NULL )
1315                 AND (  p_created_by IS NULL )))
1316        AND (    ( Recinfo.created_from = p_created_from)
1317             OR (    ( Recinfo.created_from IS NULL )
1318                 AND (  p_created_from IS NULL )))
1319        AND (    ( Recinfo.last_update_login = p_last_update_login)
1320             OR (    ( Recinfo.last_update_login IS NULL )
1321                 AND (  p_last_update_login IS NULL )))
1322        AND (    ( Recinfo.program_application_id = p_program_application_id)
1323             OR (    ( Recinfo.program_application_id IS NULL )
1324                 AND (  p_program_application_id IS NULL )))
1325        AND (    ( Recinfo.program_update_date = p_program_update_date)
1326             OR (    ( Recinfo.program_update_date IS NULL )
1327                 AND (  p_program_update_date IS NULL )))
1328        AND (    ( Recinfo.program_id = p_program_id)
1329             OR (    ( Recinfo.program_id IS NULL )
1330                 AND (  p_program_id IS NULL )))
1331        AND (    ( Recinfo.status_code = p_status_code)
1332             OR (    ( Recinfo.status_code IS NULL )
1333                 AND (  p_status_code IS NULL )))
1334        AND (    ( Recinfo.product_transfer_movement_type = p_product_trans_movement_type)
1335             OR (    ( Recinfo.product_transfer_movement_type IS NULL )
1336                 AND (  p_product_trans_movement_type IS NULL )))
1337        AND (    ( Recinfo.product_transfer_date = p_product_transfer_date)
1338             OR (    ( Recinfo.product_transfer_date IS NULL )
1339                 AND (  p_product_transfer_date IS NULL )))
1340        AND (    ( Recinfo.end_cust_party_id = p_end_cust_party_id)
1341             OR (    ( Recinfo.end_cust_party_id IS NULL )
1342                 AND (  p_end_cust_party_id IS NULL )))
1343        AND (    ( Recinfo.end_cust_site_use_id = p_end_cust_site_use_id)
1344             OR (    ( Recinfo.end_cust_site_use_id IS NULL )
1345                 AND (  p_end_cust_site_use_id IS NULL )))
1346        AND (    ( Recinfo.end_cust_site_use_code = p_end_cust_site_use_code)
1347             OR (    ( Recinfo.end_cust_site_use_code IS NULL )
1348                 AND (  p_end_cust_site_use_code IS NULL )))
1349        AND (    ( Recinfo.end_cust_party_site_id = p_end_cust_party_site_id)
1350             OR (    ( Recinfo.end_cust_party_site_id IS NULL )
1351                 AND (  p_end_cust_party_site_id IS NULL )))
1352        AND (    ( Recinfo.end_cust_party_name = p_end_cust_party_name)
1353             OR (    ( Recinfo.end_cust_party_name IS NULL )
1354                 AND (  p_end_cust_party_name IS NULL )))
1355        AND (    ( Recinfo.end_cust_location = p_end_cust_location)
1356             OR (    ( Recinfo.end_cust_location IS NULL )
1357                 AND (  p_end_cust_location IS NULL )))
1358        AND (    ( Recinfo.end_cust_address = p_end_cust_address)
1359             OR (    ( Recinfo.end_cust_address IS NULL )
1360                 AND (  p_end_cust_address IS NULL )))
1361        AND (    ( Recinfo.end_cust_city = p_end_cust_city)
1362             OR (    ( Recinfo.end_cust_city IS NULL )
1363                 AND (  p_end_cust_city IS NULL )))
1364        AND (    ( Recinfo.end_cust_state = p_end_cust_state)
1365             OR (    ( Recinfo.end_cust_state IS NULL )
1366                 AND (  p_end_cust_state IS NULL )))
1367        AND (    ( Recinfo.end_cust_postal_code = p_end_cust_postal_code)
1368             OR (    ( Recinfo.end_cust_postal_code IS NULL )
1369                 AND (  p_end_cust_postal_code IS NULL )))
1370        AND (    ( Recinfo.end_cust_country = p_end_cust_country)
1371             OR (    ( Recinfo.end_cust_country IS NULL )
1372                 AND (  p_end_cust_country IS NULL )))
1373        AND (    ( Recinfo.end_cust_contact_party_id = p_end_cust_contact_party_id)
1374             OR (    ( Recinfo.end_cust_contact_party_id IS NULL )
1375                 AND (  p_end_cust_contact_party_id IS NULL )))
1376        AND (    ( Recinfo.end_cust_contact_name = p_end_cust_contact_name)
1377             OR (    ( Recinfo.end_cust_contact_name IS NULL )
1378                 AND (  p_end_cust_contact_name IS NULL )))
1379        AND (    ( Recinfo.end_cust_email = p_end_cust_email)
1380             OR (    ( Recinfo.end_cust_email IS NULL )
1381                 AND (  p_end_cust_email IS NULL )))
1382        AND (    ( Recinfo.end_cust_phone = p_end_cust_phone)
1383             OR (    ( Recinfo.end_cust_phone IS NULL )
1384                 AND (  p_end_cust_phone IS NULL )))
1385        AND (    ( Recinfo.end_cust_fax = p_end_cust_fax)
1386             OR (    ( Recinfo.end_cust_fax IS NULL )
1387                 AND (  p_end_cust_fax IS NULL )))
1388        AND (    ( Recinfo.bill_to_cust_account_id = p_bill_to_cust_account_id)
1389             OR (    ( Recinfo.bill_to_cust_account_id IS NULL )
1390                 AND (  p_bill_to_cust_account_id IS NULL )))
1391        AND (    ( Recinfo.bill_to_site_use_id = p_bill_to_site_use_id)
1392             OR (    ( Recinfo.bill_to_site_use_id IS NULL )
1393                 AND (  p_bill_to_site_use_id IS NULL )))
1394        AND (    ( Recinfo.bill_to_PARTY_NAME = p_bill_to_PARTY_NAME)
1395             OR (    ( Recinfo.bill_to_PARTY_NAME IS NULL )
1396                 AND (  p_bill_to_PARTY_NAME IS NULL )))
1397        AND (    ( Recinfo.bill_to_PARTY_ID = p_bill_to_PARTY_ID)
1398             OR (    ( Recinfo.bill_to_PARTY_ID IS NULL )
1399                 AND (  p_bill_to_PARTY_ID IS NULL )))
1400        AND (    ( Recinfo.bill_to_PARTY_site_id = p_bill_to_PARTY_site_id)
1401             OR (    ( Recinfo.bill_to_PARTY_site_id IS NULL )
1402                 AND (  p_bill_to_PARTY_site_id IS NULL )))
1403        AND (    ( Recinfo.bill_to_duns_number = p_bill_to_duns_number)
1404             OR (    ( Recinfo.bill_to_duns_number IS NULL )
1405                 AND (  p_bill_to_duns_number IS NULL )))
1406        AND (    ( Recinfo.bill_to_location = p_bill_to_location)
1407             OR (    ( Recinfo.bill_to_location IS NULL )
1408                 AND (  p_bill_to_location IS NULL )))
1409        AND (    ( Recinfo.bill_to_address = p_bill_to_address)
1410             OR (    ( Recinfo.bill_to_address IS NULL )
1411                 AND (  p_bill_to_address IS NULL )))
1412        AND (    ( Recinfo.bill_to_city = p_bill_to_city)
1413             OR (    ( Recinfo.bill_to_city IS NULL )
1414                 AND (  p_bill_to_city IS NULL )))
1415        AND (    ( Recinfo.bill_to_state = p_bill_to_state)
1416             OR (    ( Recinfo.bill_to_state IS NULL )
1417                 AND (  p_bill_to_state IS NULL )))
1418        AND (    ( Recinfo.bill_to_postal_code = p_bill_to_postal_code)
1419             OR (    ( Recinfo.bill_to_postal_code IS NULL )
1420                 AND (  p_bill_to_postal_code IS NULL )))
1421        AND (    ( Recinfo.bill_to_country = p_bill_to_country)
1422             OR (    ( Recinfo.bill_to_country IS NULL )
1423                 AND (  p_bill_to_country IS NULL )))
1424        AND (    ( Recinfo.bill_to_contact_party_id = p_bill_to_contact_party_id)
1425             OR (    ( Recinfo.bill_to_contact_party_id IS NULL )
1426                 AND (  p_bill_to_contact_party_id IS NULL )))
1427        AND (    ( Recinfo.bill_to_contact_name = p_bill_to_contact_name)
1428             OR (    ( Recinfo.bill_to_contact_name IS NULL )
1429                 AND (  p_bill_to_contact_name IS NULL )))
1430        AND (    ( Recinfo.bill_to_email = p_bill_to_email)
1431             OR (    ( Recinfo.bill_to_email IS NULL )
1432                 AND (  p_bill_to_email IS NULL )))
1433        AND (    ( Recinfo.bill_to_phone = p_bill_to_phone)
1434             OR (    ( Recinfo.bill_to_phone IS NULL )
1435                 AND (  p_bill_to_phone IS NULL )))
1436        AND (    ( Recinfo.bill_to_fax = p_bill_to_fax)
1437             OR (    ( Recinfo.bill_to_fax IS NULL )
1438                 AND (  p_bill_to_fax IS NULL )))
1439        AND (    ( Recinfo.ship_to_cust_account_id = p_ship_to_cust_account_id)
1440             OR (    ( Recinfo.ship_to_cust_account_id IS NULL )
1441                 AND (  p_ship_to_cust_account_id IS NULL )))
1442        AND (    ( Recinfo.ship_to_site_use_id = p_ship_to_site_use_id)
1443             OR (    ( Recinfo.ship_to_site_use_id IS NULL )
1444                 AND (  p_ship_to_site_use_id IS NULL )))
1445        AND (    ( Recinfo.ship_to_PARTY_NAME = p_ship_to_PARTY_NAME)
1446             OR (    ( Recinfo.ship_to_PARTY_NAME IS NULL )
1447                 AND (  p_ship_to_PARTY_NAME IS NULL )))
1448        AND (    ( Recinfo.ship_to_PARTY_ID = p_ship_to_PARTY_ID)
1449             OR (    ( Recinfo.ship_to_PARTY_ID IS NULL )
1450                 AND (  p_ship_to_PARTY_ID IS NULL )))
1451        AND (    ( Recinfo.ship_to_PARTY_site_id = p_ship_to_PARTY_site_id)
1452             OR (    ( Recinfo.ship_to_PARTY_site_id IS NULL )
1453                 AND (  p_ship_to_PARTY_site_id IS NULL )))
1454        AND (    ( Recinfo.ship_to_duns_number = p_ship_to_duns_number)
1455             OR (    ( Recinfo.ship_to_duns_number IS NULL )
1456                 AND (  p_ship_to_duns_number IS NULL )))
1457        AND (    ( Recinfo.ship_to_location = p_ship_to_location)
1458             OR (    ( Recinfo.ship_to_location IS NULL )
1459                 AND (  p_ship_to_location IS NULL )))
1460        AND (    ( Recinfo.ship_to_address = p_ship_to_address)
1461             OR (    ( Recinfo.ship_to_address IS NULL )
1462                 AND (  p_ship_to_address IS NULL )))
1463        AND (    ( Recinfo.ship_to_city = p_ship_to_city)
1464             OR (    ( Recinfo.ship_to_city IS NULL )
1465                 AND (  p_ship_to_city IS NULL )))
1466        AND (    ( Recinfo.ship_to_state = p_ship_to_state)
1467             OR (    ( Recinfo.ship_to_state IS NULL )
1468                 AND (  p_ship_to_state IS NULL )))
1469        AND (    ( Recinfo.ship_to_postal_code = p_ship_to_postal_code)
1470             OR (    ( Recinfo.ship_to_postal_code IS NULL )
1471                 AND (  p_ship_to_postal_code IS NULL )))
1472        AND (    ( Recinfo.ship_to_country = p_ship_to_country)
1473             OR (    ( Recinfo.ship_to_country IS NULL )
1474                 AND (  p_ship_to_country IS NULL )))
1475        AND (    ( Recinfo.ship_to_contact_party_id = p_ship_to_contact_party_id)
1476             OR (    ( Recinfo.ship_to_contact_party_id IS NULL )
1477                 AND (  p_ship_to_contact_party_id IS NULL )))
1478        AND (    ( Recinfo.ship_to_contact_name = p_ship_to_contact_name)
1479             OR (    ( Recinfo.ship_to_contact_name IS NULL )
1480                 AND (  p_ship_to_contact_name IS NULL )))
1481        AND (    ( Recinfo.ship_to_email = p_ship_to_email)
1482             OR (    ( Recinfo.ship_to_email IS NULL )
1483                 AND (  p_ship_to_email IS NULL )))
1484        AND (    ( Recinfo.ship_to_phone = p_ship_to_phone)
1485             OR (    ( Recinfo.ship_to_phone IS NULL )
1486                 AND (  p_ship_to_phone IS NULL )))
1487        AND (    ( Recinfo.ship_to_fax = p_ship_to_fax)
1488             OR (    ( Recinfo.ship_to_fax IS NULL )
1489                 AND (  p_ship_to_fax IS NULL )))
1490        AND (    ( Recinfo.ship_from_cust_account_id = p_ship_from_cust_account_id)
1491             OR (    ( Recinfo.ship_from_cust_account_id IS NULL )
1492                 AND (  p_ship_from_cust_account_id IS NULL )))
1493        AND (    ( Recinfo.ship_from_site_id = p_ship_from_site_id)
1494             OR (    ( Recinfo.ship_from_site_id IS NULL )
1495                 AND (  p_ship_from_site_id IS NULL )))
1496        AND (    ( Recinfo.ship_from_PARTY_NAME = p_ship_from_PARTY_NAME)
1497             OR (    ( Recinfo.ship_from_PARTY_NAME IS NULL )
1498                 AND (  p_ship_from_PARTY_NAME IS NULL )))
1499        AND (    ( Recinfo.ship_from_location = p_ship_from_location)
1500             OR (    ( Recinfo.ship_from_location IS NULL )
1501                 AND (  p_ship_from_location IS NULL )))
1502        AND (    ( Recinfo.ship_from_address = p_ship_from_address)
1503             OR (    ( Recinfo.ship_from_address IS NULL )
1504                 AND (  p_ship_from_address IS NULL )))
1505        AND (    ( Recinfo.ship_from_city = p_ship_from_city)
1506             OR (    ( Recinfo.ship_from_city IS NULL )
1507                 AND (  p_ship_from_city IS NULL )))
1508        AND (    ( Recinfo.ship_from_state = p_ship_from_state)
1509             OR (    ( Recinfo.ship_from_state IS NULL )
1510                 AND (  p_ship_from_state IS NULL )))
1511        AND (    ( Recinfo.ship_from_postal_code = p_ship_from_postal_code)
1512             OR (    ( Recinfo.ship_from_postal_code IS NULL )
1513                 AND (  p_ship_from_postal_code IS NULL )))
1514        AND (    ( Recinfo.ship_from_country = p_ship_from_country)
1515             OR (    ( Recinfo.ship_from_country IS NULL )
1516                 AND (  p_ship_from_country IS NULL )))
1517        AND (    ( Recinfo.ship_from_contact_party_id = p_ship_from_contact_party_id)
1518             OR (    ( Recinfo.ship_from_contact_party_id IS NULL )
1519                 AND (  p_ship_from_contact_party_id IS NULL )))
1520        AND (    ( Recinfo.ship_from_contact_name = p_ship_from_contact_name)
1521             OR (    ( Recinfo.ship_from_contact_name IS NULL )
1522                 AND (  p_ship_from_contact_name IS NULL )))
1523        AND (    ( Recinfo.ship_from_email = p_ship_from_email)
1524             OR (    ( Recinfo.ship_from_email IS NULL )
1525                 AND (  p_ship_from_email IS NULL )))
1526        AND (    ( Recinfo.ship_from_phone = p_ship_from_phone)
1527             OR (    ( Recinfo.ship_from_phone IS NULL )
1528                 AND (  p_ship_from_phone IS NULL )))
1529        AND (    ( Recinfo.ship_from_fax = p_ship_from_fax)
1530             OR (    ( Recinfo.ship_from_fax IS NULL )
1531                 AND (  p_ship_from_fax IS NULL )))
1532        AND (    ( Recinfo.sold_from_cust_account_id = p_sold_from_cust_account_id)
1533             OR (    ( Recinfo.sold_from_cust_account_id IS NULL )
1534                 AND (  p_sold_from_cust_account_id IS NULL )))
1535        AND (    ( Recinfo.sold_from_site_id = p_sold_from_site_id)
1536             OR (    ( Recinfo.sold_from_site_id IS NULL )
1537                 AND (  p_sold_from_site_id IS NULL )))
1538        AND (    ( Recinfo.sold_from_PARTY_NAME = p_sold_from_PARTY_NAME)
1539             OR (    ( Recinfo.sold_from_PARTY_NAME IS NULL )
1540                 AND (  p_sold_from_PARTY_NAME IS NULL )))
1541        AND (    ( Recinfo.sold_from_location = p_sold_from_location)
1542             OR (    ( Recinfo.sold_from_location IS NULL )
1543                 AND (  p_sold_from_location IS NULL )))
1544        AND (    ( Recinfo.sold_from_address = p_sold_from_address)
1545             OR (    ( Recinfo.sold_from_address IS NULL )
1546                 AND (  p_sold_from_address IS NULL )))
1547        AND (    ( Recinfo.sold_from_city = p_sold_from_city)
1548             OR (    ( Recinfo.sold_from_city IS NULL )
1549                 AND (  p_sold_from_city IS NULL )))
1550        AND (    ( Recinfo.sold_from_state = p_sold_from_state)
1551             OR (    ( Recinfo.sold_from_state IS NULL )
1552                 AND (  p_sold_from_state IS NULL )))
1553        AND (    ( Recinfo.sold_from_postal_code = p_sold_from_postal_code)
1554             OR (    ( Recinfo.sold_from_postal_code IS NULL )
1555                 AND (  p_sold_from_postal_code IS NULL )))
1556        AND (    ( Recinfo.sold_from_country = p_sold_from_country)
1557             OR (    ( Recinfo.sold_from_country IS NULL )
1558                 AND (  p_sold_from_country IS NULL )))
1559        AND (    ( Recinfo.sold_from_contact_party_id = p_sold_from_contact_party_id)
1560             OR (    ( Recinfo.sold_from_contact_party_id IS NULL )
1561                 AND (  p_sold_from_contact_party_id IS NULL )))
1562        AND (    ( Recinfo.sold_from_contact_name = p_sold_from_contact_name)
1563             OR (    ( Recinfo.sold_from_contact_name IS NULL )
1564                 AND (  p_sold_from_contact_name IS NULL )))
1565        AND (    ( Recinfo.sold_from_email = p_sold_from_email)
1566             OR (    ( Recinfo.sold_from_email IS NULL )
1567                 AND (  p_sold_from_email IS NULL )))
1568        AND (    ( Recinfo.sold_from_phone = p_sold_from_phone)
1569             OR (    ( Recinfo.sold_from_phone IS NULL )
1570                 AND (  p_sold_from_phone IS NULL )))
1571        AND (    ( Recinfo.sold_from_fax = p_sold_from_fax)
1572             OR (    ( Recinfo.sold_from_fax IS NULL )
1573                 AND (  p_sold_from_fax IS NULL )))
1574        AND (    ( Recinfo.price_list_id = p_price_list_id)
1575             OR (    ( Recinfo.price_list_id IS NULL )
1576                 AND (  p_price_list_id IS NULL )))
1577        AND (    ( Recinfo.price_list_name = p_price_list_name)
1578             OR (    ( Recinfo.price_list_name IS NULL )
1579                 AND (  p_price_list_name IS NULL )))
1580        AND (    ( Recinfo.invoice_number = p_invoice_number)
1581             OR (    ( Recinfo.invoice_number IS NULL )
1582                 AND (  p_invoice_number IS NULL )))
1583        AND (    ( Recinfo.date_invoiced= p_date_invoiced)
1584             OR (    ( Recinfo.date_invoiced IS NULL )
1585                 AND (  p_date_invoiced IS NULL )))
1586        AND (    ( Recinfo.po_number = p_po_number)
1587             OR (    ( Recinfo.po_number IS NULL )
1588                 AND (  p_po_number IS NULL )))
1589        AND (    ( Recinfo.po_release_number = p_po_release_number)
1590             OR (    ( Recinfo.po_release_number IS NULL )
1591                 AND (  p_po_release_number IS NULL )))
1592        AND (    ( Recinfo.po_type = p_po_type)
1593             OR (    ( Recinfo.po_type IS NULL )
1594                 AND (  p_po_type IS NULL )))
1595        AND (    ( Recinfo.order_number = p_order_number)
1596             OR (    ( Recinfo.order_number IS NULL )
1597                 AND (  p_order_number IS NULL )))
1598        AND (    ( Recinfo.date_ordered = p_date_ordered)
1599             OR (    ( Recinfo.date_ordered IS NULL )
1600                 AND (  p_date_ordered IS NULL )))
1601        AND (    ( Recinfo.date_shipped = p_date_shipped)
1602             OR (    ( Recinfo.date_shipped IS NULL )
1603                 AND (  p_date_shipped IS NULL )))
1604        AND (    ( Recinfo.purchase_uom_code = p_purchase_uom_code)
1605             OR (    ( Recinfo.purchase_uom_code IS NULL )
1606                 AND (  p_purchase_uom_code IS NULL )))
1607        AND (    ( Recinfo.quantity = p_quantity)
1608             OR (    ( Recinfo.quantity IS NULL )
1609                 AND (  p_quantity IS NULL )))
1610        AND (    ( Recinfo.uom_code = p_uom_code)
1611             OR (    ( Recinfo.uom_code IS NULL )
1612                 AND (  p_uom_code IS NULL )))
1613        AND (    ( Recinfo.currency_code = p_currency_code)
1614             OR (    ( Recinfo.currency_code IS NULL )
1615                 AND (  p_currency_code IS NULL )))
1616        AND (    ( Recinfo.exchange_rate = p_exchange_rate)
1617             OR (    ( Recinfo.exchange_rate IS NULL )
1618                 AND (  p_exchange_rate IS NULL )))
1619        AND (    ( Recinfo.exchange_rate_type = p_exchange_rate_type)
1620             OR (    ( Recinfo.exchange_rate_type IS NULL )
1621                 AND (  p_exchange_rate_type IS NULL )))
1622        AND (    ( Recinfo.exchange_rate_date = p_exchange_rate_date)
1623             OR (    ( Recinfo.exchange_rate_date IS NULL )
1624                 AND (  p_exchange_rate_date IS NULL )))
1625        AND (    ( Recinfo.selling_price = p_selling_price)
1626             OR (    ( Recinfo.selling_price IS NULL )
1627                 AND (  p_selling_price IS NULL )))
1628        AND (    ( Recinfo.acctd_selling_price = p_acctd_selling_price)
1629             OR (    ( Recinfo.acctd_selling_price IS NULL )
1630                 AND (  p_acctd_selling_price IS NULL )))
1631        AND (    ( Recinfo.purchase_price = p_purchase_price)
1632             OR (    ( Recinfo.purchase_price IS NULL )
1633                 AND (  p_purchase_price IS NULL )))
1634        AND (    ( Recinfo.acctd_purchase_price = p_acctd_purchase_price)
1635             OR (    ( Recinfo.acctd_purchase_price IS NULL )
1636                 AND (  p_acctd_purchase_price IS NULL )))
1637        AND (    ( Recinfo.tracing_flag = p_tracing_flag)
1638             OR (    ( Recinfo.tracing_flag IS NULL )
1639                 AND (  p_tracing_flag IS NULL )))
1640        AND (    ( Recinfo.orig_system_quantity = p_orig_system_quantity)
1641             OR (    ( Recinfo.orig_system_quantity IS NULL )
1642                 AND (  p_orig_system_quantity IS NULL )))
1643        AND (    ( Recinfo.orig_system_uom = p_orig_system_uom)
1644             OR (    ( Recinfo.orig_system_uom IS NULL )
1645                 AND (  p_orig_system_uom IS NULL )))
1646        AND (    ( Recinfo.orig_system_currency_code = p_orig_system_currency_code)
1647             OR (    ( Recinfo.orig_system_currency_code IS NULL )
1648                 AND (  p_orig_system_currency_code IS NULL )))
1649        AND (    ( Recinfo.orig_system_selling_price = p_orig_system_selling_price)
1650             OR (    ( Recinfo.orig_system_selling_price IS NULL )
1651                 AND (  p_orig_system_selling_price IS NULL )))
1652        AND (    ( Recinfo.orig_system_reference = p_orig_system_reference)
1653             OR (    ( Recinfo.orig_system_reference IS NULL )
1654                 AND (  p_orig_system_reference IS NULL )))
1655        AND (    ( Recinfo.orig_system_line_reference = p_orig_system_line_reference)
1656             OR (    ( Recinfo.orig_system_line_reference IS NULL )
1657                 AND (  p_orig_system_line_reference IS NULL )))
1658        AND (    ( Recinfo.orig_system_purchase_uom = p_orig_system_purchase_uom)
1659             OR (    ( Recinfo.orig_system_purchase_uom IS NULL )
1660                 AND (  p_orig_system_purchase_uom IS NULL )))
1661        AND (    ( Recinfo.orig_system_purchase_curr = p_orig_system_purchase_curr)
1662             OR (    ( Recinfo.orig_system_purchase_curr IS NULL )
1663                 AND (  p_orig_system_purchase_curr IS NULL )))
1664        AND (    ( Recinfo.orig_system_purchase_price = p_orig_system_purchase_price)
1665             OR (    ( Recinfo.orig_system_purchase_price IS NULL )
1666                 AND (  p_orig_system_purchase_price IS NULL )))
1667        AND (    ( Recinfo.orig_system_purchase_quantity = p_orig_system_purchase_quant)
1668             OR (    ( Recinfo.orig_system_purchase_quantity IS NULL )
1669                 AND (  p_orig_system_purchase_quant IS NULL )))
1670        AND (    ( Recinfo.orig_system_item_number = p_orig_system_item_number)
1671             OR (    ( Recinfo.orig_system_item_number IS NULL )
1672                 AND (  p_orig_system_item_number IS NULL )))
1673        AND (    ( Recinfo.product_category_id = p_product_category_id)
1674             OR (    ( Recinfo.product_category_id IS NULL )
1675                 AND (  p_product_category_id IS NULL )))
1676        AND (    ( Recinfo.category_name = p_category_name)
1677             OR (    ( Recinfo.category_name IS NULL )
1678                 AND (  p_category_name IS NULL )))
1679        AND (    ( Recinfo.inventory_item_segment1 = p_inventory_item_segment1)
1680             OR (    ( Recinfo.inventory_item_segment1 IS NULL )
1681                 AND (  p_inventory_item_segment1 IS NULL )))
1682        AND (    ( Recinfo.inventory_item_segment2 = p_inventory_item_segment2)
1683             OR (    ( Recinfo.inventory_item_segment2 IS NULL )
1684                 AND (  p_inventory_item_segment2 IS NULL )))
1685        AND (    ( Recinfo.inventory_item_segment3 = p_inventory_item_segment3)
1686             OR (    ( Recinfo.inventory_item_segment3 IS NULL )
1687                 AND (  p_inventory_item_segment3 IS NULL )))
1688        AND (    ( Recinfo.inventory_item_segment4 = p_inventory_item_segment4)
1689             OR (    ( Recinfo.inventory_item_segment4 IS NULL )
1690                 AND (  p_inventory_item_segment4 IS NULL )))
1691        AND (    ( Recinfo.inventory_item_segment5 = p_inventory_item_segment5)
1692             OR (    ( Recinfo.inventory_item_segment5 IS NULL )
1693                 AND (  p_inventory_item_segment5 IS NULL )))
1694        AND (    ( Recinfo.inventory_item_segment6 = p_inventory_item_segment6)
1695             OR (    ( Recinfo.inventory_item_segment6 IS NULL )
1696                 AND (  p_inventory_item_segment6 IS NULL )))
1697        AND (    ( Recinfo.inventory_item_segment7 = p_inventory_item_segment7)
1698             OR (    ( Recinfo.inventory_item_segment7 IS NULL )
1699                 AND (  p_inventory_item_segment7 IS NULL )))
1700        AND (    ( Recinfo.inventory_item_segment8 = p_inventory_item_segment8)
1701             OR (    ( Recinfo.inventory_item_segment8 IS NULL )
1702                 AND (  p_inventory_item_segment8 IS NULL )))
1703        AND (    ( Recinfo.inventory_item_segment9 = p_inventory_item_segment9)
1704             OR (    ( Recinfo.inventory_item_segment9 IS NULL )
1705                 AND (  p_inventory_item_segment9 IS NULL )))
1706        AND (    ( Recinfo.inventory_item_segment10 = p_inventory_item_segment10)
1707             OR (    ( Recinfo.inventory_item_segment10 IS NULL )
1708                 AND (  p_inventory_item_segment10 IS NULL )))
1709        AND (    ( Recinfo.inventory_item_segment11 = p_inventory_item_segment11)
1710             OR (    ( Recinfo.inventory_item_segment11 IS NULL )
1711                 AND (  p_inventory_item_segment11 IS NULL )))
1712        AND (    ( Recinfo.inventory_item_segment12 = p_inventory_item_segment12)
1713             OR (    ( Recinfo.inventory_item_segment12 IS NULL )
1714                 AND (  p_inventory_item_segment12 IS NULL )))
1715        AND (    ( Recinfo.inventory_item_segment13 = p_inventory_item_segment13)
1716             OR (    ( Recinfo.inventory_item_segment13 IS NULL )
1717                 AND (  p_inventory_item_segment13 IS NULL )))
1718        AND (    ( Recinfo.inventory_item_segment14 = p_inventory_item_segment14)
1719             OR (    ( Recinfo.inventory_item_segment14 IS NULL )
1720                 AND (  p_inventory_item_segment14 IS NULL )))
1721        AND (    ( Recinfo.inventory_item_segment15 = p_inventory_item_segment15)
1722             OR (    ( Recinfo.inventory_item_segment15 IS NULL )
1723                 AND (  p_inventory_item_segment15 IS NULL )))
1724        AND (    ( Recinfo.inventory_item_segment16 = p_inventory_item_segment16)
1725             OR (    ( Recinfo.inventory_item_segment16 IS NULL )
1726                 AND (  p_inventory_item_segment16 IS NULL )))
1727        AND (    ( Recinfo.inventory_item_segment17 = p_inventory_item_segment17)
1728             OR (    ( Recinfo.inventory_item_segment17 IS NULL )
1729                 AND (  p_inventory_item_segment17 IS NULL )))
1730        AND (    ( Recinfo.inventory_item_segment18 = p_inventory_item_segment18)
1731             OR (    ( Recinfo.inventory_item_segment18 IS NULL )
1732                 AND (  p_inventory_item_segment18 IS NULL )))
1733        AND (    ( Recinfo.inventory_item_segment19 = p_inventory_item_segment19)
1734             OR (    ( Recinfo.inventory_item_segment19 IS NULL )
1735                 AND (  p_inventory_item_segment19 IS NULL )))
1736        AND (    ( Recinfo.inventory_item_segment20 = p_inventory_item_segment20)
1737             OR (    ( Recinfo.inventory_item_segment20 IS NULL )
1738                 AND (  p_inventory_item_segment20 IS NULL )))
1739        AND (    ( Recinfo.inventory_item_id = p_inventory_item_id)
1740             OR (    ( Recinfo.inventory_item_id IS NULL )
1741                 AND (  p_inventory_item_id IS NULL )))
1742        AND (    ( Recinfo.item_description = p_item_description)
1743             OR (    ( Recinfo.item_description IS NULL )
1744                 AND (  p_item_description IS NULL )))
1745        AND (    ( Recinfo.upc_code = p_upc_code)
1746             OR (    ( Recinfo.upc_code IS NULL )
1747                 AND (  p_upc_code IS NULL )))
1748        AND (    ( Recinfo.item_number = p_item_number)
1749             OR (    ( Recinfo.item_number IS NULL )
1750                 AND (  p_item_number IS NULL )))
1751        AND (    ( Recinfo.direct_customer_flag = p_direct_customer_flag)
1752             OR (    ( Recinfo.direct_customer_flag IS NULL )
1753                 AND (  p_direct_customer_flag IS NULL )))
1754        AND (    ( Recinfo.attribute_category = p_attribute_category)
1755             OR (    ( Recinfo.attribute_category IS NULL )
1756                 AND (  p_attribute_category IS NULL )))
1757        AND (    ( Recinfo.attribute1 = p_attribute1)
1758             OR (    ( Recinfo.attribute1 IS NULL )
1759                 AND (  p_attribute1 IS NULL )))
1760        AND (    ( Recinfo.attribute2 = p_attribute2)
1761             OR (    ( Recinfo.attribute2 IS NULL )
1762                 AND (  p_attribute2 IS NULL )))
1763        AND (    ( Recinfo.attribute3 = p_attribute3)
1764             OR (    ( Recinfo.attribute3 IS NULL )
1765                 AND (  p_attribute3 IS NULL )))
1766        AND (    ( Recinfo.attribute4 = p_attribute4)
1767             OR (    ( Recinfo.attribute4 IS NULL )
1768                 AND (  p_attribute4 IS NULL )))
1769        AND (    ( Recinfo.attribute5 = p_attribute5)
1770             OR (    ( Recinfo.attribute5 IS NULL )
1771                 AND (  p_attribute5 IS NULL )))
1772        AND (    ( Recinfo.attribute6 = p_attribute6)
1773             OR (    ( Recinfo.attribute6 IS NULL )
1774                 AND (  p_attribute6 IS NULL )))
1775        AND (    ( Recinfo.attribute7 = p_attribute7)
1776             OR (    ( Recinfo.attribute7 IS NULL )
1777                 AND (  p_attribute7 IS NULL )))
1778        AND (    ( Recinfo.attribute8 = p_attribute8)
1779             OR (    ( Recinfo.attribute8 IS NULL )
1780                 AND (  p_attribute8 IS NULL )))
1781        AND (    ( Recinfo.attribute9 = p_attribute9)
1782             OR (    ( Recinfo.attribute9 IS NULL )
1783                 AND (  p_attribute9 IS NULL )))
1784        AND (    ( Recinfo.attribute10 = p_attribute10)
1785             OR (    ( Recinfo.attribute10 IS NULL )
1786                 AND (  p_attribute10 IS NULL )))
1787        AND (    ( Recinfo.attribute11 = p_attribute11)
1788             OR (    ( Recinfo.attribute11 IS NULL )
1789                 AND (  p_attribute11 IS NULL )))
1790        AND (    ( Recinfo.attribute12 = p_attribute12)
1791             OR (    ( Recinfo.attribute12 IS NULL )
1792                 AND (  p_attribute12 IS NULL )))
1793        AND (    ( Recinfo.attribute13 = p_attribute13)
1794             OR (    ( Recinfo.attribute13 IS NULL )
1795                 AND (  p_attribute13 IS NULL )))
1796        AND (    ( Recinfo.attribute14 = p_attribute14)
1797             OR (    ( Recinfo.attribute14 IS NULL )
1798                 AND (  p_attribute14 IS NULL )))
1799        AND (    ( Recinfo.attribute15 = p_attribute15)
1800             OR (    ( Recinfo.attribute15 IS NULL )
1801                 AND (  p_attribute15 IS NULL )))
1802        AND (    ( Recinfo.line_attribute_category = p_line_attribute_category)
1803             OR (    ( Recinfo.line_attribute_category IS NULL )
1804                 AND (  p_line_attribute_category IS NULL )))
1805        AND (    ( Recinfo.line_attribute1 = p_line_attribute1)
1806             OR (    ( Recinfo.line_attribute1 IS NULL )
1807                 AND (  p_line_attribute1 IS NULL )))
1808        AND (    ( Recinfo.line_attribute2 = p_line_attribute2)
1809             OR (    ( Recinfo.line_attribute2 IS NULL )
1810                 AND (  p_line_attribute2 IS NULL )))
1811        AND (    ( Recinfo.line_attribute3 = p_line_attribute3)
1812             OR (    ( Recinfo.line_attribute3 IS NULL )
1813                 AND (  p_line_attribute3 IS NULL )))
1814        AND (    ( Recinfo.line_attribute4 = p_line_attribute4)
1815             OR (    ( Recinfo.line_attribute4 IS NULL )
1816                 AND (  p_line_attribute4 IS NULL )))
1817        AND (    ( Recinfo.line_attribute5 = p_line_attribute5)
1818             OR (    ( Recinfo.line_attribute5 IS NULL )
1819                 AND (  p_line_attribute5 IS NULL )))
1820        AND (    ( Recinfo.line_attribute6 = p_line_attribute6)
1821             OR (    ( Recinfo.line_attribute6 IS NULL )
1822                 AND (  p_line_attribute6 IS NULL )))
1823        AND (    ( Recinfo.line_attribute7 = p_line_attribute7)
1824             OR (    ( Recinfo.line_attribute7 IS NULL )
1825                 AND (  p_line_attribute7 IS NULL )))
1826        AND (    ( Recinfo.line_attribute8 = p_line_attribute8)
1827             OR (    ( Recinfo.line_attribute8 IS NULL )
1828                 AND (  p_line_attribute8 IS NULL )))
1829        AND (    ( Recinfo.line_attribute9 = p_line_attribute9)
1830             OR (    ( Recinfo.line_attribute9 IS NULL )
1831                 AND (  p_line_attribute9 IS NULL )))
1832        AND (    ( Recinfo.line_attribute10 = p_line_attribute10)
1833             OR (    ( Recinfo.line_attribute10 IS NULL )
1834                 AND (  p_line_attribute10 IS NULL )))
1835        AND (    ( Recinfo.line_attribute11 = p_line_attribute11)
1836             OR (    ( Recinfo.line_attribute11 IS NULL )
1837                 AND (  p_line_attribute11 IS NULL )))
1838        AND (    ( Recinfo.line_attribute12 = p_line_attribute12)
1839             OR (    ( Recinfo.line_attribute12 IS NULL )
1840                 AND (  p_line_attribute12 IS NULL )))
1841        AND (    ( Recinfo.line_attribute13 = p_line_attribute13)
1842             OR (    ( Recinfo.line_attribute13 IS NULL )
1843                 AND (  p_line_attribute13 IS NULL )))
1844        AND (    ( Recinfo.line_attribute14 = p_line_attribute14)
1845             OR (    ( Recinfo.line_attribute14 IS NULL )
1846                 AND (  p_line_attribute14 IS NULL )))
1847        AND (    ( Recinfo.line_attribute15 = p_line_attribute15)
1848             OR (    ( Recinfo.line_attribute15 IS NULL )
1849                 AND (  p_line_attribute15 IS NULL )))
1850        AND (    ( Recinfo.org_id = p_org_id)
1851             OR (    ( Recinfo.org_id IS NULL )
1852                 AND (  p_org_id IS NULL )))
1853        ) THEN
1854        RETURN;
1855    ELSE
1856        FND_MESSAGE.SET_NAME('FND', 'FORM_RECORD_CHANGED');
1857        APP_EXCEPTION.RAISE_EXCEPTION;
1858    END IF;
1859 END Lock_Row;
1860 
1861 END OZF_RESALE_LINES_PKG;