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