80: l_return_value BOOLEAN;
81:
82: BEGIN
83:
84: IF (PO_LOG.d_proc) THEN
85: PO_LOG.proc_begin(d_module);
86: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
87: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
81:
82: BEGIN
83:
84: IF (PO_LOG.d_proc) THEN
85: PO_LOG.proc_begin(d_module);
86: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
87: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
82: BEGIN
83:
84: IF (PO_LOG.d_proc) THEN
85: PO_LOG.proc_begin(d_module);
86: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
87: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
83:
84: IF (PO_LOG.d_proc) THEN
85: PO_LOG.proc_begin(d_module);
86: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
87: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
91: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
84: IF (PO_LOG.d_proc) THEN
85: PO_LOG.proc_begin(d_module);
86: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
87: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
91: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
92: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
85: PO_LOG.proc_begin(d_module);
86: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
87: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
91: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
92: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
93: PO_LOG.proc_begin(d_module, 'p_reservation_action', p_reservation_action);
86: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
87: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
91: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
92: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
93: PO_LOG.proc_begin(d_module, 'p_reservation_action', p_reservation_action);
94: PO_LOG.proc_begin(d_module, 'p_ordered_uom', p_ordered_uom);
87: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
91: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
92: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
93: PO_LOG.proc_begin(d_module, 'p_reservation_action', p_reservation_action);
94: PO_LOG.proc_begin(d_module, 'p_ordered_uom', p_ordered_uom);
95: END IF;
88: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
91: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
92: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
93: PO_LOG.proc_begin(d_module, 'p_reservation_action', p_reservation_action);
94: PO_LOG.proc_begin(d_module, 'p_ordered_uom', p_ordered_uom);
95: END IF;
96:
89: PO_LOG.proc_begin(d_module, 'p_action', p_action);
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
91: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
92: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
93: PO_LOG.proc_begin(d_module, 'p_reservation_action', p_reservation_action);
94: PO_LOG.proc_begin(d_module, 'p_ordered_uom', p_ordered_uom);
95: END IF;
96:
97: d_progress := 10;
90: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
91: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
92: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
93: PO_LOG.proc_begin(d_module, 'p_reservation_action', p_reservation_action);
94: PO_LOG.proc_begin(d_module, 'p_ordered_uom', p_ordered_uom);
95: END IF;
96:
97: d_progress := 10;
98:
322: END IF; -- Switchboard
323:
324: IF (NOT l_return_value) THEN
325:
326: IF (PO_LOG.d_stmt) THEN
327: PO_LOG.stmt(d_module, d_progress, 'Supply action failed.');
328: END IF;
329:
330: RAISE PO_CORE_S.g_early_return_exc;
323:
324: IF (NOT l_return_value) THEN
325:
326: IF (PO_LOG.d_stmt) THEN
327: PO_LOG.stmt(d_module, d_progress, 'Supply action failed.');
328: END IF;
329:
330: RAISE PO_CORE_S.g_early_return_exc;
331:
337: l_return_value := maintain_mtl_supply;
338:
339: IF (NOT l_return_value) THEN
340:
341: IF (PO_LOG.d_stmt) THEN
342: PO_LOG.stmt(d_module, d_progress, 'maintain_mtl_supply not successful.');
343: END IF;
344:
345: RAISE PO_CORE_S.g_early_return_exc;
338:
339: IF (NOT l_return_value) THEN
340:
341: IF (PO_LOG.d_stmt) THEN
342: PO_LOG.stmt(d_module, d_progress, 'maintain_mtl_supply not successful.');
343: END IF;
344:
345: RAISE PO_CORE_S.g_early_return_exc;
346:
357: IF (UPPER(p_reservation_action) = 'UPDATE_SO_QUANTITY') THEN
358:
359: d_progress := 710;
360:
361: IF (PO_LOG.d_stmt) THEN
362: PO_LOG.stmt(d_module, d_progress, 'p_reservation_action', p_reservation_action);
363: END IF;
364:
365: PO_RESERVATION_MAINTAIN_SV.MAINTAIN_RESERVATION(
358:
359: d_progress := 710;
360:
361: IF (PO_LOG.d_stmt) THEN
362: PO_LOG.stmt(d_module, d_progress, 'p_reservation_action', p_reservation_action);
363: END IF;
364:
365: PO_RESERVATION_MAINTAIN_SV.MAINTAIN_RESERVATION(
366: p_header_id => p_docid
376: --Bug5060175 START
377: ELSIF p_action = 'Explode_Req' THEN
378:
379: d_progress := 720;
380: IF (PO_LOG.d_stmt) THEN
381: PO_LOG.stmt(d_module, d_progress, 'Calling PO Maintain Reservations for Req split');
382: END IF;
383:
384: select requisition_header_id
377: ELSIF p_action = 'Explode_Req' THEN
378:
379: d_progress := 720;
380: IF (PO_LOG.d_stmt) THEN
381: PO_LOG.stmt(d_module, d_progress, 'Calling PO Maintain Reservations for Req split');
382: END IF;
383:
384: select requisition_header_id
385: into l_doc_id
418: -- it would better to filter out these actions at this point, to facilate better
419: -- maintenance
420:
421: d_progress := 730;
422: IF (PO_LOG.d_stmt) THEN
423: PO_LOG.stmt(d_module, d_progress, 'Calling PO Maintain Reservations');
424: END IF;
425:
426: PO_RESERVATION_MAINTAIN_SV.MAINTAIN_RESERVATION(
419: -- maintenance
420:
421: d_progress := 730;
422: IF (PO_LOG.d_stmt) THEN
423: PO_LOG.stmt(d_module, d_progress, 'Calling PO Maintain Reservations');
424: END IF;
425:
426: PO_RESERVATION_MAINTAIN_SV.MAINTAIN_RESERVATION(
427: p_header_id => p_docid
436:
437: d_progress := 800;
438:
439: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
440: IF (PO_LOG.d_stmt) THEN
441: PO_LOG.stmt(d_module, d_progress, 'Reservation api failed.');
442: END IF;
443:
444: l_return_value := FALSE;
437: d_progress := 800;
438:
439: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
440: IF (PO_LOG.d_stmt) THEN
441: PO_LOG.stmt(d_module, d_progress, 'Reservation api failed.');
442: END IF;
443:
444: l_return_value := FALSE;
445: RAISE PO_CORE_S.g_early_return_exc;
455: WHEN PO_CORE_S.g_early_return_exc THEN
456: NULL;
457: END;
458:
459: IF (PO_LOG.d_proc) THEN
460: PO_LOG.proc_return(d_module, l_return_value);
461: PO_LOG.proc_end(d_module);
462: END IF;
463:
456: NULL;
457: END;
458:
459: IF (PO_LOG.d_proc) THEN
460: PO_LOG.proc_return(d_module, l_return_value);
461: PO_LOG.proc_end(d_module);
462: END IF;
463:
464: return(l_return_value);
457: END;
458:
459: IF (PO_LOG.d_proc) THEN
460: PO_LOG.proc_return(d_module, l_return_value);
461: PO_LOG.proc_end(d_module);
462: END IF;
463:
464: return(l_return_value);
465:
466:
467: EXCEPTION
468:
469: WHEN others THEN
470: IF (PO_LOG.d_exc) THEN
471: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
472: END IF;
473:
474: return(FALSE);
467: EXCEPTION
468:
469: WHEN others THEN
470: IF (PO_LOG.d_exc) THEN
471: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
472: END IF;
473:
474: return(FALSE);
475:
504: l_return_value BOOLEAN := FALSE;
505:
506: BEGIN
507:
508: IF (PO_LOG.d_proc) THEN
509: PO_LOG.proc_begin(d_module);
510: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
511: END IF;
512:
505:
506: BEGIN
507:
508: IF (PO_LOG.d_proc) THEN
509: PO_LOG.proc_begin(d_module);
510: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
511: END IF;
512:
513: d_progress := 10;
506: BEGIN
507:
508: IF (PO_LOG.d_proc) THEN
509: PO_LOG.proc_begin(d_module);
510: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
511: END IF;
512:
513: d_progress := 10;
514:
532: );
533:
534: IF (NOT l_return_value) THEN
535:
536: IF (PO_LOG.d_stmt) THEN
537: PO_LOG.stmt(d_module, d_progress, 'create_po_supply not successful');
538: END IF;
539:
540: RAISE PO_CORE_S.g_early_return_exc;
533:
534: IF (NOT l_return_value) THEN
535:
536: IF (PO_LOG.d_stmt) THEN
537: PO_LOG.stmt(d_module, d_progress, 'create_po_supply not successful');
538: END IF;
539:
540: RAISE PO_CORE_S.g_early_return_exc;
541: END IF;
560: );
561:
562: d_progress := 50;
563:
564: IF (PO_LOG.d_stmt) THEN
565: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows.');
566: END IF;
567:
568: END IF; -- if (l_auth_status = 'APPROVED')...
561:
562: d_progress := 50;
563:
564: IF (PO_LOG.d_stmt) THEN
565: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows.');
566: END IF;
567:
568: END IF; -- if (l_auth_status = 'APPROVED')...
569:
573: WHEN PO_CORE_S.g_early_return_exc THEN
574: NULL;
575: END;
576:
577: IF (PO_LOG.d_proc) THEN
578: PO_LOG.proc_return(d_module, l_return_value);
579: PO_LOG.proc_end(d_module);
580: END IF;
581:
574: NULL;
575: END;
576:
577: IF (PO_LOG.d_proc) THEN
578: PO_LOG.proc_return(d_module, l_return_value);
579: PO_LOG.proc_end(d_module);
580: END IF;
581:
582: return (l_return_value);
575: END;
576:
577: IF (PO_LOG.d_proc) THEN
578: PO_LOG.proc_return(d_module, l_return_value);
579: PO_LOG.proc_end(d_module);
580: END IF;
581:
582: return (l_return_value);
583:
587: IF auth_status%ISOPEN THEN
588: close auth_status;
589: END IF;
590:
591: IF (PO_LOG.d_exc) THEN
592: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
593: END IF;
594:
595: return(FALSE);
588: close auth_status;
589: END IF;
590:
591: IF (PO_LOG.d_exc) THEN
592: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
593: END IF;
594:
595: return(FALSE);
596:
624: l_return_value BOOLEAN := FALSE;
625:
626: BEGIN
627:
628: IF (PO_LOG.d_proc) THEN
629: PO_LOG.proc_begin(d_module);
630: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
631: END IF;
632:
625:
626: BEGIN
627:
628: IF (PO_LOG.d_proc) THEN
629: PO_LOG.proc_begin(d_module);
630: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
631: END IF;
632:
633: d_progress := 10;
626: BEGIN
627:
628: IF (PO_LOG.d_proc) THEN
629: PO_LOG.proc_begin(d_module);
630: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
631: END IF;
632:
633: d_progress := 10;
634:
652: );
653:
654: IF (NOT l_return_value) THEN
655:
656: IF (PO_LOG.d_stmt) THEN
657: PO_LOG.stmt(d_module, d_progress, 'create_po_supply not successful');
658: END IF;
659:
660: RAISE PO_CORE_S.g_early_return_exc;
653:
654: IF (NOT l_return_value) THEN
655:
656: IF (PO_LOG.d_stmt) THEN
657: PO_LOG.stmt(d_module, d_progress, 'create_po_supply not successful');
658: END IF;
659:
660: RAISE PO_CORE_S.g_early_return_exc;
661: END IF;
680: );
681:
682: d_progress := 50;
683:
684: IF (PO_LOG.d_stmt) THEN
685: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows.');
686: END IF;
687:
688: END IF; -- if (l_auth_status = 'APPROVED')...
681:
682: d_progress := 50;
683:
684: IF (PO_LOG.d_stmt) THEN
685: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows.');
686: END IF;
687:
688: END IF; -- if (l_auth_status = 'APPROVED')...
689:
693: WHEN PO_CORE_S.g_early_return_exc THEN
694: NULL;
695: END;
696:
697: IF (PO_LOG.d_proc) THEN
698: PO_LOG.proc_return(d_module, l_return_value);
699: PO_LOG.proc_end(d_module);
700: END IF;
701:
694: NULL;
695: END;
696:
697: IF (PO_LOG.d_proc) THEN
698: PO_LOG.proc_return(d_module, l_return_value);
699: PO_LOG.proc_end(d_module);
700: END IF;
701:
702: return (l_return_value);
695: END;
696:
697: IF (PO_LOG.d_proc) THEN
698: PO_LOG.proc_return(d_module, l_return_value);
699: PO_LOG.proc_end(d_module);
700: END IF;
701:
702: return (l_return_value);
703:
707: IF auth_status%ISOPEN THEN
708: close auth_status;
709: END IF;
710:
711: IF (PO_LOG.d_exc) THEN
712: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
713: END IF;
714:
715: return(FALSE);
708: close auth_status;
709: END IF;
710:
711: IF (PO_LOG.d_exc) THEN
712: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
713: END IF;
714:
715: return(FALSE);
716:
744: l_return_value BOOLEAN := FALSE;
745:
746: BEGIN
747:
748: IF (PO_LOG.d_proc) THEN
749: PO_LOG.proc_begin(d_module);
750: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
751: END IF;
752:
745:
746: BEGIN
747:
748: IF (PO_LOG.d_proc) THEN
749: PO_LOG.proc_begin(d_module);
750: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
751: END IF;
752:
753: d_progress := 10;
746: BEGIN
747:
748: IF (PO_LOG.d_proc) THEN
749: PO_LOG.proc_begin(d_module);
750: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
751: END IF;
752:
753: d_progress := 10;
754:
773: );
774:
775: IF (NOT l_return_value) THEN
776:
777: IF (PO_LOG.d_stmt) THEN
778: PO_LOG.stmt(d_module, d_progress, 'create_po_supply not successful');
779: END IF;
780:
781: RAISE PO_CORE_S.g_early_return_exc;
774:
775: IF (NOT l_return_value) THEN
776:
777: IF (PO_LOG.d_stmt) THEN
778: PO_LOG.stmt(d_module, d_progress, 'create_po_supply not successful');
779: END IF;
780:
781: RAISE PO_CORE_S.g_early_return_exc;
782: END IF;
798: );
799:
800: IF (NOT l_return_value) THEN
801:
802: IF (PO_LOG.d_stmt) THEN
803: PO_LOG.stmt(d_module, d_progress, 'create_po_supply not successful');
804: END IF;
805:
806: RAISE PO_CORE_S.g_early_return_exc;
799:
800: IF (NOT l_return_value) THEN
801:
802: IF (PO_LOG.d_stmt) THEN
803: PO_LOG.stmt(d_module, d_progress, 'create_po_supply not successful');
804: END IF;
805:
806: RAISE PO_CORE_S.g_early_return_exc;
807: END IF;
816: WHEN PO_CORE_S.g_early_return_exc THEN
817: NULL;
818: END;
819:
820: IF (PO_LOG.d_proc) THEN
821: PO_LOG.proc_return(d_module, l_return_value);
822: PO_LOG.proc_end(d_module);
823: END IF;
824:
817: NULL;
818: END;
819:
820: IF (PO_LOG.d_proc) THEN
821: PO_LOG.proc_return(d_module, l_return_value);
822: PO_LOG.proc_end(d_module);
823: END IF;
824:
825: return (l_return_value);
818: END;
819:
820: IF (PO_LOG.d_proc) THEN
821: PO_LOG.proc_return(d_module, l_return_value);
822: PO_LOG.proc_end(d_module);
823: END IF;
824:
825: return (l_return_value);
826:
830: IF auth_status%ISOPEN THEN
831: close auth_status;
832: END IF;
833:
834: IF (PO_LOG.d_exc) THEN
835: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
836: END IF;
837:
838: return(FALSE);
831: close auth_status;
832: END IF;
833:
834: IF (PO_LOG.d_exc) THEN
835: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
836: END IF;
837:
838: return(FALSE);
839:
921: l_released_qty po_distributions.quantity_ordered%TYPE;
922:
923: BEGIN
924:
925: IF (PO_LOG.d_proc) THEN
926: PO_LOG.proc_begin(d_module);
927: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
928: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
929: END IF;
922:
923: BEGIN
924:
925: IF (PO_LOG.d_proc) THEN
926: PO_LOG.proc_begin(d_module);
927: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
928: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
929: END IF;
930:
923: BEGIN
924:
925: IF (PO_LOG.d_proc) THEN
926: PO_LOG.proc_begin(d_module);
927: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
928: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
929: END IF;
930:
931: d_progress := 10;
924:
925: IF (PO_LOG.d_proc) THEN
926: PO_LOG.proc_begin(d_module);
927: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
928: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
929: END IF;
930:
931: d_progress := 10;
932:
938: );
939:
940: IF (NOT l_return_value) THEN
941:
942: IF (PO_LOG.d_stmt) THEN
943: PO_LOG.stmt(d_module, d_progress, 'delete_supply not successful');
944: END IF;
945:
946: RAISE PO_CORE_S.g_early_return_exc;
939:
940: IF (NOT l_return_value) THEN
941:
942: IF (PO_LOG.d_stmt) THEN
943: PO_LOG.stmt(d_module, d_progress, 'delete_supply not successful');
944: END IF;
945:
946: RAISE PO_CORE_S.g_early_return_exc;
947:
1001:
1002: --
1003: sql_dist := sql_dist || 'ORDER BY pd.line_location_id';
1004:
1005: IF (PO_LOG.d_stmt) THEN
1006: PO_LOG.stmt(d_module, d_progress, 'sql_dist', sql_dist);
1007: END IF;
1008:
1009: d_progress := 70;
1002: --
1003: sql_dist := sql_dist || 'ORDER BY pd.line_location_id';
1004:
1005: IF (PO_LOG.d_stmt) THEN
1006: PO_LOG.stmt(d_module, d_progress, 'sql_dist', sql_dist);
1007: END IF;
1008:
1009: d_progress := 70;
1010:
1032: dbms_sql.column_value(cur_dist, 3, l_uom);
1033: dbms_sql.column_value(cur_dist, 4, l_line_loc_id);
1034:
1035:
1036: IF (PO_LOG.d_stmt) THEN
1037: PO_LOG.stmt(d_module, d_progress, 'l_distid', l_distid);
1038: PO_LOG.stmt(d_module, d_progress, 'l_qty', l_qty);
1039: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1040: PO_LOG.stmt(d_module, d_progress, 'l_line_loc_id', l_line_loc_id);
1033: dbms_sql.column_value(cur_dist, 4, l_line_loc_id);
1034:
1035:
1036: IF (PO_LOG.d_stmt) THEN
1037: PO_LOG.stmt(d_module, d_progress, 'l_distid', l_distid);
1038: PO_LOG.stmt(d_module, d_progress, 'l_qty', l_qty);
1039: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1040: PO_LOG.stmt(d_module, d_progress, 'l_line_loc_id', l_line_loc_id);
1041: END IF;
1034:
1035:
1036: IF (PO_LOG.d_stmt) THEN
1037: PO_LOG.stmt(d_module, d_progress, 'l_distid', l_distid);
1038: PO_LOG.stmt(d_module, d_progress, 'l_qty', l_qty);
1039: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1040: PO_LOG.stmt(d_module, d_progress, 'l_line_loc_id', l_line_loc_id);
1041: END IF;
1042:
1035:
1036: IF (PO_LOG.d_stmt) THEN
1037: PO_LOG.stmt(d_module, d_progress, 'l_distid', l_distid);
1038: PO_LOG.stmt(d_module, d_progress, 'l_qty', l_qty);
1039: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1040: PO_LOG.stmt(d_module, d_progress, 'l_line_loc_id', l_line_loc_id);
1041: END IF;
1042:
1043: --
1036: IF (PO_LOG.d_stmt) THEN
1037: PO_LOG.stmt(d_module, d_progress, 'l_distid', l_distid);
1038: PO_LOG.stmt(d_module, d_progress, 'l_qty', l_qty);
1039: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1040: PO_LOG.stmt(d_module, d_progress, 'l_line_loc_id', l_line_loc_id);
1041: END IF;
1042:
1043: --
1044: -- For PO distribution, get the sum of quantity already
1064: l_released_qty := 0;
1065:
1066: END IF; -- p_entity IN ...
1067:
1068: IF (PO_LOG.d_stmt) THEN
1069: PO_LOG.stmt(d_module, d_progress, 'l_released_qty', l_released_qty);
1070: END IF;
1071:
1072: --
1065:
1066: END IF; -- p_entity IN ...
1067:
1068: IF (PO_LOG.d_stmt) THEN
1069: PO_LOG.stmt(d_module, d_progress, 'l_released_qty', l_released_qty);
1070: END IF;
1071:
1072: --
1073:
1092:
1093: FETCH supply_lloc INTO l_supply_qty, l_supply_uom, l_supply_itemid;
1094: EXIT WHEN supply_lloc%NOTFOUND;
1095:
1096: IF (PO_LOG.d_stmt) THEN
1097: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty', l_supply_qty);
1098: PO_LOG.stmt(d_module, d_progress, 'l_supply_uom', l_supply_uom);
1099: PO_LOG.stmt(d_module, d_progress, 'l_supply_itemid', l_supply_itemid);
1100: END IF;
1093: FETCH supply_lloc INTO l_supply_qty, l_supply_uom, l_supply_itemid;
1094: EXIT WHEN supply_lloc%NOTFOUND;
1095:
1096: IF (PO_LOG.d_stmt) THEN
1097: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty', l_supply_qty);
1098: PO_LOG.stmt(d_module, d_progress, 'l_supply_uom', l_supply_uom);
1099: PO_LOG.stmt(d_module, d_progress, 'l_supply_itemid', l_supply_itemid);
1100: END IF;
1101:
1094: EXIT WHEN supply_lloc%NOTFOUND;
1095:
1096: IF (PO_LOG.d_stmt) THEN
1097: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty', l_supply_qty);
1098: PO_LOG.stmt(d_module, d_progress, 'l_supply_uom', l_supply_uom);
1099: PO_LOG.stmt(d_module, d_progress, 'l_supply_itemid', l_supply_itemid);
1100: END IF;
1101:
1102: d_progress := 120;
1095:
1096: IF (PO_LOG.d_stmt) THEN
1097: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty', l_supply_qty);
1098: PO_LOG.stmt(d_module, d_progress, 'l_supply_uom', l_supply_uom);
1099: PO_LOG.stmt(d_module, d_progress, 'l_supply_itemid', l_supply_itemid);
1100: END IF;
1101:
1102: d_progress := 120;
1103:
1123: END IF;
1124:
1125: d_progress := 130;
1126:
1127: IF (PO_LOG.d_stmt) THEN
1128: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty_in_pouom', l_supply_qty_in_pouom);
1129: END IF;
1130:
1131: l_prev_line_loc_id := l_line_loc_id;
1124:
1125: d_progress := 130;
1126:
1127: IF (PO_LOG.d_stmt) THEN
1128: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty_in_pouom', l_supply_qty_in_pouom);
1129: END IF;
1130:
1131: l_prev_line_loc_id := l_line_loc_id;
1132:
1146: END IF;
1147:
1148: d_progress := 140;
1149:
1150: IF (PO_LOG.d_stmt) THEN
1151: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty_in_pouom', l_supply_qty_in_pouom);
1152: PO_LOG.stmt(d_module, d_progress, 'l_out_poqty', l_out_poqty);
1153: END IF;
1154:
1147:
1148: d_progress := 140;
1149:
1150: IF (PO_LOG.d_stmt) THEN
1151: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty_in_pouom', l_supply_qty_in_pouom);
1152: PO_LOG.stmt(d_module, d_progress, 'l_out_poqty', l_out_poqty);
1153: END IF;
1154:
1155: -- Create PO Supply
1148: d_progress := 140;
1149:
1150: IF (PO_LOG.d_stmt) THEN
1151: PO_LOG.stmt(d_module, d_progress, 'l_supply_qty_in_pouom', l_supply_qty_in_pouom);
1152: PO_LOG.stmt(d_module, d_progress, 'l_out_poqty', l_out_poqty);
1153: END IF;
1154:
1155: -- Create PO Supply
1156: /*Bug 4537860:Hit the _all tables instead of the striped views.*/
1247: IF (dbms_sql.is_open(cur_dist)) THEN
1248: dbms_sql.close_cursor(cur_dist);
1249: END IF;
1250:
1251: IF (PO_LOG.d_proc) THEN
1252: PO_LOG.proc_return(d_module, l_return_value);
1253: PO_LOG.proc_end(d_module);
1254: END IF;
1255:
1248: dbms_sql.close_cursor(cur_dist);
1249: END IF;
1250:
1251: IF (PO_LOG.d_proc) THEN
1252: PO_LOG.proc_return(d_module, l_return_value);
1253: PO_LOG.proc_end(d_module);
1254: END IF;
1255:
1256: return (l_return_value);
1249: END IF;
1250:
1251: IF (PO_LOG.d_proc) THEN
1252: PO_LOG.proc_return(d_module, l_return_value);
1253: PO_LOG.proc_end(d_module);
1254: END IF;
1255:
1256: return (l_return_value);
1257:
1266: IF (dbms_sql.is_open(cur_dist)) THEN
1267: dbms_sql.close_cursor(cur_dist);
1268: END IF;
1269:
1270: IF (PO_LOG.d_exc) THEN
1271: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1272: END IF;
1273:
1274: return(FALSE);
1267: dbms_sql.close_cursor(cur_dist);
1268: END IF;
1269:
1270: IF (PO_LOG.d_exc) THEN
1271: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1272: END IF;
1273:
1274: return(FALSE);
1275:
1307: d_progress NUMBER;
1308:
1309: BEGIN
1310:
1311: IF (PO_LOG.d_proc) THEN
1312: PO_LOG.proc_begin(d_module);
1313: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1314: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1315: END IF;
1308:
1309: BEGIN
1310:
1311: IF (PO_LOG.d_proc) THEN
1312: PO_LOG.proc_begin(d_module);
1313: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1314: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1315: END IF;
1316:
1309: BEGIN
1310:
1311: IF (PO_LOG.d_proc) THEN
1312: PO_LOG.proc_begin(d_module);
1313: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1314: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1315: END IF;
1316:
1317: d_progress := 10;
1310:
1311: IF (PO_LOG.d_proc) THEN
1312: PO_LOG.proc_begin(d_module);
1313: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1314: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1315: END IF;
1316:
1317: d_progress := 10;
1318:
1345: END IF;
1346:
1347: d_progress := 30;
1348:
1349: IF (PO_LOG.d_stmt) THEN
1350: PO_LOG.stmt(d_module, d_progress, 'Deleted ' || SQL%ROWCOUNT || ' records');
1351: END IF;
1352:
1353: IF (PO_LOG.d_proc) THEN
1346:
1347: d_progress := 30;
1348:
1349: IF (PO_LOG.d_stmt) THEN
1350: PO_LOG.stmt(d_module, d_progress, 'Deleted ' || SQL%ROWCOUNT || ' records');
1351: END IF;
1352:
1353: IF (PO_LOG.d_proc) THEN
1354: PO_LOG.proc_return(d_module, TRUE);
1349: IF (PO_LOG.d_stmt) THEN
1350: PO_LOG.stmt(d_module, d_progress, 'Deleted ' || SQL%ROWCOUNT || ' records');
1351: END IF;
1352:
1353: IF (PO_LOG.d_proc) THEN
1354: PO_LOG.proc_return(d_module, TRUE);
1355: PO_LOG.proc_end(d_module);
1356: END IF;
1357:
1350: PO_LOG.stmt(d_module, d_progress, 'Deleted ' || SQL%ROWCOUNT || ' records');
1351: END IF;
1352:
1353: IF (PO_LOG.d_proc) THEN
1354: PO_LOG.proc_return(d_module, TRUE);
1355: PO_LOG.proc_end(d_module);
1356: END IF;
1357:
1358: return(TRUE);
1351: END IF;
1352:
1353: IF (PO_LOG.d_proc) THEN
1354: PO_LOG.proc_return(d_module, TRUE);
1355: PO_LOG.proc_end(d_module);
1356: END IF;
1357:
1358: return(TRUE);
1359:
1359:
1360: EXCEPTION
1361:
1362: WHEN others THEN
1363: IF (PO_LOG.d_exc) THEN
1364: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1365: END IF;
1366:
1367: return(FALSE);
1360: EXCEPTION
1361:
1362: WHEN others THEN
1363: IF (PO_LOG.d_exc) THEN
1364: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1365: END IF;
1366:
1367: return(FALSE);
1368:
1401: d_progress NUMBER;
1402:
1403: BEGIN
1404:
1405: IF (PO_LOG.d_proc) THEN
1406: PO_LOG.proc_begin(d_module);
1407: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1408: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1409: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1402:
1403: BEGIN
1404:
1405: IF (PO_LOG.d_proc) THEN
1406: PO_LOG.proc_begin(d_module);
1407: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1408: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1409: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1410: END IF;
1403: BEGIN
1404:
1405: IF (PO_LOG.d_proc) THEN
1406: PO_LOG.proc_begin(d_module);
1407: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1408: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1409: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1410: END IF;
1411:
1404:
1405: IF (PO_LOG.d_proc) THEN
1406: PO_LOG.proc_begin(d_module);
1407: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1408: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1409: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1410: END IF;
1411:
1412: d_progress := 10;
1405: IF (PO_LOG.d_proc) THEN
1406: PO_LOG.proc_begin(d_module);
1407: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1408: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1409: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1410: END IF;
1411:
1412: d_progress := 10;
1413:
1440: END IF;
1441:
1442: d_progress := 30;
1443:
1444: IF (PO_LOG.d_stmt) THEN
1445: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' records');
1446: END IF;
1447:
1448: IF (PO_LOG.d_proc) THEN
1441:
1442: d_progress := 30;
1443:
1444: IF (PO_LOG.d_stmt) THEN
1445: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' records');
1446: END IF;
1447:
1448: IF (PO_LOG.d_proc) THEN
1449: PO_LOG.proc_return(d_module, TRUE);
1444: IF (PO_LOG.d_stmt) THEN
1445: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' records');
1446: END IF;
1447:
1448: IF (PO_LOG.d_proc) THEN
1449: PO_LOG.proc_return(d_module, TRUE);
1450: PO_LOG.proc_end(d_module);
1451: END IF;
1452:
1445: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' records');
1446: END IF;
1447:
1448: IF (PO_LOG.d_proc) THEN
1449: PO_LOG.proc_return(d_module, TRUE);
1450: PO_LOG.proc_end(d_module);
1451: END IF;
1452:
1453: return(TRUE);
1446: END IF;
1447:
1448: IF (PO_LOG.d_proc) THEN
1449: PO_LOG.proc_return(d_module, TRUE);
1450: PO_LOG.proc_end(d_module);
1451: END IF;
1452:
1453: return(TRUE);
1454:
1454:
1455: EXCEPTION
1456:
1457: WHEN others THEN
1458: IF (PO_LOG.d_exc) THEN
1459: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1460: END IF;
1461:
1462: return(FALSE);
1455: EXCEPTION
1456:
1457: WHEN others THEN
1458: IF (PO_LOG.d_exc) THEN
1459: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1460: END IF;
1461:
1462: return(FALSE);
1463:
1498: l_return_value BOOLEAN := FALSE;
1499:
1500: BEGIN
1501:
1502: IF (PO_LOG.d_proc) THEN
1503: PO_LOG.proc_begin(d_module);
1504: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1505: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1506: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1499:
1500: BEGIN
1501:
1502: IF (PO_LOG.d_proc) THEN
1503: PO_LOG.proc_begin(d_module);
1504: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1505: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1506: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1507: END IF;
1500: BEGIN
1501:
1502: IF (PO_LOG.d_proc) THEN
1503: PO_LOG.proc_begin(d_module);
1504: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1505: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1506: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1507: END IF;
1508:
1501:
1502: IF (PO_LOG.d_proc) THEN
1503: PO_LOG.proc_begin(d_module);
1504: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1505: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1506: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1507: END IF;
1508:
1509: d_progress := 10;
1502: IF (PO_LOG.d_proc) THEN
1503: PO_LOG.proc_begin(d_module);
1504: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1505: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1506: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1507: END IF;
1508:
1509: d_progress := 10;
1510:
1548: );
1549:
1550: END IF;
1551:
1552: IF (PO_LOG.d_proc) THEN
1553: PO_LOG.proc_return(d_module, l_return_value);
1554: PO_LOG.proc_end(d_module);
1555: END IF;
1556:
1549:
1550: END IF;
1551:
1552: IF (PO_LOG.d_proc) THEN
1553: PO_LOG.proc_return(d_module, l_return_value);
1554: PO_LOG.proc_end(d_module);
1555: END IF;
1556:
1557: return (l_return_value);
1550: END IF;
1551:
1552: IF (PO_LOG.d_proc) THEN
1553: PO_LOG.proc_return(d_module, l_return_value);
1554: PO_LOG.proc_end(d_module);
1555: END IF;
1556:
1557: return (l_return_value);
1558:
1558:
1559: EXCEPTION
1560:
1561: WHEN others THEN
1562: IF (PO_LOG.d_exc) THEN
1563: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1564: END IF;
1565:
1566: return(FALSE);
1559: EXCEPTION
1560:
1561: WHEN others THEN
1562: IF (PO_LOG.d_exc) THEN
1563: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1564: END IF;
1565:
1566: return(FALSE);
1567:
1614: l_return_value BOOLEAN := FALSE;
1615:
1616: BEGIN
1617:
1618: IF (PO_LOG.d_proc) THEN
1619: PO_LOG.proc_begin(d_module);
1620: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1621: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1622: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1615:
1616: BEGIN
1617:
1618: IF (PO_LOG.d_proc) THEN
1619: PO_LOG.proc_begin(d_module);
1620: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1621: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1622: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1623: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
1616: BEGIN
1617:
1618: IF (PO_LOG.d_proc) THEN
1619: PO_LOG.proc_begin(d_module);
1620: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1621: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1622: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1623: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
1624: END IF;
1617:
1618: IF (PO_LOG.d_proc) THEN
1619: PO_LOG.proc_begin(d_module);
1620: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1621: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1622: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1623: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
1624: END IF;
1625:
1618: IF (PO_LOG.d_proc) THEN
1619: PO_LOG.proc_begin(d_module);
1620: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1621: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1622: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1623: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
1624: END IF;
1625:
1626: d_progress := 10;
1619: PO_LOG.proc_begin(d_module);
1620: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
1621: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
1622: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
1623: PO_LOG.proc_begin(d_module, 'p_recreate_flag', p_recreate_flag);
1624: END IF;
1625:
1626: d_progress := 10;
1627:
1638: , p_entity_type => 'RELEASE'
1639: );
1640:
1641: IF (NOT l_return_value) THEN
1642: IF (PO_LOG.d_stmt) THEN
1643: PO_LOG.stmt(d_module, d_progress, 'delete_supply not successful');
1644: END IF;
1645:
1646: RAISE PO_CORE_S.g_early_return_exc;
1639: );
1640:
1641: IF (NOT l_return_value) THEN
1642: IF (PO_LOG.d_stmt) THEN
1643: PO_LOG.stmt(d_module, d_progress, 'delete_supply not successful');
1644: END IF;
1645:
1646: RAISE PO_CORE_S.g_early_return_exc;
1647: END IF;
1659: , p_supply_flag => l_supply_flag
1660: );
1661:
1662: IF (NOT l_return_value) THEN
1663: IF (PO_LOG.d_stmt) THEN
1664: PO_LOG.stmt(d_module, d_progress, 'update_planned_po not successful');
1665: END IF;
1666:
1667: RAISE PO_CORE_S.g_early_return_exc;
1660: );
1661:
1662: IF (NOT l_return_value) THEN
1663: IF (PO_LOG.d_stmt) THEN
1664: PO_LOG.stmt(d_module, d_progress, 'update_planned_po not successful');
1665: END IF;
1666:
1667: RAISE PO_CORE_S.g_early_return_exc;
1668: END IF;
1679: d_progress := 50;
1680:
1681: IF (rel%NOTFOUND) THEN
1682:
1683: IF (PO_LOG.d_stmt) THEN
1684: PO_LOG.stmt(d_module, d_progress, 'no rows in release cursor');
1685: END IF;
1686:
1687: l_return_value := TRUE;
1680:
1681: IF (rel%NOTFOUND) THEN
1682:
1683: IF (PO_LOG.d_stmt) THEN
1684: PO_LOG.stmt(d_module, d_progress, 'no rows in release cursor');
1685: END IF;
1686:
1687: l_return_value := TRUE;
1688: RAISE PO_CORE_S.g_early_return_exc;
1711: , p_shipid => p_shipid
1712: );
1713:
1714: IF (NOT l_return_value) THEN
1715: IF (PO_LOG.d_stmt) THEN
1716: PO_LOG.stmt(d_module, d_progress, 'update_supply not successful');
1717: END IF;
1718:
1719: RAISE PO_CORE_S.g_early_return_exc;
1712: );
1713:
1714: IF (NOT l_return_value) THEN
1715: IF (PO_LOG.d_stmt) THEN
1716: PO_LOG.stmt(d_module, d_progress, 'update_supply not successful');
1717: END IF;
1718:
1719: RAISE PO_CORE_S.g_early_return_exc;
1720: END IF;
1733: , p_supply_flag => l_supply_flag
1734: );
1735:
1736: IF (NOT l_return_value) THEN
1737: IF (PO_LOG.d_stmt) THEN
1738: PO_LOG.stmt(d_module, d_progress, 'update_planned_po not successful');
1739: END IF;
1740:
1741: RAISE PO_CORE_S.g_early_return_exc;
1734: );
1735:
1736: IF (NOT l_return_value) THEN
1737: IF (PO_LOG.d_stmt) THEN
1738: PO_LOG.stmt(d_module, d_progress, 'update_planned_po not successful');
1739: END IF;
1740:
1741: RAISE PO_CORE_S.g_early_return_exc;
1742: END IF;
1767: IF (rel%ISOPEN) THEN
1768: CLOSE rel;
1769: END IF;
1770:
1771: IF (PO_LOG.d_proc) THEN
1772: PO_LOG.proc_return(d_module, l_return_value);
1773: PO_LOG.proc_end(d_module);
1774: END IF;
1775:
1768: CLOSE rel;
1769: END IF;
1770:
1771: IF (PO_LOG.d_proc) THEN
1772: PO_LOG.proc_return(d_module, l_return_value);
1773: PO_LOG.proc_end(d_module);
1774: END IF;
1775:
1776: return (l_return_value);
1769: END IF;
1770:
1771: IF (PO_LOG.d_proc) THEN
1772: PO_LOG.proc_return(d_module, l_return_value);
1773: PO_LOG.proc_end(d_module);
1774: END IF;
1775:
1776: return (l_return_value);
1777:
1776: return (l_return_value);
1777:
1778: EXCEPTION
1779: WHEN others THEN
1780: IF (PO_LOG.d_exc) THEN
1781: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1782: END IF;
1783:
1784: IF (rel%ISOPEN) THEN
1777:
1778: EXCEPTION
1779: WHEN others THEN
1780: IF (PO_LOG.d_exc) THEN
1781: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1782: END IF;
1783:
1784: IF (rel%ISOPEN) THEN
1785: CLOSE rel;
1855: d_progress NUMBER;
1856:
1857: BEGIN
1858:
1859: IF (PO_LOG.d_proc) THEN
1860: PO_LOG.proc_begin(d_module);
1861: END IF;
1862:
1863: d_progress := 10;
1856:
1857: BEGIN
1858:
1859: IF (PO_LOG.d_proc) THEN
1860: PO_LOG.proc_begin(d_module);
1861: END IF;
1862:
1863: d_progress := 10;
1864:
1872: DELETE FROM mtl_supply
1873: WHERE rowid = c_sup2.rowid;
1874:
1875: d_progress := 25;
1876: IF (PO_LOG.d_stmt) THEN
1877: PO_LOG.stmt(d_module, d_progress, 'Deleted ' || SQL%ROWCOUNT || ' rows');
1878: END IF;
1879:
1880: ELSE
1873: WHERE rowid = c_sup2.rowid;
1874:
1875: d_progress := 25;
1876: IF (PO_LOG.d_stmt) THEN
1877: PO_LOG.stmt(d_module, d_progress, 'Deleted ' || SQL%ROWCOUNT || ' rows');
1878: END IF;
1879:
1880: ELSE
1881:
1900: END IF; -- if (c_sup2.item_id = -1)
1901:
1902: d_progress := 50;
1903:
1904: IF (PO_LOG.d_stmt) THEN
1905: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1906: PO_LOG.stmt(d_module, d_progress, 'l_lead_time', l_lead_time);
1907: PO_LOG.stmt(d_module, d_progress, 'c_sup2.item_id', c_sup2.item_id);
1908: PO_LOG.stmt(d_module, d_progress, 'c_sup2.quantity', c_sup2.quantity);
1901:
1902: d_progress := 50;
1903:
1904: IF (PO_LOG.d_stmt) THEN
1905: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1906: PO_LOG.stmt(d_module, d_progress, 'l_lead_time', l_lead_time);
1907: PO_LOG.stmt(d_module, d_progress, 'c_sup2.item_id', c_sup2.item_id);
1908: PO_LOG.stmt(d_module, d_progress, 'c_sup2.quantity', c_sup2.quantity);
1909: PO_LOG.stmt(d_module, d_progress, 'c_sup2.unit_of_measure', c_sup2.unit_of_measure);
1902: d_progress := 50;
1903:
1904: IF (PO_LOG.d_stmt) THEN
1905: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1906: PO_LOG.stmt(d_module, d_progress, 'l_lead_time', l_lead_time);
1907: PO_LOG.stmt(d_module, d_progress, 'c_sup2.item_id', c_sup2.item_id);
1908: PO_LOG.stmt(d_module, d_progress, 'c_sup2.quantity', c_sup2.quantity);
1909: PO_LOG.stmt(d_module, d_progress, 'c_sup2.unit_of_measure', c_sup2.unit_of_measure);
1910: END IF;
1903:
1904: IF (PO_LOG.d_stmt) THEN
1905: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1906: PO_LOG.stmt(d_module, d_progress, 'l_lead_time', l_lead_time);
1907: PO_LOG.stmt(d_module, d_progress, 'c_sup2.item_id', c_sup2.item_id);
1908: PO_LOG.stmt(d_module, d_progress, 'c_sup2.quantity', c_sup2.quantity);
1909: PO_LOG.stmt(d_module, d_progress, 'c_sup2.unit_of_measure', c_sup2.unit_of_measure);
1910: END IF;
1911:
1904: IF (PO_LOG.d_stmt) THEN
1905: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1906: PO_LOG.stmt(d_module, d_progress, 'l_lead_time', l_lead_time);
1907: PO_LOG.stmt(d_module, d_progress, 'c_sup2.item_id', c_sup2.item_id);
1908: PO_LOG.stmt(d_module, d_progress, 'c_sup2.quantity', c_sup2.quantity);
1909: PO_LOG.stmt(d_module, d_progress, 'c_sup2.unit_of_measure', c_sup2.unit_of_measure);
1910: END IF;
1911:
1912: l_pri_qty := INV_CONVERT.INV_UM_CONVERT(
1905: PO_LOG.stmt(d_module, d_progress, 'l_uom', l_uom);
1906: PO_LOG.stmt(d_module, d_progress, 'l_lead_time', l_lead_time);
1907: PO_LOG.stmt(d_module, d_progress, 'c_sup2.item_id', c_sup2.item_id);
1908: PO_LOG.stmt(d_module, d_progress, 'c_sup2.quantity', c_sup2.quantity);
1909: PO_LOG.stmt(d_module, d_progress, 'c_sup2.unit_of_measure', c_sup2.unit_of_measure);
1910: END IF;
1911:
1912: l_pri_qty := INV_CONVERT.INV_UM_CONVERT(
1913: item_id => c_sup2.item_id
1920: );
1921:
1922: d_progress := 60;
1923:
1924: IF (PO_LOG.d_stmt) THEN
1925: PO_LOG.stmt(d_module, d_progress, 'l_pri_qty', l_pri_qty);
1926: END IF;
1927:
1928:
1921:
1922: d_progress := 60;
1923:
1924: IF (PO_LOG.d_stmt) THEN
1925: PO_LOG.stmt(d_module, d_progress, 'l_pri_qty', l_pri_qty);
1926: END IF;
1927:
1928:
1929: UPDATE mtl_supply
1936: c_sup2.receipt_date + NVL(l_lead_time, 0))
1937: WHERE rowid = c_sup2.rowid;
1938:
1939: d_progress := 70;
1940: IF (PO_LOG.d_stmt) THEN
1941: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
1942: END IF;
1943:
1944: END IF; -- if (c_sup2.quantity = 0)
1937: WHERE rowid = c_sup2.rowid;
1938:
1939: d_progress := 70;
1940: IF (PO_LOG.d_stmt) THEN
1941: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
1942: END IF;
1943:
1944: END IF; -- if (c_sup2.quantity = 0)
1945:
1944: END IF; -- if (c_sup2.quantity = 0)
1945:
1946: END LOOP;
1947:
1948: IF (PO_LOG.d_proc) THEN
1949: PO_LOG.proc_return(d_module, TRUE);
1950: PO_LOG.proc_end(d_module);
1951: END IF;
1952:
1945:
1946: END LOOP;
1947:
1948: IF (PO_LOG.d_proc) THEN
1949: PO_LOG.proc_return(d_module, TRUE);
1950: PO_LOG.proc_end(d_module);
1951: END IF;
1952:
1953: return(TRUE);
1946: END LOOP;
1947:
1948: IF (PO_LOG.d_proc) THEN
1949: PO_LOG.proc_return(d_module, TRUE);
1950: PO_LOG.proc_end(d_module);
1951: END IF;
1952:
1953: return(TRUE);
1954:
1955: EXCEPTION
1956:
1957: WHEN others THEN
1958:
1959: IF (PO_LOG.d_exc) THEN
1960: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1961: END IF;
1962:
1963: IF uom%ISOPEN THEN
1956:
1957: WHEN others THEN
1958:
1959: IF (PO_LOG.d_exc) THEN
1960: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1961: END IF;
1962:
1963: IF uom%ISOPEN THEN
1964: close uom;
2000: l_return_value BOOLEAN := FALSE;
2001:
2002: BEGIN
2003:
2004: IF (PO_LOG.d_proc) THEN
2005: PO_LOG.proc_begin(d_module);
2006: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2007: END IF;
2008:
2001:
2002: BEGIN
2003:
2004: IF (PO_LOG.d_proc) THEN
2005: PO_LOG.proc_begin(d_module);
2006: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2007: END IF;
2008:
2009: d_progress := 10;
2002: BEGIN
2003:
2004: IF (PO_LOG.d_proc) THEN
2005: PO_LOG.proc_begin(d_module);
2006: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2007: END IF;
2008:
2009: d_progress := 10;
2010:
2025: l_return_value := TRUE;
2026:
2027: END IF;
2028:
2029: IF (PO_LOG.d_proc) THEN
2030: PO_LOG.proc_return(d_module, l_return_value);
2031: PO_LOG.proc_end(d_module);
2032: END IF;
2033:
2026:
2027: END IF;
2028:
2029: IF (PO_LOG.d_proc) THEN
2030: PO_LOG.proc_return(d_module, l_return_value);
2031: PO_LOG.proc_end(d_module);
2032: END IF;
2033:
2034: return(l_return_value);
2027: END IF;
2028:
2029: IF (PO_LOG.d_proc) THEN
2030: PO_LOG.proc_return(d_module, l_return_value);
2031: PO_LOG.proc_end(d_module);
2032: END IF;
2033:
2034: return(l_return_value);
2035:
2036: EXCEPTION
2037:
2038: WHEN others THEN
2039:
2040: IF (PO_LOG.d_exc) THEN
2041: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2042: END IF;
2043:
2044: IF (auth_status%ISOPEN) THEN
2037:
2038: WHEN others THEN
2039:
2040: IF (PO_LOG.d_exc) THEN
2041: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2042: END IF;
2043:
2044: IF (auth_status%ISOPEN) THEN
2045: close auth_status;
2065: d_progress NUMBER;
2066:
2067: BEGIN
2068:
2069: IF (PO_LOG.d_proc) THEN
2070: PO_LOG.proc_begin(d_module);
2071: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
2072: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2073: END IF;
2066:
2067: BEGIN
2068:
2069: IF (PO_LOG.d_proc) THEN
2070: PO_LOG.proc_begin(d_module);
2071: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
2072: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2073: END IF;
2074:
2067: BEGIN
2068:
2069: IF (PO_LOG.d_proc) THEN
2070: PO_LOG.proc_begin(d_module);
2071: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
2072: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2073: END IF;
2074:
2075: d_progress := 10;
2068:
2069: IF (PO_LOG.d_proc) THEN
2070: PO_LOG.proc_begin(d_module);
2071: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
2072: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2073: END IF;
2074:
2075: d_progress := 10;
2076:
2095: AND req_line_id = p_entity_id;
2096:
2097: END IF; -- if (p_entity_type = ...)
2098:
2099: IF (PO_LOG.d_stmt) THEN
2100: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2101: END IF;
2102:
2103: IF (PO_LOG.d_proc) THEN
2096:
2097: END IF; -- if (p_entity_type = ...)
2098:
2099: IF (PO_LOG.d_stmt) THEN
2100: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2101: END IF;
2102:
2103: IF (PO_LOG.d_proc) THEN
2104: PO_LOG.proc_return(d_module, TRUE);
2099: IF (PO_LOG.d_stmt) THEN
2100: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2101: END IF;
2102:
2103: IF (PO_LOG.d_proc) THEN
2104: PO_LOG.proc_return(d_module, TRUE);
2105: PO_LOG.proc_end(d_module);
2106: END IF;
2107:
2100: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2101: END IF;
2102:
2103: IF (PO_LOG.d_proc) THEN
2104: PO_LOG.proc_return(d_module, TRUE);
2105: PO_LOG.proc_end(d_module);
2106: END IF;
2107:
2108: return(TRUE);
2101: END IF;
2102:
2103: IF (PO_LOG.d_proc) THEN
2104: PO_LOG.proc_return(d_module, TRUE);
2105: PO_LOG.proc_end(d_module);
2106: END IF;
2107:
2108: return(TRUE);
2109:
2110:
2111: EXCEPTION
2112:
2113: WHEN others THEN
2114: IF (PO_LOG.d_exc) THEN
2115: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2116: END IF;
2117:
2118: return(FALSE);
2111: EXCEPTION
2112:
2113: WHEN others THEN
2114: IF (PO_LOG.d_exc) THEN
2115: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2116: END IF;
2117:
2118: return(FALSE);
2119:
2132: d_progress NUMBER;
2133:
2134: BEGIN
2135:
2136: IF (PO_LOG.d_proc) THEN
2137: PO_LOG.proc_begin(d_module);
2138: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2139: END IF;
2140:
2133:
2134: BEGIN
2135:
2136: IF (PO_LOG.d_proc) THEN
2137: PO_LOG.proc_begin(d_module);
2138: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2139: END IF;
2140:
2141: d_progress := 10;
2134: BEGIN
2135:
2136: IF (PO_LOG.d_proc) THEN
2137: PO_LOG.proc_begin(d_module);
2138: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2139: END IF;
2140:
2141: d_progress := 10;
2142:
2154: WHERE porl.source_type_code = 'VENDOR'
2155: AND porl.requisition_line_id = ms.req_line_id
2156: );
2157:
2158: IF (PO_LOG.d_stmt) THEN
2159: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2160: END IF;
2161:
2162: IF (PO_LOG.d_proc) THEN
2155: AND porl.requisition_line_id = ms.req_line_id
2156: );
2157:
2158: IF (PO_LOG.d_stmt) THEN
2159: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2160: END IF;
2161:
2162: IF (PO_LOG.d_proc) THEN
2163: PO_LOG.proc_return(d_module, TRUE);
2158: IF (PO_LOG.d_stmt) THEN
2159: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2160: END IF;
2161:
2162: IF (PO_LOG.d_proc) THEN
2163: PO_LOG.proc_return(d_module, TRUE);
2164: PO_LOG.proc_end(d_module);
2165: END IF;
2166:
2159: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2160: END IF;
2161:
2162: IF (PO_LOG.d_proc) THEN
2163: PO_LOG.proc_return(d_module, TRUE);
2164: PO_LOG.proc_end(d_module);
2165: END IF;
2166:
2167: return(TRUE);
2160: END IF;
2161:
2162: IF (PO_LOG.d_proc) THEN
2163: PO_LOG.proc_return(d_module, TRUE);
2164: PO_LOG.proc_end(d_module);
2165: END IF;
2166:
2167: return(TRUE);
2168:
2168:
2169: EXCEPTION
2170:
2171: WHEN others THEN
2172: IF (PO_LOG.d_exc) THEN
2173: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2174: END IF;
2175:
2176: return(FALSE);
2169: EXCEPTION
2170:
2171: WHEN others THEN
2172: IF (PO_LOG.d_exc) THEN
2173: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2174: END IF;
2175:
2176: return(FALSE);
2177:
2198: l_return_value BOOLEAN := FALSE;
2199:
2200: BEGIN
2201:
2202: IF (PO_LOG.d_proc) THEN
2203: PO_LOG.proc_begin(d_module);
2204: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
2205: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2206: END IF;
2199:
2200: BEGIN
2201:
2202: IF (PO_LOG.d_proc) THEN
2203: PO_LOG.proc_begin(d_module);
2204: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
2205: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2206: END IF;
2207:
2200: BEGIN
2201:
2202: IF (PO_LOG.d_proc) THEN
2203: PO_LOG.proc_begin(d_module);
2204: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
2205: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2206: END IF;
2207:
2208: d_progress := 10;
2201:
2202: IF (PO_LOG.d_proc) THEN
2203: PO_LOG.proc_begin(d_module);
2204: PO_LOG.proc_begin(d_module, 'p_entity_id', p_entity_id);
2205: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2206: END IF;
2207:
2208: d_progress := 10;
2209:
2228: AND pl.line_location_id IS NULL
2229: )
2230: AND ms1.supply_type_code = 'REQ';
2231:
2232: IF (PO_LOG.d_stmt) THEN
2233: PO_LOG.stmt(d_module, d_progress, 'Deleted ' || SQL%ROWCOUNT || ' rows');
2234: END IF;
2235:
2236: --
2229: )
2230: AND ms1.supply_type_code = 'REQ';
2231:
2232: IF (PO_LOG.d_stmt) THEN
2233: PO_LOG.stmt(d_module, d_progress, 'Deleted ' || SQL%ROWCOUNT || ' rows');
2234: END IF;
2235:
2236: --
2237:
2371: END IF; -- if p_entity_type = ...
2372:
2373: d_progress := 100;
2374:
2375: IF (PO_LOG.d_stmt) THEN
2376: PO_LOG.stmt(d_module, d_progress, 'Inserted ' || SQL%ROWCOUNT || ' rows');
2377: END IF;
2378:
2379: --
2372:
2373: d_progress := 100;
2374:
2375: IF (PO_LOG.d_stmt) THEN
2376: PO_LOG.stmt(d_module, d_progress, 'Inserted ' || SQL%ROWCOUNT || ' rows');
2377: END IF;
2378:
2379: --
2380: -- This is to handle services lines.
2380: -- This is to handle services lines.
2381:
2382: l_return_value := TRUE;
2383:
2384: IF (PO_LOG.d_proc) THEN
2385: PO_LOG.proc_return(d_module, l_return_value);
2386: PO_LOG.proc_end(d_module);
2387: END IF;
2388:
2381:
2382: l_return_value := TRUE;
2383:
2384: IF (PO_LOG.d_proc) THEN
2385: PO_LOG.proc_return(d_module, l_return_value);
2386: PO_LOG.proc_end(d_module);
2387: END IF;
2388:
2389: return(l_return_value);
2382: l_return_value := TRUE;
2383:
2384: IF (PO_LOG.d_proc) THEN
2385: PO_LOG.proc_return(d_module, l_return_value);
2386: PO_LOG.proc_end(d_module);
2387: END IF;
2388:
2389: return(l_return_value);
2390:
2391: EXCEPTION
2392:
2393: WHEN others THEN
2394:
2395: IF (PO_LOG.d_exc) THEN
2396: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2397: END IF;
2398:
2399: return(FALSE);
2392:
2393: WHEN others THEN
2394:
2395: IF (PO_LOG.d_exc) THEN
2396: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2397: END IF;
2398:
2399: return(FALSE);
2400:
2415: l_return_value BOOLEAN := FALSE;
2416:
2417: BEGIN
2418:
2419: IF (PO_LOG.d_proc) THEN
2420: PO_LOG.proc_begin(d_module);
2421: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2422: END IF;
2423:
2416:
2417: BEGIN
2418:
2419: IF (PO_LOG.d_proc) THEN
2420: PO_LOG.proc_begin(d_module);
2421: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2422: END IF;
2423:
2424: d_progress := 10;
2417: BEGIN
2418:
2419: IF (PO_LOG.d_proc) THEN
2420: PO_LOG.proc_begin(d_module);
2421: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2422: END IF;
2423:
2424: d_progress := 10;
2425:
2432: , p_entity_type => 'REQ LINE'
2433: );
2434:
2435: IF (NOT l_return_value) THEN
2436: IF (PO_LOG.d_stmt) THEN
2437: PO_LOG.stmt(d_module, d_progress, 'remove_req not successful');
2438: END IF;
2439:
2440: RAISE PO_CORE_S.g_early_return_exc;
2433: );
2434:
2435: IF (NOT l_return_value) THEN
2436: IF (PO_LOG.d_stmt) THEN
2437: PO_LOG.stmt(d_module, d_progress, 'remove_req not successful');
2438: END IF;
2439:
2440: RAISE PO_CORE_S.g_early_return_exc;
2441: END IF;
2511: where supply_type_code = 'REQ'
2512: and supply_source_id = prl.requisition_line_id);
2513:
2514:
2515: IF (PO_LOG.d_stmt) THEN
2516: PO_LOG.stmt(d_module, d_progress, 'Exploded ' || SQL%ROWCOUNT || ' rows');
2517: END IF;
2518:
2519: l_return_value := TRUE;
2512: and supply_source_id = prl.requisition_line_id);
2513:
2514:
2515: IF (PO_LOG.d_stmt) THEN
2516: PO_LOG.stmt(d_module, d_progress, 'Exploded ' || SQL%ROWCOUNT || ' rows');
2517: END IF;
2518:
2519: l_return_value := TRUE;
2520:
2522: WHEN PO_CORE_S.g_early_return_exc THEN
2523: NULL;
2524: END;
2525:
2526: IF (PO_LOG.d_proc) THEN
2527: PO_LOG.proc_return(d_module, l_return_value);
2528: PO_LOG.proc_end(d_module);
2529: END IF;
2530:
2523: NULL;
2524: END;
2525:
2526: IF (PO_LOG.d_proc) THEN
2527: PO_LOG.proc_return(d_module, l_return_value);
2528: PO_LOG.proc_end(d_module);
2529: END IF;
2530:
2531: return(l_return_value);
2524: END;
2525:
2526: IF (PO_LOG.d_proc) THEN
2527: PO_LOG.proc_return(d_module, l_return_value);
2528: PO_LOG.proc_end(d_module);
2529: END IF;
2530:
2531: return(l_return_value);
2532:
2533: EXCEPTION
2534:
2535: WHEN others THEN
2536:
2537: IF (PO_LOG.d_exc) THEN
2538: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2539: END IF;
2540:
2541: return(FALSE);
2534:
2535: WHEN others THEN
2536:
2537: IF (PO_LOG.d_exc) THEN
2538: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2539: END IF;
2540:
2541: return(FALSE);
2542:
2559: d_progress NUMBER;
2560:
2561: BEGIN
2562:
2563: IF (PO_LOG.d_proc) THEN
2564: PO_LOG.proc_begin(d_module);
2565: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2566: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
2567: END IF;
2560:
2561: BEGIN
2562:
2563: IF (PO_LOG.d_proc) THEN
2564: PO_LOG.proc_begin(d_module);
2565: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2566: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
2567: END IF;
2568:
2561: BEGIN
2562:
2563: IF (PO_LOG.d_proc) THEN
2564: PO_LOG.proc_begin(d_module);
2565: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2566: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
2567: END IF;
2568:
2569: d_progress := 10;
2562:
2563: IF (PO_LOG.d_proc) THEN
2564: PO_LOG.proc_begin(d_module);
2565: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2566: PO_LOG.proc_begin(d_module, 'p_qty', p_qty);
2567: END IF;
2568:
2569: d_progress := 10;
2570:
2573: , change_flag = 'Y'
2574: WHERE supply_type_code = 'REQ'
2575: AND req_line_id = p_lineid;
2576:
2577: IF (PO_LOG.d_stmt) THEN
2578: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2579: END IF;
2580:
2581:
2574: WHERE supply_type_code = 'REQ'
2575: AND req_line_id = p_lineid;
2576:
2577: IF (PO_LOG.d_stmt) THEN
2578: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2579: END IF;
2580:
2581:
2582: IF (PO_LOG.d_proc) THEN
2578: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2579: END IF;
2580:
2581:
2582: IF (PO_LOG.d_proc) THEN
2583: PO_LOG.proc_return(d_module, TRUE);
2584: PO_LOG.proc_end(d_module);
2585: END IF;
2586:
2579: END IF;
2580:
2581:
2582: IF (PO_LOG.d_proc) THEN
2583: PO_LOG.proc_return(d_module, TRUE);
2584: PO_LOG.proc_end(d_module);
2585: END IF;
2586:
2587: return(TRUE);
2580:
2581:
2582: IF (PO_LOG.d_proc) THEN
2583: PO_LOG.proc_return(d_module, TRUE);
2584: PO_LOG.proc_end(d_module);
2585: END IF;
2586:
2587: return(TRUE);
2588:
2589: EXCEPTION
2590:
2591: WHEN others THEN
2592:
2593: IF (PO_LOG.d_exc) THEN
2594: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2595: END IF;
2596:
2597: return(FALSE);
2590:
2591: WHEN others THEN
2592:
2593: IF (PO_LOG.d_exc) THEN
2594: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2595: END IF;
2596:
2597: return(FALSE);
2598:
2614: d_progress NUMBER;
2615:
2616: BEGIN
2617:
2618: IF (PO_LOG.d_proc) THEN
2619: PO_LOG.proc_begin(d_module);
2620: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2621: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
2622: END IF;
2615:
2616: BEGIN
2617:
2618: IF (PO_LOG.d_proc) THEN
2619: PO_LOG.proc_begin(d_module);
2620: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2621: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
2622: END IF;
2623:
2616: BEGIN
2617:
2618: IF (PO_LOG.d_proc) THEN
2619: PO_LOG.proc_begin(d_module);
2620: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2621: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
2622: END IF;
2623:
2624: d_progress := 10;
2617:
2618: IF (PO_LOG.d_proc) THEN
2619: PO_LOG.proc_begin(d_module);
2620: PO_LOG.proc_begin(d_module, 'p_lineid', p_lineid);
2621: PO_LOG.proc_begin(d_module, 'p_receipt_date', p_receipt_date);
2622: END IF;
2623:
2624: d_progress := 10;
2625:
2629: , change_flag = 'Y'
2630: WHERE supply_type_code = 'REQ'
2631: AND req_line_id = p_lineid;
2632:
2633: IF (PO_LOG.d_stmt) THEN
2634: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2635: END IF;
2636:
2637:
2630: WHERE supply_type_code = 'REQ'
2631: AND req_line_id = p_lineid;
2632:
2633: IF (PO_LOG.d_stmt) THEN
2634: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2635: END IF;
2636:
2637:
2638: IF (PO_LOG.d_proc) THEN
2634: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2635: END IF;
2636:
2637:
2638: IF (PO_LOG.d_proc) THEN
2639: PO_LOG.proc_return(d_module, TRUE);
2640: PO_LOG.proc_end(d_module);
2641: END IF;
2642:
2635: END IF;
2636:
2637:
2638: IF (PO_LOG.d_proc) THEN
2639: PO_LOG.proc_return(d_module, TRUE);
2640: PO_LOG.proc_end(d_module);
2641: END IF;
2642:
2643: return(TRUE);
2636:
2637:
2638: IF (PO_LOG.d_proc) THEN
2639: PO_LOG.proc_return(d_module, TRUE);
2640: PO_LOG.proc_end(d_module);
2641: END IF;
2642:
2643: return(TRUE);
2644:
2645: EXCEPTION
2646:
2647: WHEN others THEN
2648:
2649: IF (PO_LOG.d_exc) THEN
2650: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2651: END IF;
2652:
2653: return(FALSE);
2646:
2647: WHEN others THEN
2648:
2649: IF (PO_LOG.d_exc) THEN
2650: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2651: END IF;
2652:
2653: return(FALSE);
2654:
2689:
2690:
2691: BEGIN
2692:
2693: IF (PO_LOG.d_proc) THEN
2694: PO_LOG.proc_begin(d_module);
2695: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2696: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
2697: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2690:
2691: BEGIN
2692:
2693: IF (PO_LOG.d_proc) THEN
2694: PO_LOG.proc_begin(d_module);
2695: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2696: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
2697: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2698: PO_LOG.proc_begin(d_module, 'p_supply_flag', p_supply_flag);
2691: BEGIN
2692:
2693: IF (PO_LOG.d_proc) THEN
2694: PO_LOG.proc_begin(d_module);
2695: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2696: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
2697: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2698: PO_LOG.proc_begin(d_module, 'p_supply_flag', p_supply_flag);
2699: END IF;
2692:
2693: IF (PO_LOG.d_proc) THEN
2694: PO_LOG.proc_begin(d_module);
2695: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2696: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
2697: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2698: PO_LOG.proc_begin(d_module, 'p_supply_flag', p_supply_flag);
2699: END IF;
2700:
2693: IF (PO_LOG.d_proc) THEN
2694: PO_LOG.proc_begin(d_module);
2695: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2696: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
2697: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2698: PO_LOG.proc_begin(d_module, 'p_supply_flag', p_supply_flag);
2699: END IF;
2700:
2701: d_progress := 10;
2694: PO_LOG.proc_begin(d_module);
2695: PO_LOG.proc_begin(d_module, 'p_docid', p_docid);
2696: PO_LOG.proc_begin(d_module, 'p_shipid', p_shipid);
2697: PO_LOG.proc_begin(d_module, 'p_entity_type', p_entity_type);
2698: PO_LOG.proc_begin(d_module, 'p_supply_flag', p_supply_flag);
2699: END IF;
2700:
2701: d_progress := 10;
2702:
2772: END IF;
2773:
2774: END IF;
2775:
2776: IF (PO_LOG.d_stmt) THEN
2777: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2778: END IF;
2779:
2780: IF (PO_LOG.d_proc) THEN
2773:
2774: END IF;
2775:
2776: IF (PO_LOG.d_stmt) THEN
2777: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2778: END IF;
2779:
2780: IF (PO_LOG.d_proc) THEN
2781: PO_LOG.proc_return(d_module, TRUE);
2776: IF (PO_LOG.d_stmt) THEN
2777: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2778: END IF;
2779:
2780: IF (PO_LOG.d_proc) THEN
2781: PO_LOG.proc_return(d_module, TRUE);
2782: PO_LOG.proc_end(d_module, 'p_supply_flag', p_supply_flag);
2783: PO_LOG.proc_end(d_module);
2784: END IF;
2777: PO_LOG.stmt(d_module, d_progress, 'Updated ' || SQL%ROWCOUNT || ' rows');
2778: END IF;
2779:
2780: IF (PO_LOG.d_proc) THEN
2781: PO_LOG.proc_return(d_module, TRUE);
2782: PO_LOG.proc_end(d_module, 'p_supply_flag', p_supply_flag);
2783: PO_LOG.proc_end(d_module);
2784: END IF;
2785:
2778: END IF;
2779:
2780: IF (PO_LOG.d_proc) THEN
2781: PO_LOG.proc_return(d_module, TRUE);
2782: PO_LOG.proc_end(d_module, 'p_supply_flag', p_supply_flag);
2783: PO_LOG.proc_end(d_module);
2784: END IF;
2785:
2786: return(TRUE);
2779:
2780: IF (PO_LOG.d_proc) THEN
2781: PO_LOG.proc_return(d_module, TRUE);
2782: PO_LOG.proc_end(d_module, 'p_supply_flag', p_supply_flag);
2783: PO_LOG.proc_end(d_module);
2784: END IF;
2785:
2786: return(TRUE);
2787:
2788: EXCEPTION
2789:
2790: WHEN others THEN
2791:
2792: IF (PO_LOG.d_exc) THEN
2793: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2794: END IF;
2795:
2796: return(FALSE);
2789:
2790: WHEN others THEN
2791:
2792: IF (PO_LOG.d_exc) THEN
2793: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2794: END IF;
2795:
2796: return(FALSE);
2797: