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;
495:
496: EXCEPTION
497: WHEN PO_CORE_S.g_early_return_exc THEN
498: IF (l_ret_sts = 'S') THEN
499: IF (PO_LOG.d_stmt) THEN
500: PO_LOG.stmt(d_module, d_progress, d_msg);
501: END IF;
502: ELSIF (l_ret_sts = 'U') THEN
503: IF (PO_LOG.d_exc) THEN
496: EXCEPTION
497: WHEN PO_CORE_S.g_early_return_exc THEN
498: IF (l_ret_sts = 'S') THEN
499: IF (PO_LOG.d_stmt) THEN
500: PO_LOG.stmt(d_module, d_progress, d_msg);
501: END IF;
502: ELSIF (l_ret_sts = 'U') THEN
503: IF (PO_LOG.d_exc) THEN
504: PO_LOG.exc(d_module, d_progress, d_msg);
499: IF (PO_LOG.d_stmt) THEN
500: PO_LOG.stmt(d_module, d_progress, d_msg);
501: END IF;
502: ELSIF (l_ret_sts = 'U') THEN
503: IF (PO_LOG.d_exc) THEN
504: PO_LOG.exc(d_module, d_progress, d_msg);
505: END IF;
506: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
507: END IF;
500: PO_LOG.stmt(d_module, d_progress, d_msg);
501: END IF;
502: ELSIF (l_ret_sts = 'U') THEN
503: IF (PO_LOG.d_exc) THEN
504: PO_LOG.exc(d_module, d_progress, d_msg);
505: END IF;
506: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
507: END IF;
508:
513:
514: --
515: p_action_ctl_rec.return_status := l_ret_sts;
516:
517: IF (PO_LOG.d_proc) THEN
518: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
519: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
520: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.online_report_id', p_action_ctl_rec.online_report_id);
521: END IF;
514: --
515: p_action_ctl_rec.return_status := l_ret_sts;
516:
517: IF (PO_LOG.d_proc) THEN
518: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
519: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
520: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.online_report_id', p_action_ctl_rec.online_report_id);
521: END IF;
522:
515: p_action_ctl_rec.return_status := l_ret_sts;
516:
517: IF (PO_LOG.d_proc) THEN
518: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
519: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
520: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.online_report_id', p_action_ctl_rec.online_report_id);
521: END IF;
522:
523: RETURN;
516:
517: IF (PO_LOG.d_proc) THEN
518: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
519: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
520: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.online_report_id', p_action_ctl_rec.online_report_id);
521: END IF;
522:
523: RETURN;
524:
527: p_action_ctl_rec.return_status := 'U';
528:
529: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
530:
531: IF (PO_LOG.d_exc) THEN
532: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
533: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
534: PO_LOG.proc_return(d_module, FALSE);
535: PO_LOG.proc_end(d_module);
528:
529: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
530:
531: IF (PO_LOG.d_exc) THEN
532: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
533: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
534: PO_LOG.proc_return(d_module, FALSE);
535: PO_LOG.proc_end(d_module);
536: END IF;
529: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
530:
531: IF (PO_LOG.d_exc) THEN
532: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
533: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
534: PO_LOG.proc_return(d_module, FALSE);
535: PO_LOG.proc_end(d_module);
536: END IF;
537:
530:
531: IF (PO_LOG.d_exc) THEN
532: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
533: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
534: PO_LOG.proc_return(d_module, FALSE);
535: PO_LOG.proc_end(d_module);
536: END IF;
537:
538: IF (l_rollback_flag) THEN
531: IF (PO_LOG.d_exc) THEN
532: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
533: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
534: PO_LOG.proc_return(d_module, FALSE);
535: PO_LOG.proc_end(d_module);
536: END IF;
537:
538: IF (l_rollback_flag) THEN
539: ROLLBACK TO DA_MANUAL_CLOSE_SP;
598:
599: BEGIN
600:
601: d_progress := 0;
602: IF (PO_LOG.d_proc) THEN
603: PO_LOG.proc_begin(d_module);
604: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
605: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
599: BEGIN
600:
601: d_progress := 0;
602: IF (PO_LOG.d_proc) THEN
603: PO_LOG.proc_begin(d_module);
604: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
605: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
600:
601: d_progress := 0;
602: IF (PO_LOG.d_proc) THEN
603: PO_LOG.proc_begin(d_module);
604: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
605: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
608: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
601: d_progress := 0;
602: IF (PO_LOG.d_proc) THEN
603: PO_LOG.proc_begin(d_module);
604: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
605: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
608: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
609: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
602: IF (PO_LOG.d_proc) THEN
603: PO_LOG.proc_begin(d_module);
604: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
605: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
608: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
609: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
610: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
603: PO_LOG.proc_begin(d_module);
604: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
605: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
608: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
609: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
610: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
611: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
604: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_id', p_action_ctl_rec.document_id);
605: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
608: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
609: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
610: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
611: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
612: END IF;
605: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_type', p_action_ctl_rec.document_type);
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
608: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
609: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
610: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
611: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
612: END IF;
613:
606: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.document_subtype', p_action_ctl_rec.document_subtype);
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
608: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
609: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
610: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
611: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
612: END IF;
613:
614: d_progress := 3;
607: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.line_id', p_action_ctl_rec.line_id);
608: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.shipment_id', p_action_ctl_rec.shipment_id);
609: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.action', p_action_ctl_rec.action);
610: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.called_from_conc', p_action_ctl_rec.called_from_conc);
611: PO_LOG.proc_begin(d_module, 'p_action_ctl_rec.calling_mode', p_action_ctl_rec.calling_mode);
612: END IF;
613:
614: d_progress := 3;
615: l_reason := FND_MESSAGE.GET_STRING('PO', 'PO_UPDATE_CLOSE_ROLLUP');
652:
653: --
654: -- login_id can be -1; this is now allowed.
655:
656: IF (PO_LOG.d_stmt) THEN
657: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
658: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
659: END IF;
660:
653: --
654: -- login_id can be -1; this is now allowed.
655:
656: IF (PO_LOG.d_stmt) THEN
657: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
658: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
659: END IF;
660:
661: d_progress := 50;
654: -- login_id can be -1; this is now allowed.
655:
656: IF (PO_LOG.d_stmt) THEN
657: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
658: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
659: END IF;
660:
661: d_progress := 50;
662:
680:
681: d_progress := 70;
682: l_emp_id := NULL;
683:
684: IF (PO_LOG.d_stmt) THEN
685: PO_LOG.stmt(d_module, d_progress, 'user is not an employee');
686: END IF;
687:
688: END IF;
681: d_progress := 70;
682: l_emp_id := NULL;
683:
684: IF (PO_LOG.d_stmt) THEN
685: PO_LOG.stmt(d_module, d_progress, 'user is not an employee');
686: END IF;
687:
688: END IF;
689:
714: RAISE PO_CORE_S.g_early_return_exc;
715: END IF;
716:
717: d_progress := 110;
718: IF (PO_LOG.d_stmt) THEN
719: PO_LOG.stmt(d_module, d_progress, 'State check passed.');
720: END IF;
721:
722: auto_update_closed_status(
715: END IF;
716:
717: d_progress := 110;
718: IF (PO_LOG.d_stmt) THEN
719: PO_LOG.stmt(d_module, d_progress, 'State check passed.');
720: END IF;
721:
722: auto_update_closed_status(
723: p_document_id => p_action_ctl_rec.document_id
795:
796: EXCEPTION
797: WHEN PO_CORE_S.g_early_return_exc THEN
798: IF (l_ret_sts = 'S') THEN
799: IF (PO_LOG.d_stmt) THEN
800: PO_LOG.stmt(d_module, d_progress, d_msg);
801: END IF;
802: ELSIF (l_ret_sts = 'U') THEN
803: IF (PO_LOG.d_exc) THEN
796: EXCEPTION
797: WHEN PO_CORE_S.g_early_return_exc THEN
798: IF (l_ret_sts = 'S') THEN
799: IF (PO_LOG.d_stmt) THEN
800: PO_LOG.stmt(d_module, d_progress, d_msg);
801: END IF;
802: ELSIF (l_ret_sts = 'U') THEN
803: IF (PO_LOG.d_exc) THEN
804: PO_LOG.exc(d_module, d_progress, d_msg);
799: IF (PO_LOG.d_stmt) THEN
800: PO_LOG.stmt(d_module, d_progress, d_msg);
801: END IF;
802: ELSIF (l_ret_sts = 'U') THEN
803: IF (PO_LOG.d_exc) THEN
804: PO_LOG.exc(d_module, d_progress, d_msg);
805: END IF;
806: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
807: END IF;
800: PO_LOG.stmt(d_module, d_progress, d_msg);
801: END IF;
802: ELSIF (l_ret_sts = 'U') THEN
803: IF (PO_LOG.d_exc) THEN
804: PO_LOG.exc(d_module, d_progress, d_msg);
805: END IF;
806: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
807: END IF;
808: END;
808: END;
809:
810: p_action_ctl_rec.return_status := l_ret_sts;
811:
812: IF (PO_LOG.d_proc) THEN
813: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
814: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
815: END IF;
816:
809:
810: p_action_ctl_rec.return_status := l_ret_sts;
811:
812: IF (PO_LOG.d_proc) THEN
813: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
814: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
815: END IF;
816:
817: RETURN;
810: p_action_ctl_rec.return_status := l_ret_sts;
811:
812: IF (PO_LOG.d_proc) THEN
813: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
814: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_code', p_action_ctl_rec.return_code);
815: END IF;
816:
817: RETURN;
818:
821: p_action_ctl_rec.return_status := 'U';
822:
823: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
824:
825: IF (PO_LOG.d_exc) THEN
826: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
827: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
828: PO_LOG.proc_return(d_module, FALSE);
829: PO_LOG.proc_end(d_module);
822:
823: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
824:
825: IF (PO_LOG.d_exc) THEN
826: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
827: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
828: PO_LOG.proc_return(d_module, FALSE);
829: PO_LOG.proc_end(d_module);
830: END IF;
823: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
824:
825: IF (PO_LOG.d_exc) THEN
826: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
827: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
828: PO_LOG.proc_return(d_module, FALSE);
829: PO_LOG.proc_end(d_module);
830: END IF;
831:
824:
825: IF (PO_LOG.d_exc) THEN
826: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
827: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
828: PO_LOG.proc_return(d_module, FALSE);
829: PO_LOG.proc_end(d_module);
830: END IF;
831:
832: RETURN;
825: IF (PO_LOG.d_exc) THEN
826: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
827: PO_LOG.proc_end(d_module, 'p_action_ctl_rec.return_status', p_action_ctl_rec.return_status);
828: PO_LOG.proc_return(d_module, FALSE);
829: PO_LOG.proc_end(d_module);
830: END IF;
831:
832: RETURN;
833:
913:
914: BEGIN
915:
916: d_progress := 0;
917: IF (PO_LOG.d_proc) THEN
918: PO_LOG.proc_begin(d_module);
919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
921: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
914: BEGIN
915:
916: d_progress := 0;
917: IF (PO_LOG.d_proc) THEN
918: PO_LOG.proc_begin(d_module);
919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
921: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
922: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
915:
916: d_progress := 0;
917: IF (PO_LOG.d_proc) THEN
918: PO_LOG.proc_begin(d_module);
919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
921: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
922: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
923: PO_LOG.proc_begin(d_module, 'p_action', p_action);
916: d_progress := 0;
917: IF (PO_LOG.d_proc) THEN
918: PO_LOG.proc_begin(d_module);
919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
921: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
922: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
923: PO_LOG.proc_begin(d_module, 'p_action', p_action);
924: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
917: IF (PO_LOG.d_proc) THEN
918: PO_LOG.proc_begin(d_module);
919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
921: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
922: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
923: PO_LOG.proc_begin(d_module, 'p_action', p_action);
924: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
925: END IF;
918: PO_LOG.proc_begin(d_module);
919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
921: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
922: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
923: PO_LOG.proc_begin(d_module, 'p_action', p_action);
924: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
925: END IF;
926:
919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
921: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
922: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
923: PO_LOG.proc_begin(d_module, 'p_action', p_action);
924: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
925: END IF;
926:
927: BEGIN
920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
921: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
922: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
923: PO_LOG.proc_begin(d_module, 'p_action', p_action);
924: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
925: END IF;
926:
927: BEGIN
928:
1079:
1080: EXCEPTION
1081: WHEN PO_CORE_S.g_early_return_exc THEN
1082: IF (l_ret_sts = 'S') THEN
1083: IF (PO_LOG.d_stmt) THEN
1084: PO_LOG.stmt(d_module, d_progress, d_msg);
1085: END IF;
1086: ELSIF (l_ret_sts = 'U') THEN
1087: IF (PO_LOG.d_exc) THEN
1080: EXCEPTION
1081: WHEN PO_CORE_S.g_early_return_exc THEN
1082: IF (l_ret_sts = 'S') THEN
1083: IF (PO_LOG.d_stmt) THEN
1084: PO_LOG.stmt(d_module, d_progress, d_msg);
1085: END IF;
1086: ELSIF (l_ret_sts = 'U') THEN
1087: IF (PO_LOG.d_exc) THEN
1088: PO_LOG.exc(d_module, d_progress, d_msg);
1083: IF (PO_LOG.d_stmt) THEN
1084: PO_LOG.stmt(d_module, d_progress, d_msg);
1085: END IF;
1086: ELSIF (l_ret_sts = 'U') THEN
1087: IF (PO_LOG.d_exc) THEN
1088: PO_LOG.exc(d_module, d_progress, d_msg);
1089: END IF;
1090: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1091: l_ret_val := FALSE;
1084: PO_LOG.stmt(d_module, d_progress, d_msg);
1085: END IF;
1086: ELSIF (l_ret_sts = 'U') THEN
1087: IF (PO_LOG.d_exc) THEN
1088: PO_LOG.exc(d_module, d_progress, d_msg);
1089: END IF;
1090: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1091: l_ret_val := FALSE;
1092: END IF;
1093: END;
1094:
1095: x_return_status := l_ret_sts;
1096:
1097: IF (PO_LOG.d_proc) THEN
1098: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1099: PO_LOG.proc_return(d_module, l_ret_val);
1100: PO_LOG.proc_end(d_module);
1101: END IF;
1094:
1095: x_return_status := l_ret_sts;
1096:
1097: IF (PO_LOG.d_proc) THEN
1098: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1099: PO_LOG.proc_return(d_module, l_ret_val);
1100: PO_LOG.proc_end(d_module);
1101: END IF;
1102:
1095: x_return_status := l_ret_sts;
1096:
1097: IF (PO_LOG.d_proc) THEN
1098: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1099: PO_LOG.proc_return(d_module, l_ret_val);
1100: PO_LOG.proc_end(d_module);
1101: END IF;
1102:
1103: RETURN l_ret_val;
1096:
1097: IF (PO_LOG.d_proc) THEN
1098: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1099: PO_LOG.proc_return(d_module, l_ret_val);
1100: PO_LOG.proc_end(d_module);
1101: END IF;
1102:
1103: RETURN l_ret_val;
1104:
1107: x_return_status := 'U';
1108:
1109: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1110:
1111: IF (PO_LOG.d_exc) THEN
1112: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1113: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1114: PO_LOG.proc_return(d_module, FALSE);
1115: PO_LOG.proc_end(d_module);
1108:
1109: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1110:
1111: IF (PO_LOG.d_exc) THEN
1112: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1113: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1114: PO_LOG.proc_return(d_module, FALSE);
1115: PO_LOG.proc_end(d_module);
1116: END IF;
1109: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1110:
1111: IF (PO_LOG.d_exc) THEN
1112: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1113: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1114: PO_LOG.proc_return(d_module, FALSE);
1115: PO_LOG.proc_end(d_module);
1116: END IF;
1117:
1110:
1111: IF (PO_LOG.d_exc) THEN
1112: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1113: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1114: PO_LOG.proc_return(d_module, FALSE);
1115: PO_LOG.proc_end(d_module);
1116: END IF;
1117:
1118: RETURN FALSE;
1111: IF (PO_LOG.d_exc) THEN
1112: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1113: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1114: PO_LOG.proc_return(d_module, FALSE);
1115: PO_LOG.proc_end(d_module);
1116: END IF;
1117:
1118: RETURN FALSE;
1119:
1184:
1185: BEGIN
1186:
1187: d_progress := 0;
1188: IF (PO_LOG.d_proc) THEN
1189: PO_LOG.proc_begin(d_module);
1190: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1191: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1192: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1185: BEGIN
1186:
1187: d_progress := 0;
1188: IF (PO_LOG.d_proc) THEN
1189: PO_LOG.proc_begin(d_module);
1190: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1191: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1192: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1193: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1186:
1187: d_progress := 0;
1188: IF (PO_LOG.d_proc) THEN
1189: PO_LOG.proc_begin(d_module);
1190: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1191: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1192: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1193: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1194: END IF;
1187: d_progress := 0;
1188: IF (PO_LOG.d_proc) THEN
1189: PO_LOG.proc_begin(d_module);
1190: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1191: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1192: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1193: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1194: END IF;
1195:
1188: IF (PO_LOG.d_proc) THEN
1189: PO_LOG.proc_begin(d_module);
1190: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1191: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1192: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1193: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1194: END IF;
1195:
1196: BEGIN
1189: PO_LOG.proc_begin(d_module);
1190: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1191: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1192: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1193: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1194: END IF;
1195:
1196: BEGIN
1197:
1240:
1241: EXCEPTION
1242: WHEN PO_CORE_S.g_early_return_exc THEN
1243: IF (l_ret_sts = 'S') THEN
1244: IF (PO_LOG.d_stmt) THEN
1245: PO_LOG.stmt(d_module, d_progress, d_msg);
1246: END IF;
1247: ELSIF (l_ret_sts = 'U') THEN
1248: IF (PO_LOG.d_exc) THEN
1241: EXCEPTION
1242: WHEN PO_CORE_S.g_early_return_exc THEN
1243: IF (l_ret_sts = 'S') THEN
1244: IF (PO_LOG.d_stmt) THEN
1245: PO_LOG.stmt(d_module, d_progress, d_msg);
1246: END IF;
1247: ELSIF (l_ret_sts = 'U') THEN
1248: IF (PO_LOG.d_exc) THEN
1249: PO_LOG.exc(d_module, d_progress, d_msg);
1244: IF (PO_LOG.d_stmt) THEN
1245: PO_LOG.stmt(d_module, d_progress, d_msg);
1246: END IF;
1247: ELSIF (l_ret_sts = 'U') THEN
1248: IF (PO_LOG.d_exc) THEN
1249: PO_LOG.exc(d_module, d_progress, d_msg);
1250: END IF;
1251: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1252: l_ret_val := FALSE;
1245: PO_LOG.stmt(d_module, d_progress, d_msg);
1246: END IF;
1247: ELSIF (l_ret_sts = 'U') THEN
1248: IF (PO_LOG.d_exc) THEN
1249: PO_LOG.exc(d_module, d_progress, d_msg);
1250: END IF;
1251: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1252: l_ret_val := FALSE;
1253: END IF;
1254: END;
1255:
1256: x_return_status := l_ret_sts;
1257:
1258: IF (PO_LOG.d_proc) THEN
1259: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1260: PO_LOG.proc_return(d_module, l_ret_val);
1261: PO_LOG.proc_end(d_module);
1262: END IF;
1255:
1256: x_return_status := l_ret_sts;
1257:
1258: IF (PO_LOG.d_proc) THEN
1259: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1260: PO_LOG.proc_return(d_module, l_ret_val);
1261: PO_LOG.proc_end(d_module);
1262: END IF;
1263:
1256: x_return_status := l_ret_sts;
1257:
1258: IF (PO_LOG.d_proc) THEN
1259: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1260: PO_LOG.proc_return(d_module, l_ret_val);
1261: PO_LOG.proc_end(d_module);
1262: END IF;
1263:
1264: RETURN l_ret_val;
1257:
1258: IF (PO_LOG.d_proc) THEN
1259: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1260: PO_LOG.proc_return(d_module, l_ret_val);
1261: PO_LOG.proc_end(d_module);
1262: END IF;
1263:
1264: RETURN l_ret_val;
1265:
1268: x_return_status := 'U';
1269:
1270: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1271:
1272: IF (PO_LOG.d_exc) THEN
1273: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1274: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1275: PO_LOG.proc_return(d_module, FALSE);
1276: PO_LOG.proc_end(d_module);
1269:
1270: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1271:
1272: IF (PO_LOG.d_exc) THEN
1273: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1274: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1275: PO_LOG.proc_return(d_module, FALSE);
1276: PO_LOG.proc_end(d_module);
1277: END IF;
1270: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1271:
1272: IF (PO_LOG.d_exc) THEN
1273: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1274: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1275: PO_LOG.proc_return(d_module, FALSE);
1276: PO_LOG.proc_end(d_module);
1277: END IF;
1278:
1271:
1272: IF (PO_LOG.d_exc) THEN
1273: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1274: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1275: PO_LOG.proc_return(d_module, FALSE);
1276: PO_LOG.proc_end(d_module);
1277: END IF;
1278:
1279: RETURN FALSE;
1272: IF (PO_LOG.d_exc) THEN
1273: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1274: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1275: PO_LOG.proc_return(d_module, FALSE);
1276: PO_LOG.proc_end(d_module);
1277: END IF;
1278:
1279: RETURN FALSE;
1280:
1366:
1367: BEGIN
1368:
1369: d_progress := 0;
1370: IF (PO_LOG.d_proc) THEN
1371: PO_LOG.proc_begin(d_module);
1372: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1373: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1374: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1367: BEGIN
1368:
1369: d_progress := 0;
1370: IF (PO_LOG.d_proc) THEN
1371: PO_LOG.proc_begin(d_module);
1372: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1373: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1374: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1375: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1368:
1369: d_progress := 0;
1370: IF (PO_LOG.d_proc) THEN
1371: PO_LOG.proc_begin(d_module);
1372: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1373: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1374: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1375: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1376: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1369: d_progress := 0;
1370: IF (PO_LOG.d_proc) THEN
1371: PO_LOG.proc_begin(d_module);
1372: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1373: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1374: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1375: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1376: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1377: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1370: IF (PO_LOG.d_proc) THEN
1371: PO_LOG.proc_begin(d_module);
1372: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1373: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1374: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1375: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1376: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1377: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1378: END IF;
1371: PO_LOG.proc_begin(d_module);
1372: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1373: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1374: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1375: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1376: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1377: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1378: END IF;
1379:
1372: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1373: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1374: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1375: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1376: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1377: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1378: END IF;
1379:
1380: BEGIN
1373: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1374: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1375: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1376: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1377: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1378: END IF;
1379:
1380: BEGIN
1381:
1415: END IF;
1416:
1417: d_progress := 110;
1418:
1419: IF (PO_LOG.d_stmt) THEN
1420: PO_LOG.stmt(d_module, d_progress, 'l_document_level', l_document_level);
1421: PO_LOG.stmt(d_module, d_progress, 'l_document_level_id', l_document_level_id);
1422: END IF;
1423:
1416:
1417: d_progress := 110;
1418:
1419: IF (PO_LOG.d_stmt) THEN
1420: PO_LOG.stmt(d_module, d_progress, 'l_document_level', l_document_level);
1421: PO_LOG.stmt(d_module, d_progress, 'l_document_level_id', l_document_level_id);
1422: END IF;
1423:
1424: PO_DOCUMENT_CHECKS_GRP.po_submission_check(
1417: d_progress := 110;
1418:
1419: IF (PO_LOG.d_stmt) THEN
1420: PO_LOG.stmt(d_module, d_progress, 'l_document_level', l_document_level);
1421: PO_LOG.stmt(d_module, d_progress, 'l_document_level_id', l_document_level_id);
1422: END IF;
1423:
1424: PO_DOCUMENT_CHECKS_GRP.po_submission_check(
1425: p_api_version => 1.0
1500:
1501: EXCEPTION
1502: WHEN PO_CORE_S.g_early_return_exc THEN
1503: IF (l_ret_sts = 'S') THEN
1504: IF (PO_LOG.d_stmt) THEN
1505: PO_LOG.stmt(d_module, d_progress, d_msg);
1506: END IF;
1507: ELSIF (l_ret_sts = 'U') THEN
1508: IF (PO_LOG.d_exc) THEN
1501: EXCEPTION
1502: WHEN PO_CORE_S.g_early_return_exc THEN
1503: IF (l_ret_sts = 'S') THEN
1504: IF (PO_LOG.d_stmt) THEN
1505: PO_LOG.stmt(d_module, d_progress, d_msg);
1506: END IF;
1507: ELSIF (l_ret_sts = 'U') THEN
1508: IF (PO_LOG.d_exc) THEN
1509: PO_LOG.exc(d_module, d_progress, d_msg);
1504: IF (PO_LOG.d_stmt) THEN
1505: PO_LOG.stmt(d_module, d_progress, d_msg);
1506: END IF;
1507: ELSIF (l_ret_sts = 'U') THEN
1508: IF (PO_LOG.d_exc) THEN
1509: PO_LOG.exc(d_module, d_progress, d_msg);
1510: END IF;
1511: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1512: l_ret_val := FALSE;
1505: PO_LOG.stmt(d_module, d_progress, d_msg);
1506: END IF;
1507: ELSIF (l_ret_sts = 'U') THEN
1508: IF (PO_LOG.d_exc) THEN
1509: PO_LOG.exc(d_module, d_progress, d_msg);
1510: END IF;
1511: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1512: l_ret_val := FALSE;
1513: END IF;
1514: END;
1515:
1516: x_return_status := l_ret_sts;
1517:
1518: IF (PO_LOG.d_proc) THEN
1519: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1520: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1521: PO_LOG.proc_return(d_module, l_ret_val);
1522: PO_LOG.proc_end(d_module);
1515:
1516: x_return_status := l_ret_sts;
1517:
1518: IF (PO_LOG.d_proc) THEN
1519: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1520: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1521: PO_LOG.proc_return(d_module, l_ret_val);
1522: PO_LOG.proc_end(d_module);
1523: END IF;
1516: x_return_status := l_ret_sts;
1517:
1518: IF (PO_LOG.d_proc) THEN
1519: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1520: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1521: PO_LOG.proc_return(d_module, l_ret_val);
1522: PO_LOG.proc_end(d_module);
1523: END IF;
1524:
1517:
1518: IF (PO_LOG.d_proc) THEN
1519: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1520: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1521: PO_LOG.proc_return(d_module, l_ret_val);
1522: PO_LOG.proc_end(d_module);
1523: END IF;
1524:
1525: RETURN l_ret_val;
1518: IF (PO_LOG.d_proc) THEN
1519: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1520: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1521: PO_LOG.proc_return(d_module, l_ret_val);
1522: PO_LOG.proc_end(d_module);
1523: END IF;
1524:
1525: RETURN l_ret_val;
1526:
1529: x_return_status := 'U';
1530:
1531: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1532:
1533: IF (PO_LOG.d_exc) THEN
1534: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1535: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1536: PO_LOG.proc_return(d_module, FALSE);
1537: PO_LOG.proc_end(d_module);
1530:
1531: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1532:
1533: IF (PO_LOG.d_exc) THEN
1534: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1535: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1536: PO_LOG.proc_return(d_module, FALSE);
1537: PO_LOG.proc_end(d_module);
1538: END IF;
1531: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1532:
1533: IF (PO_LOG.d_exc) THEN
1534: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1535: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1536: PO_LOG.proc_return(d_module, FALSE);
1537: PO_LOG.proc_end(d_module);
1538: END IF;
1539:
1532:
1533: IF (PO_LOG.d_exc) THEN
1534: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1535: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1536: PO_LOG.proc_return(d_module, FALSE);
1537: PO_LOG.proc_end(d_module);
1538: END IF;
1539:
1540: RETURN FALSE;
1533: IF (PO_LOG.d_exc) THEN
1534: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1535: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1536: PO_LOG.proc_return(d_module, FALSE);
1537: PO_LOG.proc_end(d_module);
1538: END IF;
1539:
1540: RETURN FALSE;
1541:
1637:
1638: BEGIN
1639:
1640: d_progress := 0;
1641: IF (PO_LOG.d_proc) THEN
1642: PO_LOG.proc_begin(d_module);
1643: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1644: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1638: BEGIN
1639:
1640: d_progress := 0;
1641: IF (PO_LOG.d_proc) THEN
1642: PO_LOG.proc_begin(d_module);
1643: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1644: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1639:
1640: d_progress := 0;
1641: IF (PO_LOG.d_proc) THEN
1642: PO_LOG.proc_begin(d_module);
1643: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1644: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1640: d_progress := 0;
1641: IF (PO_LOG.d_proc) THEN
1642: PO_LOG.proc_begin(d_module);
1643: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1644: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1648: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1641: IF (PO_LOG.d_proc) THEN
1642: PO_LOG.proc_begin(d_module);
1643: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1644: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1648: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1649: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1642: PO_LOG.proc_begin(d_module);
1643: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1644: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1648: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1649: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1650: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1643: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1644: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1648: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1649: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1650: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1651: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1644: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1648: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1649: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1650: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1651: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1652: END IF;
1645: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1648: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1649: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1650: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1651: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1652: END IF;
1653:
1646: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1648: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1649: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1650: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1651: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1652: END IF;
1653:
1654: BEGIN
1647: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1648: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1649: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1650: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
1651: PO_LOG.proc_begin(d_module, 'p_origin_doc_id', p_origin_doc_id);
1652: END IF;
1653:
1654: BEGIN
1655:
1673: THEN
1674:
1675: d_progress := 30;
1676:
1677: IF (PO_LOG.d_stmt) THEN
1678: PO_LOG.stmt(d_module, d_progress, 'Trying to finally close/open invoice a BPA, but not at header level.');
1679: END IF;
1680:
1681: l_enc_flag := FALSE;
1674:
1675: d_progress := 30;
1676:
1677: IF (PO_LOG.d_stmt) THEN
1678: PO_LOG.stmt(d_module, d_progress, 'Trying to finally close/open invoice a BPA, but not at header level.');
1679: END IF;
1680:
1681: l_enc_flag := FALSE;
1682:
1689: FROM po_headers_all poh
1690: WHERE poh.po_header_id = p_document_id;
1691:
1692: d_progress := 50;
1693: IF (PO_LOG.d_stmt) THEN
1694: PO_LOG.stmt(d_module, d_progress, 'l_bpa_enc_required', l_bpa_enc_required);
1695: END IF;
1696:
1697: IF (l_bpa_enc_required = 'Y')
1690: WHERE poh.po_header_id = p_document_id;
1691:
1692: d_progress := 50;
1693: IF (PO_LOG.d_stmt) THEN
1694: PO_LOG.stmt(d_module, d_progress, 'l_bpa_enc_required', l_bpa_enc_required);
1695: END IF;
1696:
1697: IF (l_bpa_enc_required = 'Y')
1698: THEN
1705:
1706: END IF; -- if l_enc_flag and document_type = 'PA' ...
1707:
1708: d_progress := 60;
1709: IF (PO_LOG.d_stmt) THEN
1710: PO_LOG.stmt(d_module, d_progress, 'l_enc_flag', l_enc_flag);
1711: END IF;
1712:
1713: IF (NOT l_enc_flag) THEN
1706: END IF; -- if l_enc_flag and document_type = 'PA' ...
1707:
1708: d_progress := 60;
1709: IF (PO_LOG.d_stmt) THEN
1710: PO_LOG.stmt(d_module, d_progress, 'l_enc_flag', l_enc_flag);
1711: END IF;
1712:
1713: IF (NOT l_enc_flag) THEN
1714: d_progress := 70;
1792: END IF;
1793:
1794: d_progress := 120;
1795:
1796: IF (PO_LOG.d_stmt) THEN
1797: PO_LOG.stmt(d_module, d_progress, 'l_enc_ret_code', l_enc_ret_code);
1798: PO_LOG.stmt(d_module, d_progress, 'x_online_report_id', x_online_report_id);
1799: END IF;
1800:
1793:
1794: d_progress := 120;
1795:
1796: IF (PO_LOG.d_stmt) THEN
1797: PO_LOG.stmt(d_module, d_progress, 'l_enc_ret_code', l_enc_ret_code);
1798: PO_LOG.stmt(d_module, d_progress, 'x_online_report_id', x_online_report_id);
1799: END IF;
1800:
1801:
1794: d_progress := 120;
1795:
1796: IF (PO_LOG.d_stmt) THEN
1797: PO_LOG.stmt(d_module, d_progress, 'l_enc_ret_code', l_enc_ret_code);
1798: PO_LOG.stmt(d_module, d_progress, 'x_online_report_id', x_online_report_id);
1799: END IF;
1800:
1801:
1802: IF ((l_enc_ret_code = PO_DOCUMENT_FUNDS_PVT.g_return_SUCCESS)
1836: RAISE PO_CORE_S.g_early_return_exc;
1837:
1838: END IF; -- if l_enc_ret_code IN (...)
1839:
1840: IF (PO_LOG.d_stmt) THEN
1841: PO_LOG.stmt(d_module, d_progress, d_msg);
1842: END IF;
1843:
1844: l_ret_sts := 'S';
1837:
1838: END IF; -- if l_enc_ret_code IN (...)
1839:
1840: IF (PO_LOG.d_stmt) THEN
1841: PO_LOG.stmt(d_module, d_progress, d_msg);
1842: END IF;
1843:
1844: l_ret_sts := 'S';
1845:
1845:
1846: EXCEPTION
1847: WHEN PO_CORE_S.g_early_return_exc THEN
1848: IF (l_ret_sts = 'S') THEN
1849: IF (PO_LOG.d_stmt) THEN
1850: PO_LOG.stmt(d_module, d_progress, d_msg);
1851: END IF;
1852: x_enc_flag := l_enc_flag;
1853: ELSIF (l_ret_sts = 'U') THEN
1846: EXCEPTION
1847: WHEN PO_CORE_S.g_early_return_exc THEN
1848: IF (l_ret_sts = 'S') THEN
1849: IF (PO_LOG.d_stmt) THEN
1850: PO_LOG.stmt(d_module, d_progress, d_msg);
1851: END IF;
1852: x_enc_flag := l_enc_flag;
1853: ELSIF (l_ret_sts = 'U') THEN
1854: IF (PO_LOG.d_exc) THEN
1850: PO_LOG.stmt(d_module, d_progress, d_msg);
1851: END IF;
1852: x_enc_flag := l_enc_flag;
1853: ELSIF (l_ret_sts = 'U') THEN
1854: IF (PO_LOG.d_exc) THEN
1855: PO_LOG.exc(d_module, d_progress, d_msg);
1856: END IF;
1857: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1858: END IF;
1851: END IF;
1852: x_enc_flag := l_enc_flag;
1853: ELSIF (l_ret_sts = 'U') THEN
1854: IF (PO_LOG.d_exc) THEN
1855: PO_LOG.exc(d_module, d_progress, d_msg);
1856: END IF;
1857: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1858: END IF;
1859: END;
1859: END;
1860:
1861: x_return_status := l_ret_sts;
1862:
1863: IF (PO_LOG.d_proc) THEN
1864: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1865: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1866: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1867: PO_LOG.proc_end(d_module);
1860:
1861: x_return_status := l_ret_sts;
1862:
1863: IF (PO_LOG.d_proc) THEN
1864: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1865: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1866: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1867: PO_LOG.proc_end(d_module);
1868: END IF;
1861: x_return_status := l_ret_sts;
1862:
1863: IF (PO_LOG.d_proc) THEN
1864: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1865: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1866: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1867: PO_LOG.proc_end(d_module);
1868: END IF;
1869:
1862:
1863: IF (PO_LOG.d_proc) THEN
1864: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1865: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1866: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1867: PO_LOG.proc_end(d_module);
1868: END IF;
1869:
1870: RETURN;
1863: IF (PO_LOG.d_proc) THEN
1864: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1865: PO_LOG.proc_end(d_module, 'x_online_report_id', x_online_report_id);
1866: PO_LOG.proc_end(d_module, 'x_return_code', x_return_code);
1867: PO_LOG.proc_end(d_module);
1868: END IF;
1869:
1870: RETURN;
1871:
1874: x_return_status := 'U';
1875:
1876: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1877:
1878: IF (PO_LOG.d_exc) THEN
1879: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1880: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1881: PO_LOG.proc_end(d_module);
1882: END IF;
1875:
1876: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1877:
1878: IF (PO_LOG.d_exc) THEN
1879: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1880: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1881: PO_LOG.proc_end(d_module);
1882: END IF;
1883:
1876: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1877:
1878: IF (PO_LOG.d_exc) THEN
1879: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1880: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1881: PO_LOG.proc_end(d_module);
1882: END IF;
1883:
1884: RETURN;
1877:
1878: IF (PO_LOG.d_exc) THEN
1879: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1880: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1881: PO_LOG.proc_end(d_module);
1882: END IF;
1883:
1884: RETURN;
1885:
1913:
1914: BEGIN
1915:
1916: d_progress := 0;
1917: IF (PO_LOG.d_proc) THEN
1918: PO_LOG.proc_begin(d_module);
1919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1914: BEGIN
1915:
1916: d_progress := 0;
1917: IF (PO_LOG.d_proc) THEN
1918: PO_LOG.proc_begin(d_module);
1919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1915:
1916: d_progress := 0;
1917: IF (PO_LOG.d_proc) THEN
1918: PO_LOG.proc_begin(d_module);
1919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1916: d_progress := 0;
1917: IF (PO_LOG.d_proc) THEN
1918: PO_LOG.proc_begin(d_module);
1919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1917: IF (PO_LOG.d_proc) THEN
1918: PO_LOG.proc_begin(d_module);
1919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1918: PO_LOG.proc_begin(d_module);
1919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1919: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1927: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1920: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1927: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1928: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1921: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1927: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1928: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1929: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1922: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1927: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1928: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1929: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1930: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
1923: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1927: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1928: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1929: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1930: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
1931: END IF;
1924: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1927: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1928: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1929: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1930: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
1931: END IF;
1932:
1925: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1927: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1928: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1929: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1930: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
1931: END IF;
1932:
1933: d_progress := 10;
1926: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1927: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1928: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1929: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1930: PO_LOG.proc_begin(d_module, 'p_enc_flag', p_enc_flag);
1931: END IF;
1932:
1933: d_progress := 10;
1934:
2164: d_progress := 46;
2165:
2166: END IF; -- p_document_type = ..
2167:
2168: IF (PO_LOG.d_stmt) THEN
2169: PO_LOG.stmt(d_module, d_progress, 'Updated' || SQL%ROWCOUNT || ' closed code rows.' );
2170: END IF;
2171:
2172: d_progress := 100;
2165:
2166: END IF; -- p_document_type = ..
2167:
2168: IF (PO_LOG.d_stmt) THEN
2169: PO_LOG.stmt(d_module, d_progress, 'Updated' || SQL%ROWCOUNT || ' closed code rows.' );
2170: END IF;
2171:
2172: d_progress := 100;
2173:
2246: ;
2247:
2248: d_progress := 160;
2249:
2250: IF (PO_LOG.d_stmt) THEN
2251: PO_LOG.stmt(d_module, d_progress, 'Updated' || SQL%ROWCOUNT || ' distribution gl_closed_dates' );
2252: END IF;
2253:
2254: END IF; -- if p_action = 'FINALLY CLOSE' OR ...
2247:
2248: d_progress := 160;
2249:
2250: IF (PO_LOG.d_stmt) THEN
2251: PO_LOG.stmt(d_module, d_progress, 'Updated' || SQL%ROWCOUNT || ' distribution gl_closed_dates' );
2252: END IF;
2253:
2254: END IF; -- if p_action = 'FINALLY CLOSE' OR ...
2255:
2254: END IF; -- if p_action = 'FINALLY CLOSE' OR ...
2255:
2256: x_return_status := 'S';
2257:
2258: IF (PO_LOG.d_proc) THEN
2259: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2260: PO_LOG.proc_end(d_module);
2261: END IF;
2262:
2255:
2256: x_return_status := 'S';
2257:
2258: IF (PO_LOG.d_proc) THEN
2259: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2260: PO_LOG.proc_end(d_module);
2261: END IF;
2262:
2263: EXCEPTION
2256: x_return_status := 'S';
2257:
2258: IF (PO_LOG.d_proc) THEN
2259: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2260: PO_LOG.proc_end(d_module);
2261: END IF;
2262:
2263: EXCEPTION
2264: WHEN others THEN
2265: x_return_status := 'U';
2266:
2267: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2268:
2269: IF (PO_LOG.d_exc) THEN
2270: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2271: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2272: PO_LOG.proc_end(d_module);
2273: END IF;
2266:
2267: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2268:
2269: IF (PO_LOG.d_exc) THEN
2270: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2271: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2272: PO_LOG.proc_end(d_module);
2273: END IF;
2274:
2267: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2268:
2269: IF (PO_LOG.d_exc) THEN
2270: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2271: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2272: PO_LOG.proc_end(d_module);
2273: END IF;
2274:
2275: RETURN;
2268:
2269: IF (PO_LOG.d_exc) THEN
2270: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2271: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2272: PO_LOG.proc_end(d_module);
2273: END IF;
2274:
2275: RETURN;
2276:
2301:
2302: BEGIN
2303:
2304: d_progress := 0;
2305: IF (PO_LOG.d_proc) THEN
2306: PO_LOG.proc_begin(d_module);
2307: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2308: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2309: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2302: BEGIN
2303:
2304: d_progress := 0;
2305: IF (PO_LOG.d_proc) THEN
2306: PO_LOG.proc_begin(d_module);
2307: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2308: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2309: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2310: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2303:
2304: d_progress := 0;
2305: IF (PO_LOG.d_proc) THEN
2306: PO_LOG.proc_begin(d_module);
2307: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2308: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2309: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2310: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2311: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2304: d_progress := 0;
2305: IF (PO_LOG.d_proc) THEN
2306: PO_LOG.proc_begin(d_module);
2307: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2308: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2309: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2310: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2311: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2312: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2305: IF (PO_LOG.d_proc) THEN
2306: PO_LOG.proc_begin(d_module);
2307: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2308: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2309: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2310: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2311: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2312: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2313: END IF;
2306: PO_LOG.proc_begin(d_module);
2307: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2308: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2309: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2310: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2311: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2312: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2313: END IF;
2314:
2307: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2308: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2309: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2310: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2311: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2312: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2313: END IF;
2314:
2315: IF (p_shipment_id IS NOT NULL)
2308: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2309: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2310: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2311: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2312: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2313: END IF;
2314:
2315: IF (p_shipment_id IS NOT NULL)
2316: THEN
2767: d_progress := 220;
2768:
2769: x_return_status := 'S';
2770:
2771: IF (PO_LOG.d_proc) THEN
2772: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2773: PO_LOG.proc_end(d_module);
2774: END IF;
2775:
2768:
2769: x_return_status := 'S';
2770:
2771: IF (PO_LOG.d_proc) THEN
2772: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2773: PO_LOG.proc_end(d_module);
2774: END IF;
2775:
2776: EXCEPTION
2769: x_return_status := 'S';
2770:
2771: IF (PO_LOG.d_proc) THEN
2772: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2773: PO_LOG.proc_end(d_module);
2774: END IF;
2775:
2776: EXCEPTION
2777: WHEN others THEN
2778: x_return_status := 'U';
2779:
2780: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2781:
2782: IF (PO_LOG.d_exc) THEN
2783: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2784: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2785: PO_LOG.proc_end(d_module);
2786: END IF;
2779:
2780: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2781:
2782: IF (PO_LOG.d_exc) THEN
2783: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2784: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2785: PO_LOG.proc_end(d_module);
2786: END IF;
2787:
2780: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2781:
2782: IF (PO_LOG.d_exc) THEN
2783: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2784: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2785: PO_LOG.proc_end(d_module);
2786: END IF;
2787:
2788: RETURN;
2781:
2782: IF (PO_LOG.d_exc) THEN
2783: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2784: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2785: PO_LOG.proc_end(d_module);
2786: END IF;
2787:
2788: RETURN;
2789:
2844:
2845: BEGIN
2846:
2847: d_progress := 0;
2848: IF (PO_LOG.d_proc) THEN
2849: PO_LOG.proc_begin(d_module);
2850: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2851: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2845: BEGIN
2846:
2847: d_progress := 0;
2848: IF (PO_LOG.d_proc) THEN
2849: PO_LOG.proc_begin(d_module);
2850: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2851: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2846:
2847: d_progress := 0;
2848: IF (PO_LOG.d_proc) THEN
2849: PO_LOG.proc_begin(d_module);
2850: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2851: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2847: d_progress := 0;
2848: IF (PO_LOG.d_proc) THEN
2849: PO_LOG.proc_begin(d_module);
2850: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2851: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2848: IF (PO_LOG.d_proc) THEN
2849: PO_LOG.proc_begin(d_module);
2850: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2851: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2849: PO_LOG.proc_begin(d_module);
2850: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2851: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2850: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2851: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2858: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2851: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2858: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2859: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2852: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2858: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2859: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2860: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
2853: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2858: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2859: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2860: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
2861: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2854: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2858: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2859: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2860: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
2861: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2862: END IF;
2855: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2858: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2859: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2860: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
2861: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2862: END IF;
2863:
2856: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2858: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2859: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2860: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
2861: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2862: END IF;
2863:
2864: d_progress := 10;
2857: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2858: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2859: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
2860: PO_LOG.proc_begin(d_module, 'p_action_date', p_action_date);
2861: PO_LOG.proc_begin(d_module, 'p_calling_mode', p_calling_mode);
2862: END IF;
2863:
2864: d_progress := 10;
2865:
2908: END IF; -- p_shipment_id IS NOT NULL
2909:
2910: d_progress := 60;
2911:
2912: IF (PO_LOG.d_stmt) THEN
2913: PO_LOG.stmt(d_module, d_progress, 'Count of lines = ' || to_char(l_lineid_tbl.COUNT));
2914: END IF;
2915:
2916: FOR i IN 1..l_lineid_tbl.COUNT
2909:
2910: d_progress := 60;
2911:
2912: IF (PO_LOG.d_stmt) THEN
2913: PO_LOG.stmt(d_module, d_progress, 'Count of lines = ' || to_char(l_lineid_tbl.COUNT));
2914: END IF;
2915:
2916: FOR i IN 1..l_lineid_tbl.COUNT
2917: LOOP
2963: AND poll.shipment_type <> 'PREPAYMENT'; --
2964:
2965: d_progress := 76;
2966:
2967: IF (PO_LOG.d_stmt) THEN
2968: PO_LOG.stmt(d_module, d_progress, 'l_lineid_tbl(i)', l_lineid_tbl(i));
2969: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
2970: END IF;
2971:
2964:
2965: d_progress := 76;
2966:
2967: IF (PO_LOG.d_stmt) THEN
2968: PO_LOG.stmt(d_module, d_progress, 'l_lineid_tbl(i)', l_lineid_tbl(i));
2969: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
2970: END IF;
2971:
2972: d_progress := 80;
2965: d_progress := 76;
2966:
2967: IF (PO_LOG.d_stmt) THEN
2968: PO_LOG.stmt(d_module, d_progress, 'l_lineid_tbl(i)', l_lineid_tbl(i));
2969: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
2970: END IF;
2971:
2972: d_progress := 80;
2973:
3056: FROM po_lines pol
3057: WHERE pol.po_header_id = p_document_id;
3058:
3059: d_progress := 220;
3060: IF (PO_LOG.d_stmt) THEN
3061: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3062: END IF;
3063:
3064: UPDATE po_headers poh
3057: WHERE pol.po_header_id = p_document_id;
3058:
3059: d_progress := 220;
3060: IF (PO_LOG.d_stmt) THEN
3061: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3062: END IF;
3063:
3064: UPDATE po_headers poh
3065: SET poh.closed_code = l_rollup_code
3133: END IF; -- if l_rollup_code is null
3134:
3135: d_progress := 310;
3136:
3137: IF (PO_LOG.d_stmt) THEN
3138: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3139: END IF;
3140:
3141: UPDATE po_releases por
3134:
3135: d_progress := 310;
3136:
3137: IF (PO_LOG.d_stmt) THEN
3138: PO_LOG.stmt(d_module, d_progress, 'l_rollup_code', l_rollup_code);
3139: END IF;
3140:
3141: UPDATE po_releases por
3142: SET por.closed_code = l_rollup_code
3170:
3171:
3172: d_progress := 400;
3173:
3174: IF (PO_LOG.d_stmt) THEN
3175: PO_LOG.stmt(d_module, d_progress, 'l_update_action_hist', l_update_action_hist);
3176: END IF;
3177:
3178: IF (l_update_action_hist)
3171:
3172: d_progress := 400;
3173:
3174: IF (PO_LOG.d_stmt) THEN
3175: PO_LOG.stmt(d_module, d_progress, 'l_update_action_hist', l_update_action_hist);
3176: END IF;
3177:
3178: IF (l_update_action_hist)
3179: THEN
3201:
3202: END IF; -- if (l_hist_action IS NULL)
3203:
3204: d_progress := 420;
3205: IF (PO_LOG.d_stmt) THEN
3206: PO_LOG.stmt(d_module, d_progress, 'l_hist_action', l_hist_action);
3207: END IF;
3208:
3209: PO_DOCUMENT_ACTION_UTIL.handle_ctl_action_history(
3202: END IF; -- if (l_hist_action IS NULL)
3203:
3204: d_progress := 420;
3205: IF (PO_LOG.d_stmt) THEN
3206: PO_LOG.stmt(d_module, d_progress, 'l_hist_action', l_hist_action);
3207: END IF;
3208:
3209: PO_DOCUMENT_ACTION_UTIL.handle_ctl_action_history(
3210: p_document_id => p_document_id
3224:
3225: d_progress := 430;
3226: l_ret_sts := 'U';
3227: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'handle_ctl_action_history not successful');
3228: IF (PO_LOG.d_exc) THEN
3229: PO_LOG.exc(d_module, d_progress, 'handle_ctl_action_history not successful');
3230: END IF;
3231:
3232: END IF;
3225: d_progress := 430;
3226: l_ret_sts := 'U';
3227: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'handle_ctl_action_history not successful');
3228: IF (PO_LOG.d_exc) THEN
3229: PO_LOG.exc(d_module, d_progress, 'handle_ctl_action_history not successful');
3230: END IF;
3231:
3232: END IF;
3233:
3238: END IF; -- if (l_action_hist);
3239:
3240: x_return_status := l_ret_sts;
3241:
3242: IF (PO_LOG.d_proc) THEN
3243: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3244: PO_LOG.proc_end(d_module);
3245: END IF;
3246:
3239:
3240: x_return_status := l_ret_sts;
3241:
3242: IF (PO_LOG.d_proc) THEN
3243: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3244: PO_LOG.proc_end(d_module);
3245: END IF;
3246:
3247: RETURN;
3240: x_return_status := l_ret_sts;
3241:
3242: IF (PO_LOG.d_proc) THEN
3243: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3244: PO_LOG.proc_end(d_module);
3245: END IF;
3246:
3247: RETURN;
3248:
3262: x_return_status := 'U';
3263:
3264: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3265:
3266: IF (PO_LOG.d_exc) THEN
3267: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3268: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3269: PO_LOG.proc_end(d_module);
3270: END IF;
3263:
3264: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3265:
3266: IF (PO_LOG.d_exc) THEN
3267: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3268: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3269: PO_LOG.proc_end(d_module);
3270: END IF;
3271:
3264: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3265:
3266: IF (PO_LOG.d_exc) THEN
3267: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3268: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3269: PO_LOG.proc_end(d_module);
3270: END IF;
3271:
3272: RETURN;
3265:
3266: IF (PO_LOG.d_exc) THEN
3267: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3268: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3269: PO_LOG.proc_end(d_module);
3270: END IF;
3271:
3272: RETURN;
3273:
3293:
3294: BEGIN
3295:
3296: d_progress := 0;
3297: IF (PO_LOG.d_proc) THEN
3298: PO_LOG.proc_begin(d_module);
3299: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3300: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3301: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3294: BEGIN
3295:
3296: d_progress := 0;
3297: IF (PO_LOG.d_proc) THEN
3298: PO_LOG.proc_begin(d_module);
3299: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3300: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3301: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3302: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3295:
3296: d_progress := 0;
3297: IF (PO_LOG.d_proc) THEN
3298: PO_LOG.proc_begin(d_module);
3299: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3300: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3301: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3302: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3303: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3296: d_progress := 0;
3297: IF (PO_LOG.d_proc) THEN
3298: PO_LOG.proc_begin(d_module);
3299: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3300: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3301: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3302: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3303: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3304: END IF;
3297: IF (PO_LOG.d_proc) THEN
3298: PO_LOG.proc_begin(d_module);
3299: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3300: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3301: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3302: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3303: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3304: END IF;
3305:
3298: PO_LOG.proc_begin(d_module);
3299: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3300: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3301: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3302: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3303: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3304: END IF;
3305:
3306: d_progress := 10;
3299: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3300: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3301: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3302: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3303: PO_LOG.proc_begin(d_module, 'p_action', p_action);
3304: END IF;
3305:
3306: d_progress := 10;
3307:
3391:
3392: END IF; -- p_document_type = PO
3393:
3394: d_progress := 20;
3395: IF (PO_LOG.d_stmt) THEN
3396: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3397: END IF;
3398:
3399: l_supply_ret := PO_SUPPLY.po_req_supply(
3392: END IF; -- p_document_type = PO
3393:
3394: d_progress := 20;
3395: IF (PO_LOG.d_stmt) THEN
3396: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3397: END IF;
3398:
3399: l_supply_ret := PO_SUPPLY.po_req_supply(
3400: p_docid => p_document_id
3410: THEN
3411:
3412: d_progress := 30;
3413: x_return_status := 'U';
3414: IF (PO_LOG.d_exc) THEN
3415: PO_LOG.exc(d_module, d_progress, 'po_req_supply call not successful');
3416: END IF;
3417: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'po_req_supply call not successful');
3418:
3411:
3412: d_progress := 30;
3413: x_return_status := 'U';
3414: IF (PO_LOG.d_exc) THEN
3415: PO_LOG.exc(d_module, d_progress, 'po_req_supply call not successful');
3416: END IF;
3417: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'po_req_supply call not successful');
3418:
3419: ELSE
3419: ELSE
3420:
3421: d_progress := 40;
3422: x_return_status := 'S';
3423: IF (PO_LOG.d_stmt) THEN
3424: PO_LOG.stmt(d_module, d_progress, 'po_req_supply call was successful');
3425: END IF;
3426:
3427: END IF;
3420:
3421: d_progress := 40;
3422: x_return_status := 'S';
3423: IF (PO_LOG.d_stmt) THEN
3424: PO_LOG.stmt(d_module, d_progress, 'po_req_supply call was successful');
3425: END IF;
3426:
3427: END IF;
3428:
3425: END IF;
3426:
3427: END IF;
3428:
3429: IF (PO_LOG.d_proc) THEN
3430: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3431: PO_LOG.proc_end(d_module);
3432: END IF;
3433:
3426:
3427: END IF;
3428:
3429: IF (PO_LOG.d_proc) THEN
3430: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3431: PO_LOG.proc_end(d_module);
3432: END IF;
3433:
3434: RETURN;
3427: END IF;
3428:
3429: IF (PO_LOG.d_proc) THEN
3430: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3431: PO_LOG.proc_end(d_module);
3432: END IF;
3433:
3434: RETURN;
3435:
3438: x_return_status := 'U';
3439:
3440: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3441:
3442: IF (PO_LOG.d_exc) THEN
3443: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3444: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3445: PO_LOG.proc_end(d_module);
3446: END IF;
3439:
3440: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3441:
3442: IF (PO_LOG.d_exc) THEN
3443: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3444: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3445: PO_LOG.proc_end(d_module);
3446: END IF;
3447:
3440: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3441:
3442: IF (PO_LOG.d_exc) THEN
3443: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3444: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3445: PO_LOG.proc_end(d_module);
3446: END IF;
3447:
3448: RETURN;
3441:
3442: IF (PO_LOG.d_exc) THEN
3443: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3444: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3445: PO_LOG.proc_end(d_module);
3446: END IF;
3447:
3448: RETURN;
3449:
3471:
3472: BEGIN
3473:
3474: d_progress := 0;
3475: IF (PO_LOG.d_proc) THEN
3476: PO_LOG.proc_begin(d_module);
3477: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3478: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3479: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3472: BEGIN
3473:
3474: d_progress := 0;
3475: IF (PO_LOG.d_proc) THEN
3476: PO_LOG.proc_begin(d_module);
3477: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3478: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3479: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3480: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3473:
3474: d_progress := 0;
3475: IF (PO_LOG.d_proc) THEN
3476: PO_LOG.proc_begin(d_module);
3477: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3478: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3479: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3480: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3481: END IF;
3474: d_progress := 0;
3475: IF (PO_LOG.d_proc) THEN
3476: PO_LOG.proc_begin(d_module);
3477: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3478: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3479: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3480: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3481: END IF;
3482:
3475: IF (PO_LOG.d_proc) THEN
3476: PO_LOG.proc_begin(d_module);
3477: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3478: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3479: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3480: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3481: END IF;
3482:
3483: IF (p_shipment_id IS NOT NULL)
3476: PO_LOG.proc_begin(d_module);
3477: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
3478: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
3479: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
3480: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
3481: END IF;
3482:
3483: IF (p_shipment_id IS NOT NULL)
3484: THEN
3571: END IF; -- if p_document_type = 'PO'
3572:
3573: d_progress := 70;
3574:
3575: IF (PO_LOG.d_stmt) THEN
3576: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3577: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3578: END IF;
3579:
3572:
3573: d_progress := 70;
3574:
3575: IF (PO_LOG.d_stmt) THEN
3576: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3577: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3578: END IF;
3579:
3580: l_supply_ret := PO_SUPPLY.po_req_supply(
3573: d_progress := 70;
3574:
3575: IF (PO_LOG.d_stmt) THEN
3576: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3577: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3578: END IF;
3579:
3580: l_supply_ret := PO_SUPPLY.po_req_supply(
3581: p_docid => p_document_id
3588: );
3589:
3590: d_progress := 80;
3591:
3592: IF (PO_LOG.d_stmt) THEN
3593: PO_LOG.stmt(d_module, d_progress, 'l_supply_ret', l_supply_ret);
3594: END IF;
3595:
3596: IF (NOT l_supply_ret)
3589:
3590: d_progress := 80;
3591:
3592: IF (PO_LOG.d_stmt) THEN
3593: PO_LOG.stmt(d_module, d_progress, 'l_supply_ret', l_supply_ret);
3594: END IF;
3595:
3596: IF (NOT l_supply_ret)
3597: THEN
3598:
3599: d_progress := 90;
3600:
3601: l_ret_sts := 'U';
3602: IF (PO_LOG.d_exc) THEN
3603: PO_LOG.exc(d_module, d_progress, 'supply action not successful');
3604: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3605: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3606: END IF;
3599: d_progress := 90;
3600:
3601: l_ret_sts := 'U';
3602: IF (PO_LOG.d_exc) THEN
3603: PO_LOG.exc(d_module, d_progress, 'supply action not successful');
3604: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3605: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3606: END IF;
3607:
3600:
3601: l_ret_sts := 'U';
3602: IF (PO_LOG.d_exc) THEN
3603: PO_LOG.exc(d_module, d_progress, 'supply action not successful');
3604: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3605: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3606: END IF;
3607:
3608: EXIT;
3601: l_ret_sts := 'U';
3602: IF (PO_LOG.d_exc) THEN
3603: PO_LOG.exc(d_module, d_progress, 'supply action not successful');
3604: PO_LOG.stmt(d_module, d_progress, 'l_ship_it_tbl(i)', l_ship_id_tbl(i));
3605: PO_LOG.stmt(d_module, d_progress, 'l_supply_action', l_supply_action);
3606: END IF;
3607:
3608: EXIT;
3609:
3612: END LOOP;
3613:
3614: x_return_status := l_ret_sts;
3615:
3616: IF (PO_LOG.d_proc) THEN
3617: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3618: PO_LOG.proc_end(d_module);
3619: END IF;
3620:
3613:
3614: x_return_status := l_ret_sts;
3615:
3616: IF (PO_LOG.d_proc) THEN
3617: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3618: PO_LOG.proc_end(d_module);
3619: END IF;
3620:
3621: RETURN;
3614: x_return_status := l_ret_sts;
3615:
3616: IF (PO_LOG.d_proc) THEN
3617: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3618: PO_LOG.proc_end(d_module);
3619: END IF;
3620:
3621: RETURN;
3622:
3625: x_return_status := 'U';
3626:
3627: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3628:
3629: IF (PO_LOG.d_exc) THEN
3630: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3631: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3632: PO_LOG.proc_end(d_module);
3633: END IF;
3626:
3627: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3628:
3629: IF (PO_LOG.d_exc) THEN
3630: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3631: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3632: PO_LOG.proc_end(d_module);
3633: END IF;
3634:
3627: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
3628:
3629: IF (PO_LOG.d_exc) THEN
3630: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3631: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3632: PO_LOG.proc_end(d_module);
3633: END IF;
3634:
3635: RETURN;
3628:
3629: IF (PO_LOG.d_exc) THEN
3630: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
3631: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
3632: PO_LOG.proc_end(d_module);
3633: END IF;
3634:
3635: RETURN;
3636: