184:
185: open c_item_type_code;
186: fetch c_item_type_code into l_item_type_code;
187:
188: IF aso_debug_pub.g_debug_flag = 'Y' THEN
189: aso_debug_pub.add('Get_invoice_to_party_site_id: c_item_type_code: l_item_type_code: '||l_item_type_code);
190: END IF;
191:
192: IF c_item_type_code%FOUND and l_item_type_code = 'CFG' THEN
185: open c_item_type_code;
186: fetch c_item_type_code into l_item_type_code;
187:
188: IF aso_debug_pub.g_debug_flag = 'Y' THEN
189: aso_debug_pub.add('Get_invoice_to_party_site_id: c_item_type_code: l_item_type_code: '||l_item_type_code);
190: END IF;
191:
192: IF c_item_type_code%FOUND and l_item_type_code = 'CFG' THEN
193:
195:
196: open c_root_model_line_id;
197: fetch c_root_model_line_id into l_model_quote_line_id;
198:
199: IF aso_debug_pub.g_debug_flag = 'Y' THEN
200: aso_debug_pub.add('Get_invoice_to_party_site_id: c_root_model_line_id: l_model_quote_line_id: ' ||l_model_quote_line_id);
201: END IF;
202:
203: IF c_root_model_line_id%FOUND and l_model_quote_line_id is not null THEN
196: open c_root_model_line_id;
197: fetch c_root_model_line_id into l_model_quote_line_id;
198:
199: IF aso_debug_pub.g_debug_flag = 'Y' THEN
200: aso_debug_pub.add('Get_invoice_to_party_site_id: c_root_model_line_id: l_model_quote_line_id: ' ||l_model_quote_line_id);
201: END IF;
202:
203: IF c_root_model_line_id%FOUND and l_model_quote_line_id is not null THEN
204:
205: close c_root_model_line_id;
206:
207: l_inv_site_id := Get_invoice_to_party_site_id(p_qte_header_id, l_model_quote_line_id);
208:
209: IF aso_debug_pub.g_debug_flag = 'Y' THEN
210: aso_debug_pub.add('Get_invoice_to_party_site_id: Model l_inv_site_id: '||l_inv_site_id);
211: END IF;
212:
213: return l_inv_site_id;
206:
207: l_inv_site_id := Get_invoice_to_party_site_id(p_qte_header_id, l_model_quote_line_id);
208:
209: IF aso_debug_pub.g_debug_flag = 'Y' THEN
210: aso_debug_pub.add('Get_invoice_to_party_site_id: Model l_inv_site_id: '||l_inv_site_id);
211: END IF;
212:
213: return l_inv_site_id;
214:
297: l_item_type_code VARCHAR2(30);
298:
299: BEGIN
300:
301: IF aso_debug_pub.g_debug_flag = 'Y' THEN
302: aso_debug_pub.add('ASO_SHIPMENT_PVT: Get_cust_to_party_site_id: Begin');
303: END IF;
304:
305: OPEN c_inv_site1;
298:
299: BEGIN
300:
301: IF aso_debug_pub.g_debug_flag = 'Y' THEN
302: aso_debug_pub.add('ASO_SHIPMENT_PVT: Get_cust_to_party_site_id: Begin');
303: END IF;
304:
305: OPEN c_inv_site1;
306: FETCH c_inv_site1 INTO l_inv_site_id;
357: return l_bill_site_use_id;
358:
359: ELSE
360:
361: IF aso_debug_pub.g_debug_flag = 'Y' THEN
362: aso_debug_pub.add('Get_cust_to_party_site_id: Else c_inv_site1');
363: END IF;
364:
365: CLOSE c_inv_site1;
358:
359: ELSE
360:
361: IF aso_debug_pub.g_debug_flag = 'Y' THEN
362: aso_debug_pub.add('Get_cust_to_party_site_id: Else c_inv_site1');
363: END IF;
364:
365: CLOSE c_inv_site1;
366:
366:
367: open c_item_type_code;
368: fetch c_item_type_code into l_item_type_code;
369:
370: IF aso_debug_pub.g_debug_flag = 'Y' THEN
371: aso_debug_pub.add('Get_cust_to_party_site_id: c_item_type_code: l_item_type_code: '||l_item_type_code);
372: END IF;
373:
374: IF c_item_type_code%FOUND and l_item_type_code = 'CFG' THEN
367: open c_item_type_code;
368: fetch c_item_type_code into l_item_type_code;
369:
370: IF aso_debug_pub.g_debug_flag = 'Y' THEN
371: aso_debug_pub.add('Get_cust_to_party_site_id: c_item_type_code: l_item_type_code: '||l_item_type_code);
372: END IF;
373:
374: IF c_item_type_code%FOUND and l_item_type_code = 'CFG' THEN
375:
377:
378: open c_root_model_line_id;
379: fetch c_root_model_line_id into l_model_quote_line_id;
380:
381: IF aso_debug_pub.g_debug_flag = 'Y' THEN
382: aso_debug_pub.add('Get_cust_to_party_site_id: c_root_model_line_id: l_model_quote_line_id: '||l_model_quote_line_id);
383: END IF;
384:
385: IF c_root_model_line_id%FOUND and l_model_quote_line_id is not null THEN
378: open c_root_model_line_id;
379: fetch c_root_model_line_id into l_model_quote_line_id;
380:
381: IF aso_debug_pub.g_debug_flag = 'Y' THEN
382: aso_debug_pub.add('Get_cust_to_party_site_id: c_root_model_line_id: l_model_quote_line_id: '||l_model_quote_line_id);
383: END IF;
384:
385: IF c_root_model_line_id%FOUND and l_model_quote_line_id is not null THEN
386:
569: l_shipment_id NUMBER;
570: /* End : Code change for Bug 12938390(11i Bug 10253993) */
571:
572: BEGIN
573: IF aso_debug_pub.g_debug_flag = 'Y' THEN
574: aso_debug_pub.add('ASO_SHIPMENT_PVT:p_qte_header_id ' || p_qte_header_id, 1, 'N');
575: aso_debug_pub.add('ASO_SHIPMENT_PVT:quote_line_id ' || p_qte_line_id, 1, 'N');
576: aso_debug_pub.add('ASO_SHIPMENT_PVT:shipment_id ' || p_shipment_id, 1, 'N');
577: END IF;
570: /* End : Code change for Bug 12938390(11i Bug 10253993) */
571:
572: BEGIN
573: IF aso_debug_pub.g_debug_flag = 'Y' THEN
574: aso_debug_pub.add('ASO_SHIPMENT_PVT:p_qte_header_id ' || p_qte_header_id, 1, 'N');
575: aso_debug_pub.add('ASO_SHIPMENT_PVT:quote_line_id ' || p_qte_line_id, 1, 'N');
576: aso_debug_pub.add('ASO_SHIPMENT_PVT:shipment_id ' || p_shipment_id, 1, 'N');
577: END IF;
578:
571:
572: BEGIN
573: IF aso_debug_pub.g_debug_flag = 'Y' THEN
574: aso_debug_pub.add('ASO_SHIPMENT_PVT:p_qte_header_id ' || p_qte_header_id, 1, 'N');
575: aso_debug_pub.add('ASO_SHIPMENT_PVT:quote_line_id ' || p_qte_line_id, 1, 'N');
576: aso_debug_pub.add('ASO_SHIPMENT_PVT:shipment_id ' || p_shipment_id, 1, 'N');
577: END IF;
578:
579: OPEN c_ship_site1;
572: BEGIN
573: IF aso_debug_pub.g_debug_flag = 'Y' THEN
574: aso_debug_pub.add('ASO_SHIPMENT_PVT:p_qte_header_id ' || p_qte_header_id, 1, 'N');
575: aso_debug_pub.add('ASO_SHIPMENT_PVT:quote_line_id ' || p_qte_line_id, 1, 'N');
576: aso_debug_pub.add('ASO_SHIPMENT_PVT:shipment_id ' || p_shipment_id, 1, 'N');
577: END IF;
578:
579: OPEN c_ship_site1;
580: FETCH c_ship_site1 INTO l_ship_site_id, l_ship_cust_acct_id;
578:
579: OPEN c_ship_site1;
580: FETCH c_ship_site1 INTO l_ship_site_id, l_ship_cust_acct_id;
581:
582: IF aso_debug_pub.g_debug_flag = 'Y' THEN
583: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site1 l_ship_site_id ' || l_ship_site_id, 1, 'N');
584: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site1 l_ship_cust_acct_id ' || l_ship_cust_acct_id, 1, 'N');
585: END IF;
586:
579: OPEN c_ship_site1;
580: FETCH c_ship_site1 INTO l_ship_site_id, l_ship_cust_acct_id;
581:
582: IF aso_debug_pub.g_debug_flag = 'Y' THEN
583: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site1 l_ship_site_id ' || l_ship_site_id, 1, 'N');
584: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site1 l_ship_cust_acct_id ' || l_ship_cust_acct_id, 1, 'N');
585: END IF;
586:
587: /* Start : Code change for Bug 12938390(11i Bug 12426838) , changed position of this cursor */
580: FETCH c_ship_site1 INTO l_ship_site_id, l_ship_cust_acct_id;
581:
582: IF aso_debug_pub.g_debug_flag = 'Y' THEN
583: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site1 l_ship_site_id ' || l_ship_site_id, 1, 'N');
584: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site1 l_ship_cust_acct_id ' || l_ship_cust_acct_id, 1, 'N');
585: END IF;
586:
587: /* Start : Code change for Bug 12938390(11i Bug 12426838) , changed position of this cursor */
588: Open C_SHIPMENT;
588: Open C_SHIPMENT;
589: Fetch C_SHIPMENT INTO l_shipment_id;
590: Close C_SHIPMENT;
591:
592: aso_debug_pub.add('ASO_SHIPMENT_PVT: At the start , l_shipment_id : '||l_shipment_id);
593:
594: /* End : Code change for Bug 12938390(11i Bug 12426838) */
595:
596: IF c_ship_site1%FOUND and l_ship_site_id IS NOT NULL and l_ship_site_id <> FND_API.G_MISS_NUM THEN
600: --Get the ship_to_cust_account if present
601: OPEN c_ship_cust_id;
602: FETCH c_ship_cust_id into l_cust_id;
603:
604: IF aso_debug_pub.g_debug_flag = 'Y' THEN
605: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_cust_id l_cust_id ' || l_cust_id, 1, 'N');
606: END IF;
607:
608: IF c_ship_cust_id%NOTFOUND or l_cust_id IS NULL or l_cust_id = FND_API.G_MISS_NUM THEN
601: OPEN c_ship_cust_id;
602: FETCH c_ship_cust_id into l_cust_id;
603:
604: IF aso_debug_pub.g_debug_flag = 'Y' THEN
605: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_cust_id l_cust_id ' || l_cust_id, 1, 'N');
606: END IF;
607:
608: IF c_ship_cust_id%NOTFOUND or l_cust_id IS NULL or l_cust_id = FND_API.G_MISS_NUM THEN
609:
612: --OPEN c_ship_cust_id1;
613: OPEN c_ship_cust_id1(l_shipment_id); -- Code change done for Bug 12938390(11i Bug 12426838)
614: FETCH c_ship_cust_id1 into l_cust_id;
615:
616: IF aso_debug_pub.g_debug_flag = 'Y' THEN
617: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_cust_id1 l_cust_id ' || l_cust_id, 1, 'N');
618: END IF;
619:
620: IF c_ship_cust_id1%NOTFOUND or l_cust_id IS NULL or l_cust_id = FND_API.G_MISS_NUM THEN
613: OPEN c_ship_cust_id1(l_shipment_id); -- Code change done for Bug 12938390(11i Bug 12426838)
614: FETCH c_ship_cust_id1 into l_cust_id;
615:
616: IF aso_debug_pub.g_debug_flag = 'Y' THEN
617: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_cust_id1 l_cust_id ' || l_cust_id, 1, 'N');
618: END IF;
619:
620: IF c_ship_cust_id1%NOTFOUND or l_cust_id IS NULL or l_cust_id = FND_API.G_MISS_NUM THEN
621:
625: OPEN c_cust_id;
626: FETCH c_cust_id INTO l_cust_id;
627: CLOSE c_cust_id;
628:
629: IF aso_debug_pub.g_debug_flag = 'Y' THEN
630: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_cust_id l_cust_id ' || l_cust_id, 1, 'N');
631: END IF;
632:
633: OPEN C_site_use(l_cust_id , l_ship_site_id);
626: FETCH c_cust_id INTO l_cust_id;
627: CLOSE c_cust_id;
628:
629: IF aso_debug_pub.g_debug_flag = 'Y' THEN
630: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_cust_id l_cust_id ' || l_cust_id, 1, 'N');
631: END IF;
632:
633: OPEN C_site_use(l_cust_id , l_ship_site_id);
634: FETCH C_site_use into l_ship_site_use_id;
632:
633: OPEN C_site_use(l_cust_id , l_ship_site_id);
634: FETCH C_site_use into l_ship_site_use_id;
635:
636: IF aso_debug_pub.g_debug_flag = 'Y' THEN
637: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use1 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
638: END IF;
639: CLOSE C_site_use;
640:
633: OPEN C_site_use(l_cust_id , l_ship_site_id);
634: FETCH C_site_use into l_ship_site_use_id;
635:
636: IF aso_debug_pub.g_debug_flag = 'Y' THEN
637: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use1 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
638: END IF;
639: CLOSE C_site_use;
640:
641: return l_ship_site_use_id;
646:
647: OPEN C_site_use(l_cust_id , l_ship_site_id);
648: FETCH C_site_use into l_ship_site_use_id;
649:
650: IF aso_debug_pub.g_debug_flag = 'Y' THEN
651: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use2 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
652: END IF;
653: CLOSE C_site_use;
654:
647: OPEN C_site_use(l_cust_id , l_ship_site_id);
648: FETCH C_site_use into l_ship_site_use_id;
649:
650: IF aso_debug_pub.g_debug_flag = 'Y' THEN
651: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use2 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
652: END IF;
653: CLOSE C_site_use;
654:
655: return l_ship_site_use_id;
663:
664: OPEN C_site_use(l_cust_id , l_ship_site_id);
665: FETCH C_site_use into l_ship_site_use_id;
666:
667: IF aso_debug_pub.g_debug_flag = 'Y' THEN
668: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use3 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
669: END IF;
670: CLOSE C_site_use;
671:
664: OPEN C_site_use(l_cust_id , l_ship_site_id);
665: FETCH C_site_use into l_ship_site_use_id;
666:
667: IF aso_debug_pub.g_debug_flag = 'Y' THEN
668: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use3 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
669: END IF;
670: CLOSE C_site_use;
671:
672: return l_ship_site_use_id;
677:
678: open c_item_type_code;
679: fetch c_item_type_code into l_item_type_code;
680:
681: IF aso_debug_pub.g_debug_flag = 'Y' THEN
682: aso_debug_pub.add('Get_Ship_To_site_Id: c_item_type_code: l_item_type_code: '||l_item_type_code);
683: END IF;
684:
685: IF c_item_type_code%FOUND and l_item_type_code = 'CFG' THEN
678: open c_item_type_code;
679: fetch c_item_type_code into l_item_type_code;
680:
681: IF aso_debug_pub.g_debug_flag = 'Y' THEN
682: aso_debug_pub.add('Get_Ship_To_site_Id: c_item_type_code: l_item_type_code: '||l_item_type_code);
683: END IF;
684:
685: IF c_item_type_code%FOUND and l_item_type_code = 'CFG' THEN
686:
688:
689: open c_root_model_line_id;
690: fetch c_root_model_line_id into l_model_quote_line_id;
691:
692: IF aso_debug_pub.g_debug_flag = 'Y' THEN
693: aso_debug_pub.add('Get_Ship_To_site_Id: c_root_model_line_id: l_model_quote_line_id: '||l_model_quote_line_id);
694: END IF;
695:
696: IF c_root_model_line_id%FOUND and l_model_quote_line_id is not null THEN
689: open c_root_model_line_id;
690: fetch c_root_model_line_id into l_model_quote_line_id;
691:
692: IF aso_debug_pub.g_debug_flag = 'Y' THEN
693: aso_debug_pub.add('Get_Ship_To_site_Id: c_root_model_line_id: l_model_quote_line_id: '||l_model_quote_line_id);
694: END IF;
695:
696: IF c_root_model_line_id%FOUND and l_model_quote_line_id is not null THEN
697:
699:
700: open c_shipment_id(l_model_quote_line_id);
701: fetch c_shipment_id into l_model_shipment_id;
702:
703: IF aso_debug_pub.g_debug_flag = 'Y' THEN
704: aso_debug_pub.add('Get_Ship_To_site_Id: c_shipment_id: l_model_shipment_id: '||l_model_shipment_id);
705: END IF;
706:
707: IF c_shipment_id%FOUND and l_model_shipment_id is not null THEN
700: open c_shipment_id(l_model_quote_line_id);
701: fetch c_shipment_id into l_model_shipment_id;
702:
703: IF aso_debug_pub.g_debug_flag = 'Y' THEN
704: aso_debug_pub.add('Get_Ship_To_site_Id: c_shipment_id: l_model_shipment_id: '||l_model_shipment_id);
705: END IF;
706:
707: IF c_shipment_id%FOUND and l_model_shipment_id is not null THEN
708:
708:
709: close c_shipment_id;
710:
711: l_ship_site_use_id := Get_Ship_To_site_Id(p_qte_header_id, l_model_quote_line_id, l_model_shipment_id);
712: IF aso_debug_pub.g_debug_flag = 'Y' THEN
713: aso_debug_pub.add('Get_Ship_To_site_Id: l_ship_site_use_id: '||l_ship_site_use_id);
714: END IF;
715:
716: return l_ship_site_use_id;
709: close c_shipment_id;
710:
711: l_ship_site_use_id := Get_Ship_To_site_Id(p_qte_header_id, l_model_quote_line_id, l_model_shipment_id);
712: IF aso_debug_pub.g_debug_flag = 'Y' THEN
713: aso_debug_pub.add('Get_Ship_To_site_Id: l_ship_site_use_id: '||l_ship_site_use_id);
714: END IF;
715:
716: return l_ship_site_use_id;
717:
733: Open C_SHIPMENT;
734: Fetch C_SHIPMENT INTO l_shipment_id;
735: Close C_SHIPMENT;
736:
737: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site2 l_shipment_id : '||l_shipment_id); */
738:
739: OPEN c_ship_site2(l_shipment_id);
740: /* End : Code change for Bug 12938390(11i Bug 10253993) */
741:
741:
742: --OPEN c_ship_site2;
743: FETCH c_ship_site2 INTO l_ship_site_id, l_ship_cust_acct_id;
744:
745: IF aso_debug_pub.g_debug_flag = 'Y' THEN
746: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site2 l_ship_site_id ' || l_ship_site_id, 1, 'N');
747: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site2 l_ship_cust_acct_id ' || l_ship_cust_acct_id, 1, 'N');
748: END IF;
749:
742: --OPEN c_ship_site2;
743: FETCH c_ship_site2 INTO l_ship_site_id, l_ship_cust_acct_id;
744:
745: IF aso_debug_pub.g_debug_flag = 'Y' THEN
746: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site2 l_ship_site_id ' || l_ship_site_id, 1, 'N');
747: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site2 l_ship_cust_acct_id ' || l_ship_cust_acct_id, 1, 'N');
748: END IF;
749:
750: IF c_ship_site2%FOUND AND l_ship_site_id IS NOT NULL and l_ship_site_id <> FND_API.G_MISS_NUM THEN
743: FETCH c_ship_site2 INTO l_ship_site_id, l_ship_cust_acct_id;
744:
745: IF aso_debug_pub.g_debug_flag = 'Y' THEN
746: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site2 l_ship_site_id ' || l_ship_site_id, 1, 'N');
747: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_site2 l_ship_cust_acct_id ' || l_ship_cust_acct_id, 1, 'N');
748: END IF;
749:
750: IF c_ship_site2%FOUND AND l_ship_site_id IS NOT NULL and l_ship_site_id <> FND_API.G_MISS_NUM THEN
751:
753: --Get the ship_to_cust_account if present
754: OPEN c_ship_cust_id;
755: FETCH c_ship_cust_id into l_cust_id;
756:
757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
758: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_cust_id l_cust_id ' || l_cust_id, 1, 'N');
759: END IF;
760:
761: IF c_ship_cust_id%NOTFOUND or l_cust_id IS NULL or l_cust_id = FND_API.G_MISS_NUM THEN
754: OPEN c_ship_cust_id;
755: FETCH c_ship_cust_id into l_cust_id;
756:
757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
758: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_cust_id l_cust_id ' || l_cust_id, 1, 'N');
759: END IF;
760:
761: IF c_ship_cust_id%NOTFOUND or l_cust_id IS NULL or l_cust_id = FND_API.G_MISS_NUM THEN
762:
766: OPEN c_ship_cust_id1(l_shipment_id); -- Code change for Bug 12938390(11i Bug 12426838)
767:
768: FETCH c_ship_cust_id1 into l_cust_id;
769:
770: IF aso_debug_pub.g_debug_flag = 'Y' THEN
771: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_cust_id1 l_cust_id ' || l_cust_id, 1, 'N');
772: END IF;
773:
774: IF c_ship_cust_id1%NOTFOUND or l_cust_id IS NULL or l_cust_id = FND_API.G_MISS_NUM THEN
767:
768: FETCH c_ship_cust_id1 into l_cust_id;
769:
770: IF aso_debug_pub.g_debug_flag = 'Y' THEN
771: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_ship_cust_id1 l_cust_id ' || l_cust_id, 1, 'N');
772: END IF;
773:
774: IF c_ship_cust_id1%NOTFOUND or l_cust_id IS NULL or l_cust_id = FND_API.G_MISS_NUM THEN
775:
778: OPEN c_cust_id;
779: FETCH c_cust_id INTO l_cust_id;
780: CLOSE c_cust_id;
781:
782: IF aso_debug_pub.g_debug_flag = 'Y' THEN
783: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_cust_id l_cust_id ' || l_cust_id, 1, 'N');
784: END IF;
785:
786: OPEN C_site_use(l_cust_id , l_ship_site_id);
779: FETCH c_cust_id INTO l_cust_id;
780: CLOSE c_cust_id;
781:
782: IF aso_debug_pub.g_debug_flag = 'Y' THEN
783: aso_debug_pub.add('ASO_SHIPMENT_PVT:c_cust_id l_cust_id ' || l_cust_id, 1, 'N');
784: END IF;
785:
786: OPEN C_site_use(l_cust_id , l_ship_site_id);
787: FETCH C_site_use into l_ship_site_use_id;
785:
786: OPEN C_site_use(l_cust_id , l_ship_site_id);
787: FETCH C_site_use into l_ship_site_use_id;
788:
789: IF aso_debug_pub.g_debug_flag = 'Y' THEN
790: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use4 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
791: END IF;
792:
793: CLOSE C_site_use;
786: OPEN C_site_use(l_cust_id , l_ship_site_id);
787: FETCH C_site_use into l_ship_site_use_id;
788:
789: IF aso_debug_pub.g_debug_flag = 'Y' THEN
790: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use4 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
791: END IF;
792:
793: CLOSE C_site_use;
794: return l_ship_site_use_id;
799:
800: OPEN C_site_use(l_cust_id , l_ship_site_id);
801: FETCH C_site_use into l_ship_site_use_id;
802:
803: IF aso_debug_pub.g_debug_flag = 'Y' THEN
804: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use5 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
805: END IF;
806:
807: CLOSE C_site_use;
800: OPEN C_site_use(l_cust_id , l_ship_site_id);
801: FETCH C_site_use into l_ship_site_use_id;
802:
803: IF aso_debug_pub.g_debug_flag = 'Y' THEN
804: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use5 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
805: END IF;
806:
807: CLOSE C_site_use;
808: return l_ship_site_use_id;
814:
815: OPEN C_site_use(l_cust_id , l_ship_site_id);
816: FETCH C_site_use into l_ship_site_use_id;
817:
818: IF aso_debug_pub.g_debug_flag = 'Y' THEN
819: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use6 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
820: END IF;
821: CLOSE C_site_use;
822:
815: OPEN C_site_use(l_cust_id , l_ship_site_id);
816: FETCH C_site_use into l_ship_site_use_id;
817:
818: IF aso_debug_pub.g_debug_flag = 'Y' THEN
819: aso_debug_pub.add('ASO_SHIPMENT_PVT:C_site_use6 l_ship_site_use_id ' || l_ship_site_use_id, 1, 'N');
820: END IF;
821: CLOSE C_site_use;
822:
823: return l_ship_site_use_id;
888:
889: open c_item_type_code;
890: fetch c_item_type_code into l_item_type_code;
891:
892: IF aso_debug_pub.g_debug_flag = 'Y' THEN
893: aso_debug_pub.add('Get_Ship_To_party_site_Id: c_item_type_code: l_item_type_code: '||l_item_type_code);
894: END IF;
895:
896: IF c_item_type_code%FOUND and l_item_type_code = 'CFG' THEN
889: open c_item_type_code;
890: fetch c_item_type_code into l_item_type_code;
891:
892: IF aso_debug_pub.g_debug_flag = 'Y' THEN
893: aso_debug_pub.add('Get_Ship_To_party_site_Id: c_item_type_code: l_item_type_code: '||l_item_type_code);
894: END IF;
895:
896: IF c_item_type_code%FOUND and l_item_type_code = 'CFG' THEN
897:
899:
900: open c_root_model_line_id;
901: fetch c_root_model_line_id into l_model_quote_line_id;
902:
903: IF aso_debug_pub.g_debug_flag = 'Y' THEN
904: aso_debug_pub.add('Get_Ship_To_party_site_Id: c_root_model_line_id: l_model_quote_line_id: '||l_model_quote_line_id);
905: END IF;
906:
907: IF c_root_model_line_id%FOUND and l_model_quote_line_id is not null THEN
900: open c_root_model_line_id;
901: fetch c_root_model_line_id into l_model_quote_line_id;
902:
903: IF aso_debug_pub.g_debug_flag = 'Y' THEN
904: aso_debug_pub.add('Get_Ship_To_party_site_Id: c_root_model_line_id: l_model_quote_line_id: '||l_model_quote_line_id);
905: END IF;
906:
907: IF c_root_model_line_id%FOUND and l_model_quote_line_id is not null THEN
908:
910:
911: open c_shipment_id(l_model_quote_line_id);
912: fetch c_shipment_id into l_model_shipment_id;
913:
914: IF aso_debug_pub.g_debug_flag = 'Y' THEN
915: aso_debug_pub.add('Get_Ship_To_party_site_Id: c_shipment_id: l_model_shipment_id: '||l_model_shipment_id);
916: END IF;
917:
918: IF c_shipment_id%FOUND and l_model_shipment_id is not null THEN
911: open c_shipment_id(l_model_quote_line_id);
912: fetch c_shipment_id into l_model_shipment_id;
913:
914: IF aso_debug_pub.g_debug_flag = 'Y' THEN
915: aso_debug_pub.add('Get_Ship_To_party_site_Id: c_shipment_id: l_model_shipment_id: '||l_model_shipment_id);
916: END IF;
917:
918: IF c_shipment_id%FOUND and l_model_shipment_id is not null THEN
919:
920: close c_shipment_id;
921:
922: l_ship_site_id := Get_Ship_To_party_site_Id(p_qte_header_id, l_model_quote_line_id, l_model_shipment_id);
923:
924: IF aso_debug_pub.g_debug_flag = 'Y' THEN
925: aso_debug_pub.add('Get_Ship_To_party_site_Id: l_ship_site_id: '||l_ship_site_id);
926: END IF;
927:
928: return l_ship_site_id;
921:
922: l_ship_site_id := Get_Ship_To_party_site_Id(p_qte_header_id, l_model_quote_line_id, l_model_shipment_id);
923:
924: IF aso_debug_pub.g_debug_flag = 'Y' THEN
925: aso_debug_pub.add('Get_Ship_To_party_site_Id: l_ship_site_id: '||l_ship_site_id);
926: END IF;
927:
928: return l_ship_site_id;
929:
1147: l_ship_from_org_id NUMBER;
1148:
1149:
1150: Begin
1151: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1152: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: p_qte_header_id :'||p_qte_header_id, 1, 'N');
1153: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: p_qte_line_id :'||p_qte_line_id, 1, 'N');
1154: END IF;
1155:
1148:
1149:
1150: Begin
1151: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1152: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: p_qte_header_id :'||p_qte_header_id, 1, 'N');
1153: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: p_qte_line_id :'||p_qte_line_id, 1, 'N');
1154: END IF;
1155:
1156: -- Look for line-shipment level ship_from_org_id
1149:
1150: Begin
1151: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1152: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: p_qte_header_id :'||p_qte_header_id, 1, 'N');
1153: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: p_qte_line_id :'||p_qte_line_id, 1, 'N');
1154: END IF;
1155:
1156: -- Look for line-shipment level ship_from_org_id
1157:
1157:
1158: open c_line_shipment;
1159: fetch c_line_shipment into l_ship_from_org_id;
1160:
1161: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1162: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: c_line_shipment: l_ship_from_org_id'||l_ship_from_org_id, 1, 'N');
1163: END IF;
1164:
1165: -- Line-shipment level ship_from_org_id doesn't exist then look for header-shipment level ship_from_org_id
1158: open c_line_shipment;
1159: fetch c_line_shipment into l_ship_from_org_id;
1160:
1161: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1162: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: c_line_shipment: l_ship_from_org_id'||l_ship_from_org_id, 1, 'N');
1163: END IF;
1164:
1165: -- Line-shipment level ship_from_org_id doesn't exist then look for header-shipment level ship_from_org_id
1166:
1167: IF c_line_shipment%NOTFOUND OR l_ship_from_org_id IS NULL OR l_ship_from_org_id = FND_API.G_MISS_NUM THEN
1168: open c_header_shipment;
1169: fetch c_header_shipment into l_ship_from_org_id;
1170:
1171: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1172: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: c_header_shipment: l_ship_from_org_id'||l_ship_from_org_id, 1, 'N');
1173: END IF;
1174:
1175: close c_header_shipment;
1168: open c_header_shipment;
1169: fetch c_header_shipment into l_ship_from_org_id;
1170:
1171: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1172: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_from_org_id: c_header_shipment: l_ship_from_org_id'||l_ship_from_org_id, 1, 'N');
1173: END IF;
1174:
1175: close c_header_shipment;
1176: END IF;
1198: l_ship_method_code varchar2(30) := null;
1199:
1200: Begin
1201:
1202: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1203: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_method_code: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1204: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_method_code: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1205: END IF;
1206:
1199:
1200: Begin
1201:
1202: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1203: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_method_code: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1204: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_method_code: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1205: END IF;
1206:
1207: -- Look for line-shipment level ship_method_code
1200: Begin
1201:
1202: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1203: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_method_code: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1204: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_method_code: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1205: END IF;
1206:
1207: -- Look for line-shipment level ship_method_code
1208:
1210:
1211: open c_line_shipment;
1212: fetch c_line_shipment into l_ship_method_code;
1213:
1214: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1215: aso_debug_pub.add('Get_ship_method_code: c_line_shipment: l_ship_method_code: '||l_ship_method_code, 1, 'N');
1216: END IF;
1217:
1218: -- Line-shipment level ship_method_code doesn't exist then look for header-shipment level ship_method_code
1211: open c_line_shipment;
1212: fetch c_line_shipment into l_ship_method_code;
1213:
1214: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1215: aso_debug_pub.add('Get_ship_method_code: c_line_shipment: l_ship_method_code: '||l_ship_method_code, 1, 'N');
1216: END IF;
1217:
1218: -- Line-shipment level ship_method_code doesn't exist then look for header-shipment level ship_method_code
1219:
1221:
1222: open c_header_shipment;
1223: fetch c_header_shipment into l_ship_method_code;
1224:
1225: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1226: aso_debug_pub.add('Get_ship_method_code: c_header_shipment: l_ship_method_code: '||l_ship_method_code, 1, 'N');
1227: END IF;
1228:
1229: close c_header_shipment;
1222: open c_header_shipment;
1223: fetch c_header_shipment into l_ship_method_code;
1224:
1225: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1226: aso_debug_pub.add('Get_ship_method_code: c_header_shipment: l_ship_method_code: '||l_ship_method_code, 1, 'N');
1227: END IF;
1228:
1229: close c_header_shipment;
1230: END IF;
1235:
1236: open c_header_shipment;
1237: fetch c_header_shipment into l_ship_method_code;
1238:
1239: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1240: aso_debug_pub.add('Get_ship_from_org_id: c_header_shipment: l_ship_method_code: '||l_ship_method_code, 1, 'N');
1241: END IF;
1242:
1243: close c_header_shipment;
1236: open c_header_shipment;
1237: fetch c_header_shipment into l_ship_method_code;
1238:
1239: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1240: aso_debug_pub.add('Get_ship_from_org_id: c_header_shipment: l_ship_method_code: '||l_ship_method_code, 1, 'N');
1241: END IF;
1242:
1243: close c_header_shipment;
1244:
1268: l_demand_class_code varchar2(30) := null;
1269:
1270: Begin
1271:
1272: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1273: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_demand_class_code: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1274: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_demand_class_code: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1275: END IF;
1276:
1269:
1270: Begin
1271:
1272: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1273: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_demand_class_code: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1274: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_demand_class_code: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1275: END IF;
1276:
1277: -- Look for line-shipment level demand_class_code
1270: Begin
1271:
1272: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1273: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_demand_class_code: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1274: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_demand_class_code: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1275: END IF;
1276:
1277: -- Look for line-shipment level demand_class_code
1278:
1280:
1281: open c_line_shipment;
1282: fetch c_line_shipment into l_demand_class_code;
1283:
1284: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1285: aso_debug_pub.add('Get_demand_class_code: c_line_shipment: l_demand_class_code: '||l_demand_class_code, 1, 'N');
1286: END IF;
1287:
1288: -- Line-shipment level demand_class_code doesn't exist then look for header-shipment level demand_class_code
1281: open c_line_shipment;
1282: fetch c_line_shipment into l_demand_class_code;
1283:
1284: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1285: aso_debug_pub.add('Get_demand_class_code: c_line_shipment: l_demand_class_code: '||l_demand_class_code, 1, 'N');
1286: END IF;
1287:
1288: -- Line-shipment level demand_class_code doesn't exist then look for header-shipment level demand_class_code
1289:
1291:
1292: open c_header_shipment;
1293: fetch c_header_shipment into l_demand_class_code;
1294:
1295: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1296: aso_debug_pub.add('Get_demand_class_code: c_header_shipment: l_demand_class_code: '||l_demand_class_code, 1, 'N');
1297: END IF;
1298:
1299: close c_header_shipment;
1292: open c_header_shipment;
1293: fetch c_header_shipment into l_demand_class_code;
1294:
1295: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1296: aso_debug_pub.add('Get_demand_class_code: c_header_shipment: l_demand_class_code: '||l_demand_class_code, 1, 'N');
1297: END IF;
1298:
1299: close c_header_shipment;
1300: END IF;
1305:
1306: open c_header_shipment;
1307: fetch c_header_shipment into l_demand_class_code;
1308:
1309: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1310: aso_debug_pub.add('Get_demand_class_code: c_header_shipment: l_demand_class_code: '||l_demand_class_code, 1, 'N');
1311: END IF;
1312:
1313: close c_header_shipment;
1306: open c_header_shipment;
1307: fetch c_header_shipment into l_demand_class_code;
1308:
1309: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1310: aso_debug_pub.add('Get_demand_class_code: c_header_shipment: l_demand_class_code: '||l_demand_class_code, 1, 'N');
1311: END IF;
1312:
1313: close c_header_shipment;
1314:
1338: l_ship_to_party_site_id number := null;
1339:
1340: Begin
1341:
1342: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1343: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_party_site_id: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1344: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_party_site_id: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1345: END IF;
1346:
1339:
1340: Begin
1341:
1342: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1343: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_party_site_id: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1344: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_party_site_id: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1345: END IF;
1346:
1347: -- Look for line-shipment level ship_to_party_site_id
1340: Begin
1341:
1342: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1343: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_party_site_id: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1344: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_party_site_id: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1345: END IF;
1346:
1347: -- Look for line-shipment level ship_to_party_site_id
1348:
1350:
1351: open c_line_shipment;
1352: fetch c_line_shipment into l_ship_to_party_site_id;
1353:
1354: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1355: aso_debug_pub.add('Get_ship_to_party_site_id: c_line_shipment: l_ship_to_party_site_id: '||l_ship_to_party_site_id, 1, 'N');
1356: END IF;
1357:
1358: -- Line-shipment level ship_to_party_site_id doesn't exist then look for header-shipment level ship_to_party_site_id
1351: open c_line_shipment;
1352: fetch c_line_shipment into l_ship_to_party_site_id;
1353:
1354: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1355: aso_debug_pub.add('Get_ship_to_party_site_id: c_line_shipment: l_ship_to_party_site_id: '||l_ship_to_party_site_id, 1, 'N');
1356: END IF;
1357:
1358: -- Line-shipment level ship_to_party_site_id doesn't exist then look for header-shipment level ship_to_party_site_id
1359:
1361:
1362: open c_header_shipment;
1363: fetch c_header_shipment into l_ship_to_party_site_id;
1364:
1365: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1366: aso_debug_pub.add('Get_ship_to_party_site_id: c_header_shipment: l_ship_to_party_site_id: '||l_ship_to_party_site_id, 1, 'N');
1367: END IF;
1368:
1369: close c_header_shipment;
1362: open c_header_shipment;
1363: fetch c_header_shipment into l_ship_to_party_site_id;
1364:
1365: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1366: aso_debug_pub.add('Get_ship_to_party_site_id: c_header_shipment: l_ship_to_party_site_id: '||l_ship_to_party_site_id, 1, 'N');
1367: END IF;
1368:
1369: close c_header_shipment;
1370: END IF;
1375:
1376: open c_header_shipment;
1377: fetch c_header_shipment into l_ship_to_party_site_id;
1378:
1379: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1380: aso_debug_pub.add('Get_ship_to_party_site_id: c_header_shipment: l_ship_to_party_site_id: '||l_ship_to_party_site_id, 1, 'N');
1381: END IF;
1382:
1383: close c_header_shipment;
1376: open c_header_shipment;
1377: fetch c_header_shipment into l_ship_to_party_site_id;
1378:
1379: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1380: aso_debug_pub.add('Get_ship_to_party_site_id: c_header_shipment: l_ship_to_party_site_id: '||l_ship_to_party_site_id, 1, 'N');
1381: END IF;
1382:
1383: close c_header_shipment;
1384:
1408: l_ship_to_cust_account_id number := null;
1409:
1410: Begin
1411:
1412: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1413: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_cust_account_id: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1414: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_cust_account_id: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1415: END IF;
1416:
1409:
1410: Begin
1411:
1412: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1413: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_cust_account_id: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1414: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_cust_account_id: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1415: END IF;
1416:
1417: -- Look for line-shipment level ship_to_cust_account_id
1410: Begin
1411:
1412: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1413: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_cust_account_id: p_qte_header_id : '||p_qte_header_id, 1, 'Y');
1414: aso_debug_pub.add('ASO_SHIPMENT_PVT.Get_ship_to_cust_account_id: p_qte_line_id : '||p_qte_line_id, 1, 'Y');
1415: END IF;
1416:
1417: -- Look for line-shipment level ship_to_cust_account_id
1418:
1420:
1421: open c_line_shipment;
1422: fetch c_line_shipment into l_ship_to_cust_account_id;
1423:
1424: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1425: aso_debug_pub.add('Get_ship_to_party_site_id: c_line_shipment: l_ship_to_cust_account_id: '||l_ship_to_cust_account_id, 1, 'N');
1426: END IF;
1427:
1428: -- Line-shipment level ship_to_cust_account_id doesn't exist then look for header-shipment level ship_to_cust_account_id
1421: open c_line_shipment;
1422: fetch c_line_shipment into l_ship_to_cust_account_id;
1423:
1424: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1425: aso_debug_pub.add('Get_ship_to_party_site_id: c_line_shipment: l_ship_to_cust_account_id: '||l_ship_to_cust_account_id, 1, 'N');
1426: END IF;
1427:
1428: -- Line-shipment level ship_to_cust_account_id doesn't exist then look for header-shipment level ship_to_cust_account_id
1429:
1431:
1432: open c_header_shipment;
1433: fetch c_header_shipment into l_ship_to_cust_account_id;
1434:
1435: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1436: aso_debug_pub.add('Get_ship_to_cust_account_id: c_header_shipment: l_ship_to_cust_account_id: '||l_ship_to_cust_account_id, 1, 'N');
1437: END IF;
1438:
1439: close c_header_shipment;
1432: open c_header_shipment;
1433: fetch c_header_shipment into l_ship_to_cust_account_id;
1434:
1435: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1436: aso_debug_pub.add('Get_ship_to_cust_account_id: c_header_shipment: l_ship_to_cust_account_id: '||l_ship_to_cust_account_id, 1, 'N');
1437: END IF;
1438:
1439: close c_header_shipment;
1440: END IF;
1445:
1446: open c_header_shipment;
1447: fetch c_header_shipment into l_ship_to_cust_account_id;
1448:
1449: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1450: aso_debug_pub.add('Get_ship_to_cust_account_id: c_header_shipment: l_ship_to_cust_account_id: '||l_ship_to_cust_account_id, 1, 'N');
1451: END IF;
1452:
1453: close c_header_shipment;
1446: open c_header_shipment;
1447: fetch c_header_shipment into l_ship_to_cust_account_id;
1448:
1449: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1450: aso_debug_pub.add('Get_ship_to_cust_account_id: c_header_shipment: l_ship_to_cust_account_id: '||l_ship_to_cust_account_id, 1, 'N');
1451: END IF;
1452:
1453: close c_header_shipment;
1454: