189:
190: BEGIN
191:
192: d_progress := 0;
193: IF (PO_LOG.d_proc) THEN
194: PO_LOG.proc_begin(d_module);
195: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
196: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
190: BEGIN
191:
192: d_progress := 0;
193: IF (PO_LOG.d_proc) THEN
194: PO_LOG.proc_begin(d_module);
195: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
196: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
191:
192: d_progress := 0;
193: IF (PO_LOG.d_proc) THEN
194: PO_LOG.proc_begin(d_module);
195: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
196: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
192: d_progress := 0;
193: IF (PO_LOG.d_proc) THEN
194: PO_LOG.proc_begin(d_module);
195: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
196: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
193: IF (PO_LOG.d_proc) THEN
194: PO_LOG.proc_begin(d_module);
195: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
196: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
194: PO_LOG.proc_begin(d_module);
195: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
196: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
195: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
196: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
203: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
196: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
203: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
204: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.origin_doc_id', p_action_ctl_rec.origin_doc_id);
197: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
203: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
204: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.origin_doc_id', p_action_ctl_rec.origin_doc_id);
205: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action_date', p_action_ctl_rec.action_date);
198: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
203: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
204: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.origin_doc_id', p_action_ctl_rec.origin_doc_id);
205: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action_date', p_action_ctl_rec.action_date);
206: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.use_gl_date', p_action_ctl_rec.use_gl_date);
199: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
203: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
204: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.origin_doc_id', p_action_ctl_rec.origin_doc_id);
205: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action_date', p_action_ctl_rec.action_date);
206: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.use_gl_date', p_action_ctl_rec.use_gl_date);
207: END IF;
200: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
203: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
204: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.origin_doc_id', p_action_ctl_rec.origin_doc_id);
205: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action_date', p_action_ctl_rec.action_date);
206: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.use_gl_date', p_action_ctl_rec.use_gl_date);
207: END IF;
208:
201: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.note', p_action_ctl_rec.note);
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
203: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
204: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.origin_doc_id', p_action_ctl_rec.origin_doc_id);
205: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action_date', p_action_ctl_rec.action_date);
206: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.use_gl_date', p_action_ctl_rec.use_gl_date);
207: END IF;
208:
209: SAVEPOINT DA_MANUAL_CLOSE_SP;
202: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
203: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
204: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.origin_doc_id', p_action_ctl_rec.origin_doc_id);
205: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action_date', p_action_ctl_rec.action_date);
206: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.use_gl_date', p_action_ctl_rec.use_gl_date);
207: END IF;
208:
209: SAVEPOINT DA_MANUAL_CLOSE_SP;
210:
234: --
235: -- login_id can be -1; this is now allowed.
236: -- Validation of login_id, if desired, it is left to the caller
237:
238: IF (PO_LOG.d_stmt) THEN
239: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
240: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
241: END IF;
242:
235: -- login_id can be -1; this is now allowed.
236: -- Validation of login_id, if desired, it is left to the caller
237:
238: IF (PO_LOG.d_stmt) THEN
239: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
240: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
241: END IF;
242:
243: d_progress := 50;
236: -- Validation of login_id, if desired, it is left to the caller
237:
238: IF (PO_LOG.d_stmt) THEN
239: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
240: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
241: END IF;
242:
243: d_progress := 50;
244:
268:
269: d_progress := 70;
270: l_emp_id := NULL;
271:
272: IF (PO_LOG.d_stmt) THEN
273: PO_LOG.stmt(d_module, d_progress, 'user is not an employee');
274: END IF;
275:
276: END IF;
269: d_progress := 70;
270: l_emp_id := NULL;
271:
272: IF (PO_LOG.d_stmt) THEN
273: PO_LOG.stmt(d_module, d_progress, 'user is not an employee');
274: END IF;
275:
276: END IF;
277:
304: RAISE PO_CORE_S.g_early_return_exc;
305: END IF;
306:
307: d_progress := 110;
308: IF (PO_LOG.d_stmt) THEN
309: PO_LOG.stmt(d_module, d_progress, 'State check passed.');
310: END IF;
311:
312: l_sub_check_ok := manual_close_submission_check(
305: END IF;
306:
307: d_progress := 110;
308: IF (PO_LOG.d_stmt) THEN
309: PO_LOG.stmt(d_module, d_progress, 'State check passed.');
310: END IF;
311:
312: l_sub_check_ok := manual_close_submission_check(
313: p_document_id => p_action_ctl_rec.document_id
339: RAISE PO_CORE_S.g_early_return_exc;
340: END IF;
341:
342: d_progress := 140;
343: IF (PO_LOG.d_stmt) THEN
344: PO_LOG.stmt(d_module, d_progress, 'Submission check passed.');
345: END IF;
346:
347:
340: END IF;
341:
342: d_progress := 140;
343: IF (PO_LOG.d_stmt) THEN
344: PO_LOG.stmt(d_module, d_progress, 'Submission check passed.');
345: END IF;
346:
347:
348: d_progress := 200;
555:
556: EXCEPTION
557: WHEN PO_CORE_S.g_early_return_exc THEN
558: IF (l_ret_sts = 'S') THEN
559: IF (PO_LOG.d_stmt) THEN
560: PO_LOG.stmt(d_module, d_progress, d_msg);
561: END IF;
562: ELSIF (l_ret_sts = 'U') THEN
563: IF (PO_LOG.d_exc) THEN
556: EXCEPTION
557: WHEN PO_CORE_S.g_early_return_exc THEN
558: IF (l_ret_sts = 'S') THEN
559: IF (PO_LOG.d_stmt) THEN
560: PO_LOG.stmt(d_module, d_progress, d_msg);
561: END IF;
562: ELSIF (l_ret_sts = 'U') THEN
563: IF (PO_LOG.d_exc) THEN
564: PO_LOG.exc(d_module, d_progress, d_msg);
559: IF (PO_LOG.d_stmt) THEN
560: PO_LOG.stmt(d_module, d_progress, d_msg);
561: END IF;
562: ELSIF (l_ret_sts = 'U') THEN
563: IF (PO_LOG.d_exc) THEN
564: PO_LOG.exc(d_module, d_progress, d_msg);
565: END IF;
566: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
567: END IF;
560: PO_LOG.stmt(d_module, d_progress, d_msg);
561: END IF;
562: ELSIF (l_ret_sts = 'U') THEN
563: IF (PO_LOG.d_exc) THEN
564: PO_LOG.exc(d_module, d_progress, d_msg);
565: END IF;
566: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
567: END IF;
568:
573:
574: --
575: p_action_ctl_rec.return_status := l_ret_sts;
576:
577: IF (PO_LOG.d_proc) THEN
578: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
579: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
580: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.online_report_id', p_action_ctl_rec.online_report_id);
581: END IF;
574: --
575: p_action_ctl_rec.return_status := l_ret_sts;
576:
577: IF (PO_LOG.d_proc) THEN
578: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
579: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
580: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.online_report_id', p_action_ctl_rec.online_report_id);
581: END IF;
582:
575: p_action_ctl_rec.return_status := l_ret_sts;
576:
577: IF (PO_LOG.d_proc) THEN
578: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
579: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
580: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.online_report_id', p_action_ctl_rec.online_report_id);
581: END IF;
582:
583: RETURN;
576:
577: IF (PO_LOG.d_proc) THEN
578: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
579: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
580: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.online_report_id', p_action_ctl_rec.online_report_id);
581: END IF;
582:
583: RETURN;
584:
587: p_action_ctl_rec.return_status := 'U';
588:
589: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
590:
591: IF (PO_LOG.d_exc) THEN
592: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
593: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
594: PO_LOG.proc_return(d_module, FALSE);
595: PO_LOG.proc_end(d_module);
588:
589: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
590:
591: IF (PO_LOG.d_exc) THEN
592: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
593: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
594: PO_LOG.proc_return(d_module, FALSE);
595: PO_LOG.proc_end(d_module);
596: END IF;
589: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
590:
591: IF (PO_LOG.d_exc) THEN
592: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
593: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
594: PO_LOG.proc_return(d_module, FALSE);
595: PO_LOG.proc_end(d_module);
596: END IF;
597:
590:
591: IF (PO_LOG.d_exc) THEN
592: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
593: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
594: PO_LOG.proc_return(d_module, FALSE);
595: PO_LOG.proc_end(d_module);
596: END IF;
597:
598: IF (l_rollback_flag) THEN
591: IF (PO_LOG.d_exc) THEN
592: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
593: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
594: PO_LOG.proc_return(d_module, FALSE);
595: PO_LOG.proc_end(d_module);
596: END IF;
597:
598: IF (l_rollback_flag) THEN
599: ROLLBACK TO DA_MANUAL_CLOSE_SP;
658:
659: BEGIN
660:
661: d_progress := 0;
662: IF (PO_LOG.d_proc) THEN
663: PO_LOG.proc_begin(d_module);
664: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
665: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
659: BEGIN
660:
661: d_progress := 0;
662: IF (PO_LOG.d_proc) THEN
663: PO_LOG.proc_begin(d_module);
664: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
665: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
660:
661: d_progress := 0;
662: IF (PO_LOG.d_proc) THEN
663: PO_LOG.proc_begin(d_module);
664: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
665: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
668: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
661: d_progress := 0;
662: IF (PO_LOG.d_proc) THEN
663: PO_LOG.proc_begin(d_module);
664: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
665: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
668: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
669: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
662: IF (PO_LOG.d_proc) THEN
663: PO_LOG.proc_begin(d_module);
664: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
665: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
668: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
669: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
670: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
663: PO_LOG.proc_begin(d_module);
664: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
665: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
668: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
669: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
670: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
671: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
664: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
665: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
668: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
669: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
670: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
671: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
672: END IF;
665: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
668: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
669: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
670: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
671: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
672: END IF;
673:
666: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
668: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
669: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
670: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
671: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
672: END IF;
673:
674: d_progress := 3;
667: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
668: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
669: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
670: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
671: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
672: END IF;
673:
674: d_progress := 3;
675: l_reason := FND_MESSAGE.GET_STRING('PO', 'PO_UPDATE_CLOSE_ROLLUP');
714:
715: --
716: -- login_id can be -1; this is now allowed.
717:
718: IF (PO_LOG.d_stmt) THEN
719: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
720: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
721: END IF;
722:
715: --
716: -- login_id can be -1; this is now allowed.
717:
718: IF (PO_LOG.d_stmt) THEN
719: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
720: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
721: END IF;
722:
723: d_progress := 50;
716: -- login_id can be -1; this is now allowed.
717:
718: IF (PO_LOG.d_stmt) THEN
719: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
720: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
721: END IF;
722:
723: d_progress := 50;
724:
742:
743: d_progress := 70;
744: l_emp_id := NULL;
745:
746: IF (PO_LOG.d_stmt) THEN
747: PO_LOG.stmt(d_module, d_progress, 'user is not an employee');
748: END IF;
749:
750: END IF;
743: d_progress := 70;
744: l_emp_id := NULL;
745:
746: IF (PO_LOG.d_stmt) THEN
747: PO_LOG.stmt(d_module, d_progress, 'user is not an employee');
748: END IF;
749:
750: END IF;
751:
776: RAISE PO_CORE_S.g_early_return_exc;
777: END IF;
778:
779: d_progress := 110;
780: IF (PO_LOG.d_stmt) THEN
781: PO_LOG.stmt(d_module, d_progress, 'State check passed.');
782: END IF;
783:
784: auto_update_closed_status(
777: END IF;
778:
779: d_progress := 110;
780: IF (PO_LOG.d_stmt) THEN
781: PO_LOG.stmt(d_module, d_progress, 'State check passed.');
782: END IF;
783:
784: auto_update_closed_status(
785: p_document_id => p_action_ctl_rec.document_id
872:
873: EXCEPTION
874: WHEN PO_CORE_S.g_early_return_exc THEN
875: IF (l_ret_sts = 'S') THEN
876: IF (PO_LOG.d_stmt) THEN
877: PO_LOG.stmt(d_module, d_progress, d_msg);
878: END IF;
879: ELSIF (l_ret_sts = 'U') THEN
880: IF (PO_LOG.d_exc) THEN
873: EXCEPTION
874: WHEN PO_CORE_S.g_early_return_exc THEN
875: IF (l_ret_sts = 'S') THEN
876: IF (PO_LOG.d_stmt) THEN
877: PO_LOG.stmt(d_module, d_progress, d_msg);
878: END IF;
879: ELSIF (l_ret_sts = 'U') THEN
880: IF (PO_LOG.d_exc) THEN
881: PO_LOG.exc(d_module, d_progress, d_msg);
876: IF (PO_LOG.d_stmt) THEN
877: PO_LOG.stmt(d_module, d_progress, d_msg);
878: END IF;
879: ELSIF (l_ret_sts = 'U') THEN
880: IF (PO_LOG.d_exc) THEN
881: PO_LOG.exc(d_module, d_progress, d_msg);
882: END IF;
883: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
884: END IF;
877: PO_LOG.stmt(d_module, d_progress, d_msg);
878: END IF;
879: ELSIF (l_ret_sts = 'U') THEN
880: IF (PO_LOG.d_exc) THEN
881: PO_LOG.exc(d_module, d_progress, d_msg);
882: END IF;
883: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
884: END IF;
885: END;
885: END;
886:
887: p_action_ctl_rec.return_status := l_ret_sts;
888:
889: IF (PO_LOG.d_proc) THEN
890: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
891: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
892: END IF;
893:
886:
887: p_action_ctl_rec.return_status := l_ret_sts;
888:
889: IF (PO_LOG.d_proc) THEN
890: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
891: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
892: END IF;
893:
894: RETURN;
887: p_action_ctl_rec.return_status := l_ret_sts;
888:
889: IF (PO_LOG.d_proc) THEN
890: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
891: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
892: END IF;
893:
894: RETURN;
895:
898: p_action_ctl_rec.return_status := 'U';
899:
900: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
901:
902: IF (PO_LOG.d_exc) THEN
903: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
904: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
905: PO_LOG.proc_return(d_module, FALSE);
906: PO_LOG.proc_end(d_module);
899:
900: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
901:
902: IF (PO_LOG.d_exc) THEN
903: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
904: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
905: PO_LOG.proc_return(d_module, FALSE);
906: PO_LOG.proc_end(d_module);
907: END IF;
900: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
901:
902: IF (PO_LOG.d_exc) THEN
903: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
904: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
905: PO_LOG.proc_return(d_module, FALSE);
906: PO_LOG.proc_end(d_module);
907: END IF;
908:
901:
902: IF (PO_LOG.d_exc) THEN
903: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
904: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
905: PO_LOG.proc_return(d_module, FALSE);
906: PO_LOG.proc_end(d_module);
907: END IF;
908:
909: RETURN;
902: IF (PO_LOG.d_exc) THEN
903: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
904: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
905: PO_LOG.proc_return(d_module, FALSE);
906: PO_LOG.proc_end(d_module);
907: END IF;
908:
909: RETURN;
910:
990:
991: BEGIN
992:
993: d_progress := 0;
994: IF (PO_LOG.d_proc) THEN
995: PO_LOG.proc_begin(d_module);
996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
998: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
991: BEGIN
992:
993: d_progress := 0;
994: IF (PO_LOG.d_proc) THEN
995: PO_LOG.proc_begin(d_module);
996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
998: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
999: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
992:
993: d_progress := 0;
994: IF (PO_LOG.d_proc) THEN
995: PO_LOG.proc_begin(d_module);
996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
998: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
999: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1000: PO_LOG.proc_begin(d_module, 'p_action', p_action);
993: d_progress := 0;
994: IF (PO_LOG.d_proc) THEN
995: PO_LOG.proc_begin(d_module);
996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
998: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
999: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1000: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1001: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
994: IF (PO_LOG.d_proc) THEN
995: PO_LOG.proc_begin(d_module);
996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
998: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
999: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1000: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1001: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1002: END IF;
995: PO_LOG.proc_begin(d_module);
996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
998: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
999: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1000: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1001: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1002: END IF;
1003:
996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
998: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
999: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1000: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1001: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1002: END IF;
1003:
1004: BEGIN
997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
998: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
999: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1000: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1001: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1002: END IF;
1003:
1004: BEGIN
1005:
1156:
1157: EXCEPTION
1158: WHEN PO_CORE_S.g_early_return_exc THEN
1159: IF (l_ret_sts = 'S') THEN
1160: IF (PO_LOG.d_stmt) THEN
1161: PO_LOG.stmt(d_module, d_progress, d_msg);
1162: END IF;
1163: ELSIF (l_ret_sts = 'U') THEN
1164: IF (PO_LOG.d_exc) THEN
1157: EXCEPTION
1158: WHEN PO_CORE_S.g_early_return_exc THEN
1159: IF (l_ret_sts = 'S') THEN
1160: IF (PO_LOG.d_stmt) THEN
1161: PO_LOG.stmt(d_module, d_progress, d_msg);
1162: END IF;
1163: ELSIF (l_ret_sts = 'U') THEN
1164: IF (PO_LOG.d_exc) THEN
1165: PO_LOG.exc(d_module, d_progress, d_msg);
1160: IF (PO_LOG.d_stmt) THEN
1161: PO_LOG.stmt(d_module, d_progress, d_msg);
1162: END IF;
1163: ELSIF (l_ret_sts = 'U') THEN
1164: IF (PO_LOG.d_exc) THEN
1165: PO_LOG.exc(d_module, d_progress, d_msg);
1166: END IF;
1167: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1168: l_ret_val := FALSE;
1161: PO_LOG.stmt(d_module, d_progress, d_msg);
1162: END IF;
1163: ELSIF (l_ret_sts = 'U') THEN
1164: IF (PO_LOG.d_exc) THEN
1165: PO_LOG.exc(d_module, d_progress, d_msg);
1166: END IF;
1167: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1168: l_ret_val := FALSE;
1169: END IF;
1170: END;
1171:
1172: x_return_status := l_ret_sts;
1173:
1174: IF (PO_LOG.d_proc) THEN
1175: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1176: PO_LOG.proc_return(d_module, l_ret_val);
1177: PO_LOG.proc_end(d_module);
1178: END IF;
1171:
1172: x_return_status := l_ret_sts;
1173:
1174: IF (PO_LOG.d_proc) THEN
1175: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1176: PO_LOG.proc_return(d_module, l_ret_val);
1177: PO_LOG.proc_end(d_module);
1178: END IF;
1179:
1172: x_return_status := l_ret_sts;
1173:
1174: IF (PO_LOG.d_proc) THEN
1175: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1176: PO_LOG.proc_return(d_module, l_ret_val);
1177: PO_LOG.proc_end(d_module);
1178: END IF;
1179:
1180: RETURN l_ret_val;
1173:
1174: IF (PO_LOG.d_proc) THEN
1175: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1176: PO_LOG.proc_return(d_module, l_ret_val);
1177: PO_LOG.proc_end(d_module);
1178: END IF;
1179:
1180: RETURN l_ret_val;
1181:
1184: x_return_status := 'U';
1185:
1186: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1187:
1188: IF (PO_LOG.d_exc) THEN
1189: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1190: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1191: PO_LOG.proc_return(d_module, FALSE);
1192: PO_LOG.proc_end(d_module);
1185:
1186: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1187:
1188: IF (PO_LOG.d_exc) THEN
1189: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1190: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1191: PO_LOG.proc_return(d_module, FALSE);
1192: PO_LOG.proc_end(d_module);
1193: END IF;
1186: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1187:
1188: IF (PO_LOG.d_exc) THEN
1189: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1190: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1191: PO_LOG.proc_return(d_module, FALSE);
1192: PO_LOG.proc_end(d_module);
1193: END IF;
1194:
1187:
1188: IF (PO_LOG.d_exc) THEN
1189: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1190: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1191: PO_LOG.proc_return(d_module, FALSE);
1192: PO_LOG.proc_end(d_module);
1193: END IF;
1194:
1195: RETURN FALSE;
1188: IF (PO_LOG.d_exc) THEN
1189: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1190: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1191: PO_LOG.proc_return(d_module, FALSE);
1192: PO_LOG.proc_end(d_module);
1193: END IF;
1194:
1195: RETURN FALSE;
1196:
1261:
1262: BEGIN
1263:
1264: d_progress := 0;
1265: IF (PO_LOG.d_proc) THEN
1266: PO_LOG.proc_begin(d_module);
1267: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1268: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1269: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1262: BEGIN
1263:
1264: d_progress := 0;
1265: IF (PO_LOG.d_proc) THEN
1266: PO_LOG.proc_begin(d_module);
1267: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1268: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1269: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1270: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1263:
1264: d_progress := 0;
1265: IF (PO_LOG.d_proc) THEN
1266: PO_LOG.proc_begin(d_module);
1267: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1268: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1269: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1270: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1271: END IF;
1264: d_progress := 0;
1265: IF (PO_LOG.d_proc) THEN
1266: PO_LOG.proc_begin(d_module);
1267: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1268: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1269: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1270: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1271: END IF;
1272:
1265: IF (PO_LOG.d_proc) THEN
1266: PO_LOG.proc_begin(d_module);
1267: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1268: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1269: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1270: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1271: END IF;
1272:
1273: BEGIN
1266: PO_LOG.proc_begin(d_module);
1267: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1268: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1269: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1270: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1271: END IF;
1272:
1273: BEGIN
1274:
1317:
1318: EXCEPTION
1319: WHEN PO_CORE_S.g_early_return_exc THEN
1320: IF (l_ret_sts = 'S') THEN
1321: IF (PO_LOG.d_stmt) THEN
1322: PO_LOG.stmt(d_module, d_progress, d_msg);
1323: END IF;
1324: ELSIF (l_ret_sts = 'U') THEN
1325: IF (PO_LOG.d_exc) THEN
1318: EXCEPTION
1319: WHEN PO_CORE_S.g_early_return_exc THEN
1320: IF (l_ret_sts = 'S') THEN
1321: IF (PO_LOG.d_stmt) THEN
1322: PO_LOG.stmt(d_module, d_progress, d_msg);
1323: END IF;
1324: ELSIF (l_ret_sts = 'U') THEN
1325: IF (PO_LOG.d_exc) THEN
1326: PO_LOG.exc(d_module, d_progress, d_msg);
1321: IF (PO_LOG.d_stmt) THEN
1322: PO_LOG.stmt(d_module, d_progress, d_msg);
1323: END IF;
1324: ELSIF (l_ret_sts = 'U') THEN
1325: IF (PO_LOG.d_exc) THEN
1326: PO_LOG.exc(d_module, d_progress, d_msg);
1327: END IF;
1328: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1329: l_ret_val := FALSE;
1322: PO_LOG.stmt(d_module, d_progress, d_msg);
1323: END IF;
1324: ELSIF (l_ret_sts = 'U') THEN
1325: IF (PO_LOG.d_exc) THEN
1326: PO_LOG.exc(d_module, d_progress, d_msg);
1327: END IF;
1328: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1329: l_ret_val := FALSE;
1330: END IF;
1331: END;
1332:
1333: x_return_status := l_ret_sts;
1334:
1335: IF (PO_LOG.d_proc) THEN
1336: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1337: PO_LOG.proc_return(d_module, l_ret_val);
1338: PO_LOG.proc_end(d_module);
1339: END IF;
1332:
1333: x_return_status := l_ret_sts;
1334:
1335: IF (PO_LOG.d_proc) THEN
1336: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1337: PO_LOG.proc_return(d_module, l_ret_val);
1338: PO_LOG.proc_end(d_module);
1339: END IF;
1340:
1333: x_return_status := l_ret_sts;
1334:
1335: IF (PO_LOG.d_proc) THEN
1336: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1337: PO_LOG.proc_return(d_module, l_ret_val);
1338: PO_LOG.proc_end(d_module);
1339: END IF;
1340:
1341: RETURN l_ret_val;
1334:
1335: IF (PO_LOG.d_proc) THEN
1336: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1337: PO_LOG.proc_return(d_module, l_ret_val);
1338: PO_LOG.proc_end(d_module);
1339: END IF;
1340:
1341: RETURN l_ret_val;
1342:
1345: x_return_status := 'U';
1346:
1347: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1348:
1349: IF (PO_LOG.d_exc) THEN
1350: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1351: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1352: PO_LOG.proc_return(d_module, FALSE);
1353: PO_LOG.proc_end(d_module);
1346:
1347: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1348:
1349: IF (PO_LOG.d_exc) THEN
1350: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1351: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1352: PO_LOG.proc_return(d_module, FALSE);
1353: PO_LOG.proc_end(d_module);
1354: END IF;
1347: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1348:
1349: IF (PO_LOG.d_exc) THEN
1350: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1351: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1352: PO_LOG.proc_return(d_module, FALSE);
1353: PO_LOG.proc_end(d_module);
1354: END IF;
1355:
1348:
1349: IF (PO_LOG.d_exc) THEN
1350: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1351: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1352: PO_LOG.proc_return(d_module, FALSE);
1353: PO_LOG.proc_end(d_module);
1354: END IF;
1355:
1356: RETURN FALSE;
1349: IF (PO_LOG.d_exc) THEN
1350: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1351: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1352: PO_LOG.proc_return(d_module, FALSE);
1353: PO_LOG.proc_end(d_module);
1354: END IF;
1355:
1356: RETURN FALSE;
1357:
1443:
1444: BEGIN
1445:
1446: d_progress := 0;
1447: IF (PO_LOG.d_proc) THEN
1448: PO_LOG.proc_begin(d_module);
1449: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1450: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1451: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1444: BEGIN
1445:
1446: d_progress := 0;
1447: IF (PO_LOG.d_proc) THEN
1448: PO_LOG.proc_begin(d_module);
1449: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1450: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1451: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1452: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1445:
1446: d_progress := 0;
1447: IF (PO_LOG.d_proc) THEN
1448: PO_LOG.proc_begin(d_module);
1449: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1450: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1451: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1452: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1453: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1446: d_progress := 0;
1447: IF (PO_LOG.d_proc) THEN
1448: PO_LOG.proc_begin(d_module);
1449: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1450: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1451: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1452: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1453: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1454: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1447: IF (PO_LOG.d_proc) THEN
1448: PO_LOG.proc_begin(d_module);
1449: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1450: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1451: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1452: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1453: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1454: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1455: END IF;
1448: PO_LOG.proc_begin(d_module);
1449: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1450: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1451: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1452: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1453: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1454: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1455: END IF;
1456:
1449: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1450: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1451: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1452: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1453: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1454: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1455: END IF;
1456:
1457: BEGIN
1450: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1451: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1452: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1453: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1454: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1455: END IF;
1456:
1457: BEGIN
1458:
1492: END IF;
1493:
1494: d_progress := 110;
1495:
1496: IF (PO_LOG.d_stmt) THEN
1497: PO_LOG.stmt(d_module, d_progress, 'l_document_level', l_document_level);
1498: PO_LOG.stmt(d_module, d_progress, 'l_document_level_id', l_document_level_id);
1499: END IF;
1500:
1493:
1494: d_progress := 110;
1495:
1496: IF (PO_LOG.d_stmt) THEN
1497: PO_LOG.stmt(d_module, d_progress, 'l_document_level', l_document_level);
1498: PO_LOG.stmt(d_module, d_progress, 'l_document_level_id', l_document_level_id);
1499: END IF;
1500:
1501: PO_DOCUMENT_CHECKS_GRP.po_submission_check(
1494: d_progress := 110;
1495:
1496: IF (PO_LOG.d_stmt) THEN
1497: PO_LOG.stmt(d_module, d_progress, 'l_document_level', l_document_level);
1498: PO_LOG.stmt(d_module, d_progress, 'l_document_level_id', l_document_level_id);
1499: END IF;
1500:
1501: PO_DOCUMENT_CHECKS_GRP.po_submission_check(
1502: p_api_version => 1.0
1577:
1578: EXCEPTION
1579: WHEN PO_CORE_S.g_early_return_exc THEN
1580: IF (l_ret_sts = 'S') THEN
1581: IF (PO_LOG.d_stmt) THEN
1582: PO_LOG.stmt(d_module, d_progress, d_msg);
1583: END IF;
1584: ELSIF (l_ret_sts = 'U') THEN
1585: IF (PO_LOG.d_exc) THEN
1578: EXCEPTION
1579: WHEN PO_CORE_S.g_early_return_exc THEN
1580: IF (l_ret_sts = 'S') THEN
1581: IF (PO_LOG.d_stmt) THEN
1582: PO_LOG.stmt(d_module, d_progress, d_msg);
1583: END IF;
1584: ELSIF (l_ret_sts = 'U') THEN
1585: IF (PO_LOG.d_exc) THEN
1586: PO_LOG.exc(d_module, d_progress, d_msg);
1581: IF (PO_LOG.d_stmt) THEN
1582: PO_LOG.stmt(d_module, d_progress, d_msg);
1583: END IF;
1584: ELSIF (l_ret_sts = 'U') THEN
1585: IF (PO_LOG.d_exc) THEN
1586: PO_LOG.exc(d_module, d_progress, d_msg);
1587: END IF;
1588: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1589: l_ret_val := FALSE;
1582: PO_LOG.stmt(d_module, d_progress, d_msg);
1583: END IF;
1584: ELSIF (l_ret_sts = 'U') THEN
1585: IF (PO_LOG.d_exc) THEN
1586: PO_LOG.exc(d_module, d_progress, d_msg);
1587: END IF;
1588: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1589: l_ret_val := FALSE;
1590: END IF;
1591: END;
1592:
1593: x_return_status := l_ret_sts;
1594:
1595: IF (PO_LOG.d_proc) THEN
1596: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1597: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1598: PO_LOG.proc_return(d_module, l_ret_val);
1599: PO_LOG.proc_end(d_module);
1592:
1593: x_return_status := l_ret_sts;
1594:
1595: IF (PO_LOG.d_proc) THEN
1596: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1597: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1598: PO_LOG.proc_return(d_module, l_ret_val);
1599: PO_LOG.proc_end(d_module);
1600: END IF;
1593: x_return_status := l_ret_sts;
1594:
1595: IF (PO_LOG.d_proc) THEN
1596: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1597: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1598: PO_LOG.proc_return(d_module, l_ret_val);
1599: PO_LOG.proc_end(d_module);
1600: END IF;
1601:
1594:
1595: IF (PO_LOG.d_proc) THEN
1596: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1597: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1598: PO_LOG.proc_return(d_module, l_ret_val);
1599: PO_LOG.proc_end(d_module);
1600: END IF;
1601:
1602: RETURN l_ret_val;
1595: IF (PO_LOG.d_proc) THEN
1596: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1597: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1598: PO_LOG.proc_return(d_module, l_ret_val);
1599: PO_LOG.proc_end(d_module);
1600: END IF;
1601:
1602: RETURN l_ret_val;
1603:
1606: x_return_status := 'U';
1607:
1608: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1609:
1610: IF (PO_LOG.d_exc) THEN
1611: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1612: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1613: PO_LOG.proc_return(d_module, FALSE);
1614: PO_LOG.proc_end(d_module);
1607:
1608: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1609:
1610: IF (PO_LOG.d_exc) THEN
1611: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1612: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1613: PO_LOG.proc_return(d_module, FALSE);
1614: PO_LOG.proc_end(d_module);
1615: END IF;
1608: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1609:
1610: IF (PO_LOG.d_exc) THEN
1611: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1612: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1613: PO_LOG.proc_return(d_module, FALSE);
1614: PO_LOG.proc_end(d_module);
1615: END IF;
1616:
1609:
1610: IF (PO_LOG.d_exc) THEN
1611: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1612: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1613: PO_LOG.proc_return(d_module, FALSE);
1614: PO_LOG.proc_end(d_module);
1615: END IF;
1616:
1617: RETURN FALSE;
1610: IF (PO_LOG.d_exc) THEN
1611: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1612: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1613: PO_LOG.proc_return(d_module, FALSE);
1614: PO_LOG.proc_end(d_module);
1615: END IF;
1616:
1617: RETURN FALSE;
1618:
1714:
1715: BEGIN
1716:
1717: d_progress := 0;
1718: IF (PO_LOG.d_proc) THEN
1719: PO_LOG.proc_begin(d_module);
1720: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1721: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1715: BEGIN
1716:
1717: d_progress := 0;
1718: IF (PO_LOG.d_proc) THEN
1719: PO_LOG.proc_begin(d_module);
1720: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1721: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1716:
1717: d_progress := 0;
1718: IF (PO_LOG.d_proc) THEN
1719: PO_LOG.proc_begin(d_module);
1720: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1721: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1717: d_progress := 0;
1718: IF (PO_LOG.d_proc) THEN
1719: PO_LOG.proc_begin(d_module);
1720: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1721: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1725: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1718: IF (PO_LOG.d_proc) THEN
1719: PO_LOG.proc_begin(d_module);
1720: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1721: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1725: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1726: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1719: PO_LOG.proc_begin(d_module);
1720: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1721: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1725: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1726: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1727: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1720: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1721: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1725: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1726: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1727: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1728: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1721: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1725: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1726: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1727: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1728: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1729: END IF;
1722: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1725: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1726: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1727: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1728: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1729: END IF;
1730:
1723: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1725: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1726: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1727: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1728: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1729: END IF;
1730:
1731: BEGIN
1724: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1725: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1726: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1727: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1728: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1729: END IF;
1730:
1731: BEGIN
1732:
1750: THEN
1751:
1752: d_progress := 30;
1753:
1754: IF (PO_LOG.d_stmt) THEN
1755: PO_LOG.stmt(d_module, d_progress, 'Trying to finally close/open invoice a BPA, but not at header level.');
1756: END IF;
1757:
1758: l_enc_flag := FALSE;
1751:
1752: d_progress := 30;
1753:
1754: IF (PO_LOG.d_stmt) THEN
1755: PO_LOG.stmt(d_module, d_progress, 'Trying to finally close/open invoice a BPA, but not at header level.');
1756: END IF;
1757:
1758: l_enc_flag := FALSE;
1759:
1766: FROM po_headers_all poh
1767: WHERE poh.po_header_id = p_document_id;
1768:
1769: d_progress := 50;
1770: IF (PO_LOG.d_stmt) THEN
1771: PO_LOG.stmt(d_module, d_progress, 'l_bpa_enc_required', l_bpa_enc_required);
1772: END IF;
1773:
1774: IF (l_bpa_enc_required = 'Y')
1767: WHERE poh.po_header_id = p_document_id;
1768:
1769: d_progress := 50;
1770: IF (PO_LOG.d_stmt) THEN
1771: PO_LOG.stmt(d_module, d_progress, 'l_bpa_enc_required', l_bpa_enc_required);
1772: END IF;
1773:
1774: IF (l_bpa_enc_required = 'Y')
1775: THEN
1782:
1783: END IF; -- if l_enc_flag and document_type = 'PA' ...
1784:
1785: d_progress := 60;
1786: IF (PO_LOG.d_stmt) THEN
1787: PO_LOG.stmt(d_module, d_progress, 'l_enc_flag', l_enc_flag);
1788: END IF;
1789:
1790: IF (NOT l_enc_flag) THEN
1783: END IF; -- if l_enc_flag and document_type = 'PA' ...
1784:
1785: d_progress := 60;
1786: IF (PO_LOG.d_stmt) THEN
1787: PO_LOG.stmt(d_module, d_progress, 'l_enc_flag', l_enc_flag);
1788: END IF;
1789:
1790: IF (NOT l_enc_flag) THEN
1791: d_progress := 70;
1869: END IF;
1870:
1871: d_progress := 120;
1872:
1873: IF (PO_LOG.d_stmt) THEN
1874: PO_LOG.stmt(d_module, d_progress, 'l_enc_ret_code', l_enc_ret_code);
1875: PO_LOG.stmt(d_module, d_progress, 'x_online_report_id', x_online_report_id);
1876: END IF;
1877:
1870:
1871: d_progress := 120;
1872:
1873: IF (PO_LOG.d_stmt) THEN
1874: PO_LOG.stmt(d_module, d_progress, 'l_enc_ret_code', l_enc_ret_code);
1875: PO_LOG.stmt(d_module, d_progress, 'x_online_report_id', x_online_report_id);
1876: END IF;
1877:
1878:
1871: d_progress := 120;
1872:
1873: IF (PO_LOG.d_stmt) THEN
1874: PO_LOG.stmt(d_module, d_progress, 'l_enc_ret_code', l_enc_ret_code);
1875: PO_LOG.stmt(d_module, d_progress, 'x_online_report_id', x_online_report_id);
1876: END IF;
1877:
1878:
1879: IF ((l_enc_ret_code = PO_DOCUMENT_FUNDS_PVT.g_return_SUCCESS)
1913: RAISE PO_CORE_S.g_early_return_exc;
1914:
1915: END IF; -- if l_enc_ret_code IN (...)
1916:
1917: IF (PO_LOG.d_stmt) THEN
1918: PO_LOG.stmt(d_module, d_progress, d_msg);
1919: END IF;
1920:
1921: l_ret_sts := 'S';
1914:
1915: END IF; -- if l_enc_ret_code IN (...)
1916:
1917: IF (PO_LOG.d_stmt) THEN
1918: PO_LOG.stmt(d_module, d_progress, d_msg);
1919: END IF;
1920:
1921: l_ret_sts := 'S';
1922:
1922:
1923: EXCEPTION
1924: WHEN PO_CORE_S.g_early_return_exc THEN
1925: IF (l_ret_sts = 'S') THEN
1926: IF (PO_LOG.d_stmt) THEN
1927: PO_LOG.stmt(d_module, d_progress, d_msg);
1928: END IF;
1929: x_enc_flag := l_enc_flag;
1930: ELSIF (l_ret_sts = 'U') THEN
1923: EXCEPTION
1924: WHEN PO_CORE_S.g_early_return_exc THEN
1925: IF (l_ret_sts = 'S') THEN
1926: IF (PO_LOG.d_stmt) THEN
1927: PO_LOG.stmt(d_module, d_progress, d_msg);
1928: END IF;
1929: x_enc_flag := l_enc_flag;
1930: ELSIF (l_ret_sts = 'U') THEN
1931: IF (PO_LOG.d_exc) THEN
1927: PO_LOG.stmt(d_module, d_progress, d_msg);
1928: END IF;
1929: x_enc_flag := l_enc_flag;
1930: ELSIF (l_ret_sts = 'U') THEN
1931: IF (PO_LOG.d_exc) THEN
1932: PO_LOG.exc(d_module, d_progress, d_msg);
1933: END IF;
1934: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1935: END IF;
1928: END IF;
1929: x_enc_flag := l_enc_flag;
1930: ELSIF (l_ret_sts = 'U') THEN
1931: IF (PO_LOG.d_exc) THEN
1932: PO_LOG.exc(d_module, d_progress, d_msg);
1933: END IF;
1934: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1935: END IF;
1936: END;
1936: END;
1937:
1938: x_return_status := l_ret_sts;
1939:
1940: IF (PO_LOG.d_proc) THEN
1941: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1942: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1943: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1944: PO_LOG.proc_end(d_module);
1937:
1938: x_return_status := l_ret_sts;
1939:
1940: IF (PO_LOG.d_proc) THEN
1941: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1942: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1943: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1944: PO_LOG.proc_end(d_module);
1945: END IF;
1938: x_return_status := l_ret_sts;
1939:
1940: IF (PO_LOG.d_proc) THEN
1941: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1942: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1943: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1944: PO_LOG.proc_end(d_module);
1945: END IF;
1946:
1939:
1940: IF (PO_LOG.d_proc) THEN
1941: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1942: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1943: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1944: PO_LOG.proc_end(d_module);
1945: END IF;
1946:
1947: RETURN;
1940: IF (PO_LOG.d_proc) THEN
1941: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1942: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1943: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1944: PO_LOG.proc_end(d_module);
1945: END IF;
1946:
1947: RETURN;
1948:
1951: x_return_status := 'U';
1952:
1953: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1954:
1955: IF (PO_LOG.d_exc) THEN
1956: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1957: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1958: PO_LOG.proc_end(d_module);
1959: END IF;
1952:
1953: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1954:
1955: IF (PO_LOG.d_exc) THEN
1956: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1957: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1958: PO_LOG.proc_end(d_module);
1959: END IF;
1960:
1953: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1954:
1955: IF (PO_LOG.d_exc) THEN
1956: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1957: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1958: PO_LOG.proc_end(d_module);
1959: END IF;
1960:
1961: RETURN;
1954:
1955: IF (PO_LOG.d_exc) THEN
1956: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1957: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1958: PO_LOG.proc_end(d_module);
1959: END IF;
1960:
1961: RETURN;
1962:
1990:
1991: BEGIN
1992:
1993: d_progress := 0;
1994: IF (PO_LOG.d_proc) THEN
1995: PO_LOG.proc_begin(d_module);
1996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1991: BEGIN
1992:
1993: d_progress := 0;
1994: IF (PO_LOG.d_proc) THEN
1995: PO_LOG.proc_begin(d_module);
1996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1992:
1993: d_progress := 0;
1994: IF (PO_LOG.d_proc) THEN
1995: PO_LOG.proc_begin(d_module);
1996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1993: d_progress := 0;
1994: IF (PO_LOG.d_proc) THEN
1995: PO_LOG.proc_begin(d_module);
1996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1994: IF (PO_LOG.d_proc) THEN
1995: PO_LOG.proc_begin(d_module);
1996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1995: PO_LOG.proc_begin(d_module);
1996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1996: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2004: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1997: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2004: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2005: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1998: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2004: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2005: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2006: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1999: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2004: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2005: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2006: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2007: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
2000: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2004: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2005: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2006: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2007: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
2008: END IF;
2001: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2004: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2005: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2006: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2007: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
2008: END IF;
2009:
2002: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2004: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2005: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2006: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2007: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
2008: END IF;
2009:
2010: d_progress := 10;
2003: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2004: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2005: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2006: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2007: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
2008: END IF;
2009:
2010: d_progress := 10;
2011:
2250: d_progress := 46;
2251:
2252: END IF; -- p_document_type = ..
2253:
2254: IF (PO_LOG.d_stmt) THEN
2255: PO_LOG.stmt(d_module, d_progress, 'Updated' || SQL%ROWCOUNT || ' closed code rows.' );
2256: END IF;
2257:
2258: d_progress := 100;
2251:
2252: END IF; -- p_document_type = ..
2253:
2254: IF (PO_LOG.d_stmt) THEN
2255: PO_LOG.stmt(d_module, d_progress, 'Updated' || SQL%ROWCOUNT || ' closed code rows.' );
2256: END IF;
2257:
2258: d_progress := 100;
2259:
2332: ;
2333:
2334: d_progress := 160;
2335:
2336: IF (PO_LOG.d_stmt) THEN
2337: PO_LOG.stmt(d_module, d_progress, 'Updated' || SQL%ROWCOUNT || ' distribution gl_closed_dates' );
2338: END IF;
2339:
2340: END IF; -- if p_action = 'FINALLY CLOSE' OR ...
2333:
2334: d_progress := 160;
2335:
2336: IF (PO_LOG.d_stmt) THEN
2337: PO_LOG.stmt(d_module, d_progress, 'Updated' || SQL%ROWCOUNT || ' distribution gl_closed_dates' );
2338: END IF;
2339:
2340: END IF; -- if p_action = 'FINALLY CLOSE' OR ...
2341:
2340: END IF; -- if p_action = 'FINALLY CLOSE' OR ...
2341:
2342: x_return_status := 'S';
2343:
2344: IF (PO_LOG.d_proc) THEN
2345: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2346: PO_LOG.proc_end(d_module);
2347: END IF;
2348:
2341:
2342: x_return_status := 'S';
2343:
2344: IF (PO_LOG.d_proc) THEN
2345: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2346: PO_LOG.proc_end(d_module);
2347: END IF;
2348:
2349: EXCEPTION
2342: x_return_status := 'S';
2343:
2344: IF (PO_LOG.d_proc) THEN
2345: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2346: PO_LOG.proc_end(d_module);
2347: END IF;
2348:
2349: EXCEPTION
2350: WHEN others THEN
2351: x_return_status := 'U';
2352:
2353: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2354:
2355: IF (PO_LOG.d_exc) THEN
2356: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2357: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2358: PO_LOG.proc_end(d_module);
2359: END IF;
2352:
2353: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2354:
2355: IF (PO_LOG.d_exc) THEN
2356: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2357: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2358: PO_LOG.proc_end(d_module);
2359: END IF;
2360:
2353: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2354:
2355: IF (PO_LOG.d_exc) THEN
2356: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2357: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2358: PO_LOG.proc_end(d_module);
2359: END IF;
2360:
2361: RETURN;
2354:
2355: IF (PO_LOG.d_exc) THEN
2356: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2357: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2358: PO_LOG.proc_end(d_module);
2359: END IF;
2360:
2361: RETURN;
2362:
2391:
2392: BEGIN
2393:
2394: d_progress := 0;
2395: IF (PO_LOG.d_proc) THEN
2396: PO_LOG.proc_begin(d_module);
2397: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2398: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2399: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2392: BEGIN
2393:
2394: d_progress := 0;
2395: IF (PO_LOG.d_proc) THEN
2396: PO_LOG.proc_begin(d_module);
2397: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2398: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2399: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2400: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2393:
2394: d_progress := 0;
2395: IF (PO_LOG.d_proc) THEN
2396: PO_LOG.proc_begin(d_module);
2397: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2398: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2399: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2400: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2401: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2394: d_progress := 0;
2395: IF (PO_LOG.d_proc) THEN
2396: PO_LOG.proc_begin(d_module);
2397: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2398: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2399: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2400: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2401: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2402: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2395: IF (PO_LOG.d_proc) THEN
2396: PO_LOG.proc_begin(d_module);
2397: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2398: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2399: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2400: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2401: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2402: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2403: END IF;
2396: PO_LOG.proc_begin(d_module);
2397: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2398: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2399: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2400: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2401: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2402: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2403: END IF;
2404:
2397: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2398: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2399: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2400: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2401: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2402: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2403: END IF;
2404:
2405: --BUG8668066 FP
2398: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2399: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2400: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2401: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2402: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2403: END IF;
2404:
2405: --BUG8668066 FP
2406: d_progress := 1;
3060: d_progress := 220;
3061:
3062: x_return_status := 'S';
3063:
3064: IF (PO_LOG.d_proc) THEN
3065: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3066: PO_LOG.proc_end(d_module);
3067: END IF;
3068:
3061:
3062: x_return_status := 'S';
3063:
3064: IF (PO_LOG.d_proc) THEN
3065: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3066: PO_LOG.proc_end(d_module);
3067: END IF;
3068:
3069: EXCEPTION
3062: x_return_status := 'S';
3063:
3064: IF (PO_LOG.d_proc) THEN
3065: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3066: PO_LOG.proc_end(d_module);
3067: END IF;
3068:
3069: EXCEPTION
3070: WHEN others THEN
3071: x_return_status := 'U';
3072:
3073: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3074:
3075: IF (PO_LOG.d_exc) THEN
3076: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3077: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3078: PO_LOG.proc_end(d_module);
3079: END IF;
3072:
3073: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3074:
3075: IF (PO_LOG.d_exc) THEN
3076: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3077: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3078: PO_LOG.proc_end(d_module);
3079: END IF;
3080:
3073: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3074:
3075: IF (PO_LOG.d_exc) THEN
3076: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3077: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3078: PO_LOG.proc_end(d_module);
3079: END IF;
3080:
3081: RETURN;
3074:
3075: IF (PO_LOG.d_exc) THEN
3076: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3077: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3078: PO_LOG.proc_end(d_module);
3079: END IF;
3080:
3081: RETURN;
3082:
3137:
3138: BEGIN
3139:
3140: d_progress := 0;
3141: IF (PO_LOG.d_proc) THEN
3142: PO_LOG.proc_begin(d_module);
3143: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3144: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3138: BEGIN
3139:
3140: d_progress := 0;
3141: IF (PO_LOG.d_proc) THEN
3142: PO_LOG.proc_begin(d_module);
3143: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3144: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3139:
3140: d_progress := 0;
3141: IF (PO_LOG.d_proc) THEN
3142: PO_LOG.proc_begin(d_module);
3143: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3144: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3140: d_progress := 0;
3141: IF (PO_LOG.d_proc) THEN
3142: PO_LOG.proc_begin(d_module);
3143: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3144: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3141: IF (PO_LOG.d_proc) THEN
3142: PO_LOG.proc_begin(d_module);
3143: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3144: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3142: PO_LOG.proc_begin(d_module);
3143: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3144: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3143: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3144: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3151: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
3144: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3151: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
3152: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
3145: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3151: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
3152: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
3153: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
3146: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3151: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
3152: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
3153: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
3154: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
3147: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3151: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
3152: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
3153: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
3154: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
3155: END IF;
3148: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3151: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
3152: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
3153: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
3154: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
3155: END IF;
3156:
3149: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3151: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
3152: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
3153: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
3154: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
3155: END IF;
3156:
3157: d_progress := 10;
3150: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
3151: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
3152: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
3153: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
3154: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
3155: END IF;
3156:
3157: d_progress := 10;
3158:
3201: END IF; -- p_shipment_id IS NOT NULL
3202:
3203: d_progress := 60;
3204:
3205: IF (PO_LOG.d_stmt) THEN
3206: PO_LOG.stmt(d_module, d_progress, 'Count of lines = ' || to_char(l_lineid_tbl.COUNT));
3207: END IF;
3208:
3209: FOR i IN 1..l_lineid_tbl.COUNT
3202:
3203: d_progress := 60;
3204:
3205: IF (PO_LOG.d_stmt) THEN
3206: PO_LOG.stmt(d_module, d_progress, 'Count of lines = ' || to_char(l_lineid_tbl.COUNT));
3207: END IF;
3208:
3209: FOR i IN 1..l_lineid_tbl.COUNT
3210: LOOP
3256: AND poll.shipment_type <> 'PREPAYMENT'; --
3257:
3258: d_progress := 76;
3259:
3260: IF (PO_LOG.d_stmt) THEN
3261: PO_LOG.stmt(d_module, d_progress, 'l_lineid_tbl(i)', l_lineid_tbl(i));
3262: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3263: END IF;
3264:
3257:
3258: d_progress := 76;
3259:
3260: IF (PO_LOG.d_stmt) THEN
3261: PO_LOG.stmt(d_module, d_progress, 'l_lineid_tbl(i)', l_lineid_tbl(i));
3262: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3263: END IF;
3264:
3265: d_progress := 80;
3258: d_progress := 76;
3259:
3260: IF (PO_LOG.d_stmt) THEN
3261: PO_LOG.stmt(d_module, d_progress, 'l_lineid_tbl(i)', l_lineid_tbl(i));
3262: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3263: END IF;
3264:
3265: d_progress := 80;
3266:
3349: FROM po_lines pol
3350: WHERE pol.po_header_id = p_document_id;
3351:
3352: d_progress := 220;
3353: IF (PO_LOG.d_stmt) THEN
3354: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3355: END IF;
3356:
3357: UPDATE po_headers poh
3350: WHERE pol.po_header_id = p_document_id;
3351:
3352: d_progress := 220;
3353: IF (PO_LOG.d_stmt) THEN
3354: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3355: END IF;
3356:
3357: UPDATE po_headers poh
3358: SET poh.closed_code = l_rollup_code
3426: END IF; -- if l_rollup_code is null
3427:
3428: d_progress := 310;
3429:
3430: IF (PO_LOG.d_stmt) THEN
3431: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3432: END IF;
3433:
3434: UPDATE po_releases por
3427:
3428: d_progress := 310;
3429:
3430: IF (PO_LOG.d_stmt) THEN
3431: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3432: END IF;
3433:
3434: UPDATE po_releases por
3435: SET por.closed_code = l_rollup_code
3463:
3464:
3465: d_progress := 400;
3466:
3467: IF (PO_LOG.d_stmt) THEN
3468: PO_LOG.stmt(d_module, d_progress, 'l_update_action_hist', l_update_action_hist);
3469: END IF;
3470:
3471: IF (l_update_action_hist)
3464:
3465: d_progress := 400;
3466:
3467: IF (PO_LOG.d_stmt) THEN
3468: PO_LOG.stmt(d_module, d_progress, 'l_update_action_hist', l_update_action_hist);
3469: END IF;
3470:
3471: IF (l_update_action_hist)
3472: THEN
3494:
3495: END IF; -- if (l_hist_action IS NULL)
3496:
3497: d_progress := 420;
3498: IF (PO_LOG.d_stmt) THEN
3499: PO_LOG.stmt(d_module, d_progress, 'l_hist_action', l_hist_action);
3500: END IF;
3501:
3502: PO_DOCUMENT_ACTION_UTIL.handle_ctl_action_history(
3495: END IF; -- if (l_hist_action IS NULL)
3496:
3497: d_progress := 420;
3498: IF (PO_LOG.d_stmt) THEN
3499: PO_LOG.stmt(d_module, d_progress, 'l_hist_action', l_hist_action);
3500: END IF;
3501:
3502: PO_DOCUMENT_ACTION_UTIL.handle_ctl_action_history(
3503: p_document_id => p_document_id
3517:
3518: d_progress := 430;
3519: l_ret_sts := 'U';
3520: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'handle_ctl_action_history not successful');
3521: IF (PO_LOG.d_exc) THEN
3522: PO_LOG.exc(d_module, d_progress, 'handle_ctl_action_history not successful');
3523: END IF;
3524:
3525: END IF;
3518: d_progress := 430;
3519: l_ret_sts := 'U';
3520: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'handle_ctl_action_history not successful');
3521: IF (PO_LOG.d_exc) THEN
3522: PO_LOG.exc(d_module, d_progress, 'handle_ctl_action_history not successful');
3523: END IF;
3524:
3525: END IF;
3526:
3531: END IF; -- if (l_action_hist);
3532:
3533: x_return_status := l_ret_sts;
3534:
3535: IF (PO_LOG.d_proc) THEN
3536: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3537: PO_LOG.proc_end(d_module);
3538: END IF;
3539:
3532:
3533: x_return_status := l_ret_sts;
3534:
3535: IF (PO_LOG.d_proc) THEN
3536: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3537: PO_LOG.proc_end(d_module);
3538: END IF;
3539:
3540: RETURN;
3533: x_return_status := l_ret_sts;
3534:
3535: IF (PO_LOG.d_proc) THEN
3536: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3537: PO_LOG.proc_end(d_module);
3538: END IF;
3539:
3540: RETURN;
3541:
3555: x_return_status := 'U';
3556:
3557: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3558:
3559: IF (PO_LOG.d_exc) THEN
3560: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3561: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3562: PO_LOG.proc_end(d_module);
3563: END IF;
3556:
3557: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3558:
3559: IF (PO_LOG.d_exc) THEN
3560: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3561: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3562: PO_LOG.proc_end(d_module);
3563: END IF;
3564:
3557: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3558:
3559: IF (PO_LOG.d_exc) THEN
3560: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3561: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3562: PO_LOG.proc_end(d_module);
3563: END IF;
3564:
3565: RETURN;
3558:
3559: IF (PO_LOG.d_exc) THEN
3560: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3561: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3562: PO_LOG.proc_end(d_module);
3563: END IF;
3564:
3565: RETURN;
3566:
3586:
3587: BEGIN
3588:
3589: d_progress := 0;
3590: IF (PO_LOG.d_proc) THEN
3591: PO_LOG.proc_begin(d_module);
3592: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3593: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3594: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3587: BEGIN
3588:
3589: d_progress := 0;
3590: IF (PO_LOG.d_proc) THEN
3591: PO_LOG.proc_begin(d_module);
3592: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3593: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3594: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3595: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3588:
3589: d_progress := 0;
3590: IF (PO_LOG.d_proc) THEN
3591: PO_LOG.proc_begin(d_module);
3592: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3593: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3594: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3595: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3596: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3589: d_progress := 0;
3590: IF (PO_LOG.d_proc) THEN
3591: PO_LOG.proc_begin(d_module);
3592: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3593: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3594: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3595: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3596: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3597: END IF;
3590: IF (PO_LOG.d_proc) THEN
3591: PO_LOG.proc_begin(d_module);
3592: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3593: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3594: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3595: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3596: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3597: END IF;
3598:
3591: PO_LOG.proc_begin(d_module);
3592: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3593: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3594: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3595: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3596: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3597: END IF;
3598:
3599: d_progress := 10;
3592: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3593: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3594: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3595: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3596: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3597: END IF;
3598:
3599: d_progress := 10;
3600:
3684:
3685: END IF; -- p_document_type = PO
3686:
3687: d_progress := 20;
3688: IF (PO_LOG.d_stmt) THEN
3689: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3690: END IF;
3691:
3692: l_supply_ret := PO_SUPPLY.po_req_supply(
3685: END IF; -- p_document_type = PO
3686:
3687: d_progress := 20;
3688: IF (PO_LOG.d_stmt) THEN
3689: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3690: END IF;
3691:
3692: l_supply_ret := PO_SUPPLY.po_req_supply(
3693: p_docid => p_document_id
3703: THEN
3704:
3705: d_progress := 30;
3706: x_return_status := 'U';
3707: IF (PO_LOG.d_exc) THEN
3708: PO_LOG.exc(d_module, d_progress, 'po_req_supply call not successful');
3709: END IF;
3710: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'po_req_supply call not successful');
3711:
3704:
3705: d_progress := 30;
3706: x_return_status := 'U';
3707: IF (PO_LOG.d_exc) THEN
3708: PO_LOG.exc(d_module, d_progress, 'po_req_supply call not successful');
3709: END IF;
3710: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'po_req_supply call not successful');
3711:
3712: ELSE
3712: ELSE
3713:
3714: d_progress := 40;
3715: x_return_status := 'S';
3716: IF (PO_LOG.d_stmt) THEN
3717: PO_LOG.stmt(d_module, d_progress, 'po_req_supply call was successful');
3718: END IF;
3719:
3720: END IF;
3713:
3714: d_progress := 40;
3715: x_return_status := 'S';
3716: IF (PO_LOG.d_stmt) THEN
3717: PO_LOG.stmt(d_module, d_progress, 'po_req_supply call was successful');
3718: END IF;
3719:
3720: END IF;
3721:
3718: END IF;
3719:
3720: END IF;
3721:
3722: IF (PO_LOG.d_proc) THEN
3723: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3724: PO_LOG.proc_end(d_module);
3725: END IF;
3726:
3719:
3720: END IF;
3721:
3722: IF (PO_LOG.d_proc) THEN
3723: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3724: PO_LOG.proc_end(d_module);
3725: END IF;
3726:
3727: RETURN;
3720: END IF;
3721:
3722: IF (PO_LOG.d_proc) THEN
3723: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3724: PO_LOG.proc_end(d_module);
3725: END IF;
3726:
3727: RETURN;
3728:
3731: x_return_status := 'U';
3732:
3733: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3734:
3735: IF (PO_LOG.d_exc) THEN
3736: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3737: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3738: PO_LOG.proc_end(d_module);
3739: END IF;
3732:
3733: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3734:
3735: IF (PO_LOG.d_exc) THEN
3736: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3737: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3738: PO_LOG.proc_end(d_module);
3739: END IF;
3740:
3733: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3734:
3735: IF (PO_LOG.d_exc) THEN
3736: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3737: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3738: PO_LOG.proc_end(d_module);
3739: END IF;
3740:
3741: RETURN;
3734:
3735: IF (PO_LOG.d_exc) THEN
3736: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3737: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3738: PO_LOG.proc_end(d_module);
3739: END IF;
3740:
3741: RETURN;
3742:
3764:
3765: BEGIN
3766:
3767: d_progress := 0;
3768: IF (PO_LOG.d_proc) THEN
3769: PO_LOG.proc_begin(d_module);
3770: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3771: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3772: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3765: BEGIN
3766:
3767: d_progress := 0;
3768: IF (PO_LOG.d_proc) THEN
3769: PO_LOG.proc_begin(d_module);
3770: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3771: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3772: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3773: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3766:
3767: d_progress := 0;
3768: IF (PO_LOG.d_proc) THEN
3769: PO_LOG.proc_begin(d_module);
3770: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3771: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3772: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3773: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3774: END IF;
3767: d_progress := 0;
3768: IF (PO_LOG.d_proc) THEN
3769: PO_LOG.proc_begin(d_module);
3770: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3771: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3772: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3773: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3774: END IF;
3775:
3768: IF (PO_LOG.d_proc) THEN
3769: PO_LOG.proc_begin(d_module);
3770: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3771: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3772: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3773: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3774: END IF;
3775:
3776: IF (p_shipment_id IS NOT NULL)
3769: PO_LOG.proc_begin(d_module);
3770: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3771: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3772: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3773: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3774: END IF;
3775:
3776: IF (p_shipment_id IS NOT NULL)
3777: THEN
3864: END IF; -- if p_document_type = 'PO'
3865:
3866: d_progress := 70;
3867:
3868: IF (PO_LOG.d_stmt) THEN
3869: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3870: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3871: END IF;
3872:
3865:
3866: d_progress := 70;
3867:
3868: IF (PO_LOG.d_stmt) THEN
3869: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3870: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3871: END IF;
3872:
3873: l_supply_ret := PO_SUPPLY.po_req_supply(
3866: d_progress := 70;
3867:
3868: IF (PO_LOG.d_stmt) THEN
3869: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3870: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3871: END IF;
3872:
3873: l_supply_ret := PO_SUPPLY.po_req_supply(
3874: p_docid => p_document_id
3881: );
3882:
3883: d_progress := 80;
3884:
3885: IF (PO_LOG.d_stmt) THEN
3886: PO_LOG.stmt(d_module, d_progress, 'l_supply_ret', l_supply_ret);
3887: END IF;
3888:
3889: IF (NOT l_supply_ret)
3882:
3883: d_progress := 80;
3884:
3885: IF (PO_LOG.d_stmt) THEN
3886: PO_LOG.stmt(d_module, d_progress, 'l_supply_ret', l_supply_ret);
3887: END IF;
3888:
3889: IF (NOT l_supply_ret)
3890: THEN
3891:
3892: d_progress := 90;
3893:
3894: l_ret_sts := 'U';
3895: IF (PO_LOG.d_exc) THEN
3896: PO_LOG.exc(d_module, d_progress, 'supply action not successful');
3897: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3898: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3899: END IF;
3892: d_progress := 90;
3893:
3894: l_ret_sts := 'U';
3895: IF (PO_LOG.d_exc) THEN
3896: PO_LOG.exc(d_module, d_progress, 'supply action not successful');
3897: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3898: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3899: END IF;
3900:
3893:
3894: l_ret_sts := 'U';
3895: IF (PO_LOG.d_exc) THEN
3896: PO_LOG.exc(d_module, d_progress, 'supply action not successful');
3897: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3898: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3899: END IF;
3900:
3901: EXIT;
3894: l_ret_sts := 'U';
3895: IF (PO_LOG.d_exc) THEN
3896: PO_LOG.exc(d_module, d_progress, 'supply action not successful');
3897: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3898: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3899: END IF;
3900:
3901: EXIT;
3902:
3905: END LOOP;
3906:
3907: x_return_status := l_ret_sts;
3908:
3909: IF (PO_LOG.d_proc) THEN
3910: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3911: PO_LOG.proc_end(d_module);
3912: END IF;
3913:
3906:
3907: x_return_status := l_ret_sts;
3908:
3909: IF (PO_LOG.d_proc) THEN
3910: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3911: PO_LOG.proc_end(d_module);
3912: END IF;
3913:
3914: RETURN;
3907: x_return_status := l_ret_sts;
3908:
3909: IF (PO_LOG.d_proc) THEN
3910: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3911: PO_LOG.proc_end(d_module);
3912: END IF;
3913:
3914: RETURN;
3915:
3918: x_return_status := 'U';
3919:
3920: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3921:
3922: IF (PO_LOG.d_exc) THEN
3923: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3924: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3925: PO_LOG.proc_end(d_module);
3926: END IF;
3919:
3920: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3921:
3922: IF (PO_LOG.d_exc) THEN
3923: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3924: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3925: PO_LOG.proc_end(d_module);
3926: END IF;
3927:
3920: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3921:
3922: IF (PO_LOG.d_exc) THEN
3923: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3924: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3925: PO_LOG.proc_end(d_module);
3926: END IF;
3927:
3928: RETURN;
3921:
3922: IF (PO_LOG.d_exc) THEN
3923: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3924: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3925: PO_LOG.proc_end(d_module);
3926: END IF;
3927:
3928: RETURN;
3929: