188:
189: BEGIN
190:
191: d_progress := 0;
192: IF (PO_LOG.d_proc) THEN
193: PO_LOG.proc_begin(d_module);
194: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
195: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
196: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
189: BEGIN
190:
191: d_progress := 0;
192: IF (PO_LOG.d_proc) THEN
193: PO_LOG.proc_begin(d_module);
194: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
195: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
196: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
197: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
190:
191: d_progress := 0;
192: IF (PO_LOG.d_proc) THEN
193: PO_LOG.proc_begin(d_module);
194: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
195: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
196: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
197: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
198: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
191: d_progress := 0;
192: IF (PO_LOG.d_proc) THEN
193: PO_LOG.proc_begin(d_module);
194: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
195: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
196: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
197: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
198: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
199: END IF;
192: IF (PO_LOG.d_proc) THEN
193: PO_LOG.proc_begin(d_module);
194: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
195: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
196: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
197: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
198: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
199: END IF;
200:
193: PO_LOG.proc_begin(d_module);
194: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
195: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
196: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
197: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
198: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
199: END IF;
200:
201: l_ret_val := FALSE;
194: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
195: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
196: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
197: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
198: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
199: END IF;
200:
201: l_ret_val := FALSE;
202:
214: INTO l_auth_status, l_head_closed, l_frozen_flag, l_user_hold_flag;
215: CLOSE state_rel;
216:
217: d_progress := 30;
218: IF (PO_LOG.d_stmt) THEN
219: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
220: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
221: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
222: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
215: CLOSE state_rel;
216:
217: d_progress := 30;
218: IF (PO_LOG.d_stmt) THEN
219: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
220: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
221: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
222: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
223:
216:
217: d_progress := 30;
218: IF (PO_LOG.d_stmt) THEN
219: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
220: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
221: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
222: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
223:
224: END IF;
217: d_progress := 30;
218: IF (PO_LOG.d_stmt) THEN
219: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
220: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
221: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
222: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
223:
224: END IF;
225:
218: IF (PO_LOG.d_stmt) THEN
219: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
220: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
221: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
222: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
223:
224: END IF;
225:
226: IF (p_shipment_id IS NOT NULL)
232: FETCH ship_closed INTO l_ship_closed;
233: CLOSE ship_closed;
234:
235: d_progress := 50;
236: IF (PO_LOG.d_stmt) THEN
237: PO_LOG.stmt(d_module, d_progress, 'l_ship_closed', l_ship_closed);
238: END IF;
239:
240: END IF;
233: CLOSE ship_closed;
234:
235: d_progress := 50;
236: IF (PO_LOG.d_stmt) THEN
237: PO_LOG.stmt(d_module, d_progress, 'l_ship_closed', l_ship_closed);
238: END IF;
239:
240: END IF;
241:
258: END IF;
259:
260: d_progress := 70;
261:
262: IF (PO_LOG.d_stmt) THEN
263: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
264: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
265: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
266: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
259:
260: d_progress := 70;
261:
262: IF (PO_LOG.d_stmt) THEN
263: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
264: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
265: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
266: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
267:
260: d_progress := 70;
261:
262: IF (PO_LOG.d_stmt) THEN
263: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
264: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
265: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
266: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
267:
268: END IF;
261:
262: IF (PO_LOG.d_stmt) THEN
263: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
264: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
265: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
266: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
267:
268: END IF;
269:
262: IF (PO_LOG.d_stmt) THEN
263: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
264: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
265: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
266: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
267:
268: END IF;
269:
270: IF (p_shipment_id IS NOT NULL) THEN
282: CLOSE ship_closed;
283: END IF;
284:
285: d_progress := 90;
286: IF (PO_LOG.d_stmt) THEN
287: PO_LOG.stmt(d_module, d_progress, 'l_ship_closed', l_ship_closed);
288: END IF;
289:
290: END IF;
283: END IF;
284:
285: d_progress := 90;
286: IF (PO_LOG.d_stmt) THEN
287: PO_LOG.stmt(d_module, d_progress, 'l_ship_closed', l_ship_closed);
288: END IF;
289:
290: END IF;
291:
304: CLOSE line_closed;
305: END IF;
306:
307: d_progress := 110;
308: IF (PO_LOG.d_stmt) THEN
309: PO_LOG.stmt(d_module, d_progress, 'l_line_closed', l_line_closed);
310: END IF;
311:
312: END IF;
305: END IF;
306:
307: d_progress := 110;
308: IF (PO_LOG.d_stmt) THEN
309: PO_LOG.stmt(d_module, d_progress, 'l_line_closed', l_line_closed);
310: END IF;
311:
312: END IF;
313:
319: FETCH state_req INTO l_auth_status, l_head_closed;
320: CLOSE state_req;
321:
322: d_progress := 130;
323: IF (PO_LOG.d_stmt) THEN
324: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
325: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
326: END IF;
327:
320: CLOSE state_req;
321:
322: d_progress := 130;
323: IF (PO_LOG.d_stmt) THEN
324: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
325: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
326: END IF;
327:
328: ELSE
321:
322: d_progress := 130;
323: IF (PO_LOG.d_stmt) THEN
324: PO_LOG.stmt(d_module, d_progress, 'l_auth_status', l_auth_status);
325: PO_LOG.stmt(d_module, d_progress, 'l_head_closed', l_head_closed);
326: END IF;
327:
328: ELSE
329:
329:
330: d_progress := 140;
331: l_ret_sts := 'U';
332: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'Bad Document Type');
333: IF (PO_LOG.d_exc) THEN
334: PO_LOG.exc(d_module, d_progress, 'Bad Document Type');
335: END IF;
336: RAISE PO_CORE_S.g_early_return_exc;
337:
330: d_progress := 140;
331: l_ret_sts := 'U';
332: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'Bad Document Type');
333: IF (PO_LOG.d_exc) THEN
334: PO_LOG.exc(d_module, d_progress, 'Bad Document Type');
335: END IF;
336: RAISE PO_CORE_S.g_early_return_exc;
337:
338: END IF;
342:
343: FOR i in p_allowed_states.auth_states.FIRST .. p_allowed_states.auth_states.LAST
344:
345: LOOP
346: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.auth_states(i): '||p_allowed_states.auth_states(i)||', l_auth_status: '||l_auth_status );
347: IF p_allowed_states.auth_states(i) = l_auth_status
348: THEN
349:
350: l_state_found := TRUE;
352: END IF;
353: END LOOP;
354:
355: d_progress := 160;
356: IF (PO_LOG.d_stmt) THEN
357: PO_LOG.stmt(d_module, d_progress, 'l_state_found', l_state_found);
358: END IF;
359:
360: IF NOT l_state_found
353: END LOOP;
354:
355: d_progress := 160;
356: IF (PO_LOG.d_stmt) THEN
357: PO_LOG.stmt(d_module, d_progress, 'l_state_found', l_state_found);
358: END IF;
359:
360: IF NOT l_state_found
361: THEN
360: IF NOT l_state_found
361: THEN
362:
363: d_progress := 170;
364: IF (PO_LOG.d_stmt) THEN
365: PO_LOG.stmt(d_module, d_progress, 'Current Authorization Status Not Allowed.');
366:
367: END IF;
368:
361: THEN
362:
363: d_progress := 170;
364: IF (PO_LOG.d_stmt) THEN
365: PO_LOG.stmt(d_module, d_progress, 'Current Authorization Status Not Allowed.');
366:
367: END IF;
368:
369: l_ret_sts := 'S';
375: l_closed_code := NVL(l_ship_closed, l_line_closed);
376: l_closed_code := NVL(l_closed_code, l_head_closed);
377:
378: d_progress := 180;
379: IF (PO_LOG.d_stmt) THEN
380: PO_LOG.stmt(d_module, d_progress, 'l_closed_code', l_closed_code);
381: END IF;
382:
383: l_state_found := FALSE;
376: l_closed_code := NVL(l_closed_code, l_head_closed);
377:
378: d_progress := 180;
379: IF (PO_LOG.d_stmt) THEN
380: PO_LOG.stmt(d_module, d_progress, 'l_closed_code', l_closed_code);
381: END IF;
382:
383: l_state_found := FALSE;
384:
392: END IF;
393: END LOOP;
394:
395: d_progress := 190;
396: IF (PO_LOG.d_stmt) THEN
397: PO_LOG.stmt(d_module, d_progress, 'l_state_found', l_state_found);
398: END IF;
399:
400: IF NOT l_state_found
393: END LOOP;
394:
395: d_progress := 190;
396: IF (PO_LOG.d_stmt) THEN
397: PO_LOG.stmt(d_module, d_progress, 'l_state_found', l_state_found);
398: END IF;
399:
400: IF NOT l_state_found
401: THEN
400: IF NOT l_state_found
401: THEN
402:
403: d_progress := 200;
404: IF (PO_LOG.d_stmt) THEN
405: PO_LOG.stmt(d_module, d_progress, 'Current Closed Status Not Allowed.');
406:
407: END IF;
408:
401: THEN
402:
403: d_progress := 200;
404: IF (PO_LOG.d_stmt) THEN
405: PO_LOG.stmt(d_module, d_progress, 'Current Closed Status Not Allowed.');
406:
407: END IF;
408:
409: l_ret_sts := 'S';
417:
418: THEN
419:
420: d_progress := 210;
421: IF (PO_LOG.d_stmt) THEN
422: PO_LOG.stmt(d_module, d_progress, 'Encumbrance is on. Checking reserved state');
423:
424: END IF;
425:
418: THEN
419:
420: d_progress := 210;
421: IF (PO_LOG.d_stmt) THEN
422: PO_LOG.stmt(d_module, d_progress, 'Encumbrance is on. Checking reserved state');
423:
424: END IF;
425:
426: PO_CORE_S.is_fully_reserved(
430: , x_fully_reserved_flag => l_fully_res_flag
431: );
432:
433: d_progress := 220;
434: IF (PO_LOG.d_stmt) THEN
435: PO_LOG.stmt(d_module, d_progress, 'l_fully_res_flag', l_fully_res_flag);
436:
437: END IF;
438:
431: );
432:
433: d_progress := 220;
434: IF (PO_LOG.d_stmt) THEN
435: PO_LOG.stmt(d_module, d_progress, 'l_fully_res_flag', l_fully_res_flag);
436:
437: END IF;
438:
439: IF (p_allowed_states.fully_reserved_flag <> l_fully_res_flag)
439: IF (p_allowed_states.fully_reserved_flag <> l_fully_res_flag)
440: THEN
441:
442: d_progress := 230;
443: IF (PO_LOG.d_stmt) THEN
444: PO_LOG.stmt(d_module, d_progress, 'Current Encumbrance reservation state not allowed.');
445:
446: END IF;
447:
440: THEN
441:
442: d_progress := 230;
443: IF (PO_LOG.d_stmt) THEN
444: PO_LOG.stmt(d_module, d_progress, 'Current Encumbrance reservation state not allowed.');
445:
446: END IF;
447:
448: l_ret_sts := 'S';
461: AND (p_allowed_states.frozen_flag <> l_frozen_flag))
462: THEN
463:
464: d_progress := 250;
465: IF (PO_LOG.d_stmt) THEN
466: PO_LOG.stmt(d_module, d_progress, 'Frozen flags do not match.');
467: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.frozen_flag', p_allowed_states.frozen_flag);
468:
469: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
462: THEN
463:
464: d_progress := 250;
465: IF (PO_LOG.d_stmt) THEN
466: PO_LOG.stmt(d_module, d_progress, 'Frozen flags do not match.');
467: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.frozen_flag', p_allowed_states.frozen_flag);
468:
469: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
470: END IF;
463:
464: d_progress := 250;
465: IF (PO_LOG.d_stmt) THEN
466: PO_LOG.stmt(d_module, d_progress, 'Frozen flags do not match.');
467: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.frozen_flag', p_allowed_states.frozen_flag);
468:
469: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
470: END IF;
471:
465: IF (PO_LOG.d_stmt) THEN
466: PO_LOG.stmt(d_module, d_progress, 'Frozen flags do not match.');
467: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.frozen_flag', p_allowed_states.frozen_flag);
468:
469: PO_LOG.stmt(d_module, d_progress, 'l_frozen_flag', l_frozen_flag);
470: END IF;
471:
472: l_ret_sts := 'S';
473: RAISE PO_CORE_S.g_early_return_exc;
478: AND (p_allowed_states.hold_flag <> l_user_hold_flag))
479: THEN
480:
481: d_progress := 260;
482: IF (PO_LOG.d_stmt) THEN
483: PO_LOG.stmt(d_module, d_progress, 'Hold flags do not match.');
484: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.hold_flag', p_allowed_states.hold_flag);
485:
486: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
479: THEN
480:
481: d_progress := 260;
482: IF (PO_LOG.d_stmt) THEN
483: PO_LOG.stmt(d_module, d_progress, 'Hold flags do not match.');
484: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.hold_flag', p_allowed_states.hold_flag);
485:
486: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
487: END IF;
480:
481: d_progress := 260;
482: IF (PO_LOG.d_stmt) THEN
483: PO_LOG.stmt(d_module, d_progress, 'Hold flags do not match.');
484: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.hold_flag', p_allowed_states.hold_flag);
485:
486: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
487: END IF;
488:
482: IF (PO_LOG.d_stmt) THEN
483: PO_LOG.stmt(d_module, d_progress, 'Hold flags do not match.');
484: PO_LOG.stmt(d_module, d_progress, 'p_allowed_states.hold_flag', p_allowed_states.hold_flag);
485:
486: PO_LOG.stmt(d_module, d_progress, 'l_user_hold_flag', l_user_hold_flag);
487: END IF;
488:
489: l_ret_sts := 'S';
490: RAISE PO_CORE_S.g_early_return_exc;
504:
505: x_return_status := l_ret_sts;
506:
507: d_progress := 280;
508: IF (PO_LOG.d_proc) THEN
509: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
510: PO_LOG.proc_return(d_module, l_ret_val);
511: PO_LOG.proc_end(d_module);
512: END IF;
505: x_return_status := l_ret_sts;
506:
507: d_progress := 280;
508: IF (PO_LOG.d_proc) THEN
509: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
510: PO_LOG.proc_return(d_module, l_ret_val);
511: PO_LOG.proc_end(d_module);
512: END IF;
513:
506:
507: d_progress := 280;
508: IF (PO_LOG.d_proc) THEN
509: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
510: PO_LOG.proc_return(d_module, l_ret_val);
511: PO_LOG.proc_end(d_module);
512: END IF;
513:
514: RETURN (l_ret_val);
507: d_progress := 280;
508: IF (PO_LOG.d_proc) THEN
509: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
510: PO_LOG.proc_return(d_module, l_ret_val);
511: PO_LOG.proc_end(d_module);
512: END IF;
513:
514: RETURN (l_ret_val);
515:
551:
552: x_return_status := 'U';
553:
554: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
555: IF (PO_LOG.d_exc) THEN
556: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
557: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
558: PO_LOG.proc_return(d_module, l_ret_val);
559: PO_LOG.proc_end(d_module);
552: x_return_status := 'U';
553:
554: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
555: IF (PO_LOG.d_exc) THEN
556: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
557: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
558: PO_LOG.proc_return(d_module, l_ret_val);
559: PO_LOG.proc_end(d_module);
560: END IF;
553:
554: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
555: IF (PO_LOG.d_exc) THEN
556: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
557: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
558: PO_LOG.proc_return(d_module, l_ret_val);
559: PO_LOG.proc_end(d_module);
560: END IF;
561:
554: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
555: IF (PO_LOG.d_exc) THEN
556: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
557: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
558: PO_LOG.proc_return(d_module, l_ret_val);
559: PO_LOG.proc_end(d_module);
560: END IF;
561:
562: return FALSE;
555: IF (PO_LOG.d_exc) THEN
556: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
557: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
558: PO_LOG.proc_return(d_module, l_ret_val);
559: PO_LOG.proc_end(d_module);
560: END IF;
561:
562: return FALSE;
563:
597:
598: BEGIN
599:
600: d_progress := 0;
601: IF (PO_LOG.d_proc) THEN
602: PO_LOG.proc_begin(d_module);
603: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
604: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
605: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
598: BEGIN
599:
600: d_progress := 0;
601: IF (PO_LOG.d_proc) THEN
602: PO_LOG.proc_begin(d_module);
603: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
604: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
605: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
606:
599:
600: d_progress := 0;
601: IF (PO_LOG.d_proc) THEN
602: PO_LOG.proc_begin(d_module);
603: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
604: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
605: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
606:
607: END IF;
600: d_progress := 0;
601: IF (PO_LOG.d_proc) THEN
602: PO_LOG.proc_begin(d_module);
603: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
604: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
605: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
606:
607: END IF;
608:
601: IF (PO_LOG.d_proc) THEN
602: PO_LOG.proc_begin(d_module);
603: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
604: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
605: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
606:
607: END IF;
608:
609: l_ret_sts := 'S';
618: FROM po_releases_all por
619: WHERE por.po_release_id = p_document_id;
620:
621: d_progress := 30;
622: IF (PO_LOG.d_stmt) THEN
623: PO_LOG.stmt(d_module, d_progress, 'x_preparer_id', x_preparer_id);
624: END IF;
625:
626: ELSIF (p_document_type in ('PO', 'PA'))
619: WHERE por.po_release_id = p_document_id;
620:
621: d_progress := 30;
622: IF (PO_LOG.d_stmt) THEN
623: PO_LOG.stmt(d_module, d_progress, 'x_preparer_id', x_preparer_id);
624: END IF;
625:
626: ELSIF (p_document_type in ('PO', 'PA'))
627: THEN
637: WHERE poh.po_header_id = p_document_id
638: AND poh.draft_id = p_draft_id;
639: EXCEPTION
640: WHEN OTHERS THEN
641: IF (PO_LOG.d_stmt) THEN
642: PO_LOG.stmt(d_module, d_progress, sqlcode||sqlerrm);
643: END IF;
644: END;
645: ELSE
638: AND poh.draft_id = p_draft_id;
639: EXCEPTION
640: WHEN OTHERS THEN
641: IF (PO_LOG.d_stmt) THEN
642: PO_LOG.stmt(d_module, d_progress, sqlcode||sqlerrm);
643: END IF;
644: END;
645: ELSE
646: BEGIN
649: FROM po_headers_all poh
650: WHERE poh.po_header_id = p_document_id;
651: EXCEPTION
652: WHEN OTHERS THEN
653: IF (PO_LOG.d_stmt) THEN
654: PO_LOG.stmt(d_module, d_progress, sqlcode||sqlerrm);
655: END IF;
656: END;
657: END IF;
650: WHERE poh.po_header_id = p_document_id;
651: EXCEPTION
652: WHEN OTHERS THEN
653: IF (PO_LOG.d_stmt) THEN
654: PO_LOG.stmt(d_module, d_progress, sqlcode||sqlerrm);
655: END IF;
656: END;
657: END IF;
658:
656: END;
657: END IF;
658:
659: d_progress := 50;
660: IF (PO_LOG.d_stmt) THEN
661: PO_LOG.stmt(d_module, d_progress, 'x_preparer_id', x_preparer_id);
662: END IF;
663:
664: ELSIF (p_document_type = 'REQUISITION') THEN
657: END IF;
658:
659: d_progress := 50;
660: IF (PO_LOG.d_stmt) THEN
661: PO_LOG.stmt(d_module, d_progress, 'x_preparer_id', x_preparer_id);
662: END IF;
663:
664: ELSIF (p_document_type = 'REQUISITION') THEN
665:
670: FROM po_requisition_headers_all porh
671: WHERE porh.requisition_header_id = p_document_id;
672:
673: d_progress := 70;
674: IF (PO_LOG.d_stmt) THEN
675: PO_LOG.stmt(d_module, d_progress, 'x_preparer_id', x_preparer_id);
676: END IF;
677:
678: ELSE
671: WHERE porh.requisition_header_id = p_document_id;
672:
673: d_progress := 70;
674: IF (PO_LOG.d_stmt) THEN
675: PO_LOG.stmt(d_module, d_progress, 'x_preparer_id', x_preparer_id);
676: END IF;
677:
678: ELSE
679:
680: l_ret_sts := 'U';
681:
682: d_progress := 80;
683: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'Bad Document Type');
684: IF (PO_LOG.d_exc) THEN
685: PO_LOG.exc(d_module, d_progress, 'Bad Document Type');
686: END IF;
687:
688: END IF;
681:
682: d_progress := 80;
683: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'Bad Document Type');
684: IF (PO_LOG.d_exc) THEN
685: PO_LOG.exc(d_module, d_progress, 'Bad Document Type');
686: END IF;
687:
688: END IF;
689:
689:
690: x_return_status := l_ret_sts;
691:
692: d_progress := 100;
693: IF (PO_LOG.d_proc) THEN
694: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
695: PO_LOG.proc_end(d_module, 'x_preparer_id', x_preparer_id);
696: PO_LOG.proc_end(d_module);
697: END IF;
690: x_return_status := l_ret_sts;
691:
692: d_progress := 100;
693: IF (PO_LOG.d_proc) THEN
694: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
695: PO_LOG.proc_end(d_module, 'x_preparer_id', x_preparer_id);
696: PO_LOG.proc_end(d_module);
697: END IF;
698:
691:
692: d_progress := 100;
693: IF (PO_LOG.d_proc) THEN
694: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
695: PO_LOG.proc_end(d_module, 'x_preparer_id', x_preparer_id);
696: PO_LOG.proc_end(d_module);
697: END IF;
698:
699: RETURN;
692: d_progress := 100;
693: IF (PO_LOG.d_proc) THEN
694: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
695: PO_LOG.proc_end(d_module, 'x_preparer_id', x_preparer_id);
696: PO_LOG.proc_end(d_module);
697: END IF;
698:
699: RETURN;
700:
703: WHEN OTHERS THEN
704: x_return_status := 'U';
705:
706: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
707: IF (PO_LOG.d_exc) THEN
708: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
709: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
710: PO_LOG.proc_end(d_module);
711: END IF;
704: x_return_status := 'U';
705:
706: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
707: IF (PO_LOG.d_exc) THEN
708: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
709: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
710: PO_LOG.proc_end(d_module);
711: END IF;
712:
705:
706: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
707: IF (PO_LOG.d_exc) THEN
708: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
709: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
710: PO_LOG.proc_end(d_module);
711: END IF;
712:
713: RETURN;
706: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
707: IF (PO_LOG.d_exc) THEN
708: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
709: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
710: PO_LOG.proc_end(d_module);
711: END IF;
712:
713: RETURN;
714:
735:
736: BEGIN
737:
738: d_progress := 0;
739: IF (PO_LOG.d_proc) THEN
740: PO_LOG.proc_begin(d_module);
741: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
742: END IF;
743:
736: BEGIN
737:
738: d_progress := 0;
739: IF (PO_LOG.d_proc) THEN
740: PO_LOG.proc_begin(d_module);
741: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
742: END IF;
743:
744: BEGIN
737:
738: d_progress := 0;
739: IF (PO_LOG.d_proc) THEN
740: PO_LOG.proc_begin(d_module);
741: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
742: END IF;
743:
744: BEGIN
745: d_progress := 10;
752:
753: x_employee_flag := TRUE;
754:
755: d_progress := 20;
756: IF (PO_LOG.d_stmt) THEN
757: PO_LOG.stmt(d_module, d_progress, 'x_employee_id', x_employee_id);
758: PO_LOG.stmt(d_module, d_progress, 'x_employee_name', x_employee_name);
759: PO_LOG.stmt(d_module, d_progress, 'x_location_id', x_location_id);
760: END IF;
753: x_employee_flag := TRUE;
754:
755: d_progress := 20;
756: IF (PO_LOG.d_stmt) THEN
757: PO_LOG.stmt(d_module, d_progress, 'x_employee_id', x_employee_id);
758: PO_LOG.stmt(d_module, d_progress, 'x_employee_name', x_employee_name);
759: PO_LOG.stmt(d_module, d_progress, 'x_location_id', x_location_id);
760: END IF;
761:
754:
755: d_progress := 20;
756: IF (PO_LOG.d_stmt) THEN
757: PO_LOG.stmt(d_module, d_progress, 'x_employee_id', x_employee_id);
758: PO_LOG.stmt(d_module, d_progress, 'x_employee_name', x_employee_name);
759: PO_LOG.stmt(d_module, d_progress, 'x_location_id', x_location_id);
760: END IF;
761:
762: EXCEPTION
755: d_progress := 20;
756: IF (PO_LOG.d_stmt) THEN
757: PO_LOG.stmt(d_module, d_progress, 'x_employee_id', x_employee_id);
758: PO_LOG.stmt(d_module, d_progress, 'x_employee_name', x_employee_name);
759: PO_LOG.stmt(d_module, d_progress, 'x_location_id', x_location_id);
760: END IF;
761:
762: EXCEPTION
763: WHEN no_data_found THEN
765: x_location_id := NULL;
766: END;
767:
768: d_progress := 30;
769: IF (PO_LOG.d_stmt) THEN
770: PO_LOG.stmt(d_module, d_progress, 'x_employee_flag', x_employee_flag);
771: END IF;
772:
773: IF (x_location_id IS NOT NULL)
766: END;
767:
768: d_progress := 30;
769: IF (PO_LOG.d_stmt) THEN
770: PO_LOG.stmt(d_module, d_progress, 'x_employee_flag', x_employee_flag);
771: END IF;
772:
773: IF (x_location_id IS NOT NULL)
774: THEN
786: AND hr.inventory_organization_id = ood.organization_id (+)
787: AND nvl(ood.set_of_books_id, fsp.set_of_books_id) = fsp.set_of_books_id;
788:
789: d_progress := 50;
790: IF (PO_LOG.d_stmt) THEN
791: PO_LOG.stmt(d_module, d_progress, 'x_location_code', x_location_code);
792: END IF;
793:
794: EXCEPTION
787: AND nvl(ood.set_of_books_id, fsp.set_of_books_id) = fsp.set_of_books_id;
788:
789: d_progress := 50;
790: IF (PO_LOG.d_stmt) THEN
791: PO_LOG.stmt(d_module, d_progress, 'x_location_code', x_location_code);
792: END IF;
793:
794: EXCEPTION
795: WHEN no_data_found THEN
812:
813: x_is_buyer_flag := TRUE;
814:
815: d_progress := 70;
816: IF (PO_LOG.d_stmt) THEN
817: PO_LOG.stmt(d_module, d_progress, 'x_is_buyer_flag', x_is_buyer_flag);
818: END IF;
819:
820: EXCEPTION
813: x_is_buyer_flag := TRUE;
814:
815: d_progress := 70;
816: IF (PO_LOG.d_stmt) THEN
817: PO_LOG.stmt(d_module, d_progress, 'x_is_buyer_flag', x_is_buyer_flag);
818: END IF;
819:
820: EXCEPTION
821: WHEN no_data_found THEN
820: EXCEPTION
821: WHEN no_data_found THEN
822: x_is_buyer_flag := FALSE;
823: d_progress := 75;
824: IF (PO_LOG.d_stmt) THEN
825: PO_LOG.stmt(d_module, d_progress, 'x_is_buyer_flag', x_is_buyer_flag);
826: END IF;
827: END;
828:
821: WHEN no_data_found THEN
822: x_is_buyer_flag := FALSE;
823: d_progress := 75;
824: IF (PO_LOG.d_stmt) THEN
825: PO_LOG.stmt(d_module, d_progress, 'x_is_buyer_flag', x_is_buyer_flag);
826: END IF;
827: END;
828:
829: END IF; -- if x_employee_flag
829: END IF; -- if x_employee_flag
830:
831: x_return_status := 'S';
832: d_progress := 100;
833: IF (PO_LOG.d_proc) THEN
834: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
835: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
836: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
830:
831: x_return_status := 'S';
832: d_progress := 100;
833: IF (PO_LOG.d_proc) THEN
834: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
835: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
836: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
838: PO_LOG.proc_end(d_module, 'x_location_id', x_location_id);
831: x_return_status := 'S';
832: d_progress := 100;
833: IF (PO_LOG.d_proc) THEN
834: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
835: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
836: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
838: PO_LOG.proc_end(d_module, 'x_location_id', x_location_id);
839: PO_LOG.proc_end(d_module, 'x_location_code', x_location_code);
832: d_progress := 100;
833: IF (PO_LOG.d_proc) THEN
834: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
835: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
836: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
838: PO_LOG.proc_end(d_module, 'x_location_id', x_location_id);
839: PO_LOG.proc_end(d_module, 'x_location_code', x_location_code);
840: PO_LOG.proc_end(d_module, 'x_is_buyer_flag', x_is_buyer_flag);
833: IF (PO_LOG.d_proc) THEN
834: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
835: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
836: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
838: PO_LOG.proc_end(d_module, 'x_location_id', x_location_id);
839: PO_LOG.proc_end(d_module, 'x_location_code', x_location_code);
840: PO_LOG.proc_end(d_module, 'x_is_buyer_flag', x_is_buyer_flag);
841: PO_LOG.proc_end(d_module);
834: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
835: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
836: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
838: PO_LOG.proc_end(d_module, 'x_location_id', x_location_id);
839: PO_LOG.proc_end(d_module, 'x_location_code', x_location_code);
840: PO_LOG.proc_end(d_module, 'x_is_buyer_flag', x_is_buyer_flag);
841: PO_LOG.proc_end(d_module);
842: END IF;
835: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
836: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
838: PO_LOG.proc_end(d_module, 'x_location_id', x_location_id);
839: PO_LOG.proc_end(d_module, 'x_location_code', x_location_code);
840: PO_LOG.proc_end(d_module, 'x_is_buyer_flag', x_is_buyer_flag);
841: PO_LOG.proc_end(d_module);
842: END IF;
843:
836: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
838: PO_LOG.proc_end(d_module, 'x_location_id', x_location_id);
839: PO_LOG.proc_end(d_module, 'x_location_code', x_location_code);
840: PO_LOG.proc_end(d_module, 'x_is_buyer_flag', x_is_buyer_flag);
841: PO_LOG.proc_end(d_module);
842: END IF;
843:
844: RETURN;
837: PO_LOG.proc_end(d_module, 'x_employee_name', x_employee_name);
838: PO_LOG.proc_end(d_module, 'x_location_id', x_location_id);
839: PO_LOG.proc_end(d_module, 'x_location_code', x_location_code);
840: PO_LOG.proc_end(d_module, 'x_is_buyer_flag', x_is_buyer_flag);
841: PO_LOG.proc_end(d_module);
842: END IF;
843:
844: RETURN;
845:
847: WHEN OTHERS THEN
848: x_return_status := 'U';
849:
850: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
851: IF (PO_LOG.d_exc) THEN
852: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
853: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
854: PO_LOG.proc_end(d_module);
855: END IF;
848: x_return_status := 'U';
849:
850: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
851: IF (PO_LOG.d_exc) THEN
852: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
853: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
854: PO_LOG.proc_end(d_module);
855: END IF;
856:
849:
850: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
851: IF (PO_LOG.d_exc) THEN
852: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
853: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
854: PO_LOG.proc_end(d_module);
855: END IF;
856:
857: RETURN;
850: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
851: IF (PO_LOG.d_exc) THEN
852: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
853: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
854: PO_LOG.proc_end(d_module);
855: END IF;
856:
857: RETURN;
858:
872:
873: BEGIN
874:
875: d_progress := 0;
876: IF (PO_LOG.d_proc) THEN
877: PO_LOG.proc_begin(d_module);
878: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
879: END IF;
880:
873: BEGIN
874:
875: d_progress := 0;
876: IF (PO_LOG.d_proc) THEN
877: PO_LOG.proc_begin(d_module);
878: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
879: END IF;
880:
881: BEGIN
874:
875: d_progress := 0;
876: IF (PO_LOG.d_proc) THEN
877: PO_LOG.proc_begin(d_module);
878: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
879: END IF;
880:
881: BEGIN
882:
890:
891: x_employee_flag := TRUE;
892:
893: d_progress := 20;
894: IF (PO_LOG.d_stmt) THEN
895: PO_LOG.stmt(d_module, d_progress, 'x_employee_id', x_employee_id);
896: END IF;
897:
898: EXCEPTION
891: x_employee_flag := TRUE;
892:
893: d_progress := 20;
894: IF (PO_LOG.d_stmt) THEN
895: PO_LOG.stmt(d_module, d_progress, 'x_employee_id', x_employee_id);
896: END IF;
897:
898: EXCEPTION
899: WHEN no_data_found THEN
903:
904:
905: x_return_status := 'S';
906: d_progress := 100;
907: IF (PO_LOG.d_proc) THEN
908: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
909: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
910: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
911: PO_LOG.proc_end(d_module);
904:
905: x_return_status := 'S';
906: d_progress := 100;
907: IF (PO_LOG.d_proc) THEN
908: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
909: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
910: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
911: PO_LOG.proc_end(d_module);
912: END IF;
905: x_return_status := 'S';
906: d_progress := 100;
907: IF (PO_LOG.d_proc) THEN
908: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
909: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
910: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
911: PO_LOG.proc_end(d_module);
912: END IF;
913:
906: d_progress := 100;
907: IF (PO_LOG.d_proc) THEN
908: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
909: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
910: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
911: PO_LOG.proc_end(d_module);
912: END IF;
913:
914: RETURN;
907: IF (PO_LOG.d_proc) THEN
908: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
909: PO_LOG.proc_end(d_module, 'x_employee_flag', x_employee_flag);
910: PO_LOG.proc_end(d_module, 'x_employee_id', x_employee_id);
911: PO_LOG.proc_end(d_module);
912: END IF;
913:
914: RETURN;
915:
917: WHEN OTHERS THEN
918: x_return_status := 'U';
919:
920: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
921: IF (PO_LOG.d_exc) THEN
922: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
923: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
924: PO_LOG.proc_end(d_module);
925: END IF;
918: x_return_status := 'U';
919:
920: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
921: IF (PO_LOG.d_exc) THEN
922: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
923: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
924: PO_LOG.proc_end(d_module);
925: END IF;
926:
919:
920: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
921: IF (PO_LOG.d_exc) THEN
922: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
923: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
924: PO_LOG.proc_end(d_module);
925: END IF;
926:
927: RETURN;
920: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
921: IF (PO_LOG.d_exc) THEN
922: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
923: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
924: PO_LOG.proc_end(d_module);
925: END IF;
926:
927: RETURN;
928:
998:
999: BEGIN
1000:
1001: d_progress := 0;
1002: IF (PO_LOG.d_proc) THEN
1003: PO_LOG.proc_begin(d_module);
1004: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1005: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
999: BEGIN
1000:
1001: d_progress := 0;
1002: IF (PO_LOG.d_proc) THEN
1003: PO_LOG.proc_begin(d_module);
1004: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1005: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1000:
1001: d_progress := 0;
1002: IF (PO_LOG.d_proc) THEN
1003: PO_LOG.proc_begin(d_module);
1004: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1005: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1001: d_progress := 0;
1002: IF (PO_LOG.d_proc) THEN
1003: PO_LOG.proc_begin(d_module);
1004: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1005: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1002: IF (PO_LOG.d_proc) THEN
1003: PO_LOG.proc_begin(d_module);
1004: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1005: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1003: PO_LOG.proc_begin(d_module);
1004: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1005: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1004: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1005: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1012: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1005: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1012: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1013: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1006: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1012: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1013: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1014: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
1007: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1012: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1013: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1014: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
1015: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
1008: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1012: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1013: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1014: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
1015: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
1016: END IF;
1009: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1012: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1013: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1014: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
1015: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
1016: END IF;
1017:
1010: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1012: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1013: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1014: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
1015: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
1016: END IF;
1017:
1018: l_user_id := FND_GLOBAL.USER_ID;
1011: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1012: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1013: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1014: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
1015: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
1016: END IF;
1017:
1018: l_user_id := FND_GLOBAL.USER_ID;
1019: l_login_id := FND_GLOBAL.LOGIN_ID;
1018: l_user_id := FND_GLOBAL.USER_ID;
1019: l_login_id := FND_GLOBAL.LOGIN_ID;
1020:
1021: d_progress := 10;
1022: IF (PO_LOG.d_stmt) THEN
1023: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
1024: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
1025: END IF;
1026:
1019: l_login_id := FND_GLOBAL.LOGIN_ID;
1020:
1021: d_progress := 10;
1022: IF (PO_LOG.d_stmt) THEN
1023: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
1024: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
1025: END IF;
1026:
1027: BEGIN
1020:
1021: d_progress := 10;
1022: IF (PO_LOG.d_stmt) THEN
1023: PO_LOG.stmt(d_module, d_progress, 'l_user_id', l_user_id);
1024: PO_LOG.stmt(d_module, d_progress, 'l_login_id', l_login_id);
1025: END IF;
1026:
1027: BEGIN
1028:
1048: THEN
1049:
1050: l_emp_id := NULL;
1051:
1052: IF (PO_LOG.d_stmt) THEN
1053: PO_LOG.stmt(d_module, d_progress, 'user is not employee');
1054: END IF;
1055:
1056: END IF;
1049:
1050: l_emp_id := NULL;
1051:
1052: IF (PO_LOG.d_stmt) THEN
1053: PO_LOG.stmt(d_module, d_progress, 'user is not employee');
1054: END IF;
1055:
1056: END IF;
1057:
1118:
1119: END IF;
1120:
1121: d_progress := 90;
1122: IF (PO_LOG.d_stmt) THEN
1123: PO_LOG.stmt(d_module, d_progress, 'l_old_status', l_old_status);
1124: PO_LOG.stmt(d_module, d_progress, 'l_creation_date', l_creation_date);
1125: PO_LOG.stmt(d_module, d_progress, 'l_revision_num', l_revision_num);
1126: END IF;
1119: END IF;
1120:
1121: d_progress := 90;
1122: IF (PO_LOG.d_stmt) THEN
1123: PO_LOG.stmt(d_module, d_progress, 'l_old_status', l_old_status);
1124: PO_LOG.stmt(d_module, d_progress, 'l_creation_date', l_creation_date);
1125: PO_LOG.stmt(d_module, d_progress, 'l_revision_num', l_revision_num);
1126: END IF;
1127:
1120:
1121: d_progress := 90;
1122: IF (PO_LOG.d_stmt) THEN
1123: PO_LOG.stmt(d_module, d_progress, 'l_old_status', l_old_status);
1124: PO_LOG.stmt(d_module, d_progress, 'l_creation_date', l_creation_date);
1125: PO_LOG.stmt(d_module, d_progress, 'l_revision_num', l_revision_num);
1126: END IF;
1127:
1128: handle_auth_action_history(
1121: d_progress := 90;
1122: IF (PO_LOG.d_stmt) THEN
1123: PO_LOG.stmt(d_module, d_progress, 'l_old_status', l_old_status);
1124: PO_LOG.stmt(d_module, d_progress, 'l_creation_date', l_creation_date);
1125: PO_LOG.stmt(d_module, d_progress, 'l_revision_num', l_revision_num);
1126: END IF;
1127:
1128: handle_auth_action_history(
1129: p_document_id => p_document_id
1184: EXCEPTION
1185: WHEN PO_CORE_S.g_early_return_exc THEN
1186: l_ret_sts := 'U';
1187: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, l_err_msg);
1188: IF (PO_LOG.d_exc) THEN
1189: PO_LOG.exc(d_module, d_progress, l_err_msg);
1190: END IF;
1191:
1192: END;
1185: WHEN PO_CORE_S.g_early_return_exc THEN
1186: l_ret_sts := 'U';
1187: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, l_err_msg);
1188: IF (PO_LOG.d_exc) THEN
1189: PO_LOG.exc(d_module, d_progress, l_err_msg);
1190: END IF;
1191:
1192: END;
1193:
1192: END;
1193:
1194: x_return_status := l_ret_sts;
1195: d_progress := 130;
1196: IF (PO_LOG.d_proc) THEN
1197: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1198: PO_LOG.proc_end(d_module);
1199: END IF;
1200:
1193:
1194: x_return_status := l_ret_sts;
1195: d_progress := 130;
1196: IF (PO_LOG.d_proc) THEN
1197: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1198: PO_LOG.proc_end(d_module);
1199: END IF;
1200:
1201: RETURN;
1194: x_return_status := l_ret_sts;
1195: d_progress := 130;
1196: IF (PO_LOG.d_proc) THEN
1197: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1198: PO_LOG.proc_end(d_module);
1199: END IF;
1200:
1201: RETURN;
1202:
1204: WHEN OTHERS THEN
1205: x_return_status := 'U';
1206:
1207: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1208: IF (PO_LOG.d_exc) THEN
1209: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1210: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1211: PO_LOG.proc_end(d_module);
1212: END IF;
1205: x_return_status := 'U';
1206:
1207: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1208: IF (PO_LOG.d_exc) THEN
1209: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1210: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1211: PO_LOG.proc_end(d_module);
1212: END IF;
1213:
1206:
1207: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1208: IF (PO_LOG.d_exc) THEN
1209: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1210: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1211: PO_LOG.proc_end(d_module);
1212: END IF;
1213:
1214: RETURN;
1207: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1208: IF (PO_LOG.d_exc) THEN
1209: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1210: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1211: PO_LOG.proc_end(d_module);
1212: END IF;
1213:
1214: RETURN;
1215:
1248:
1249: BEGIN
1250:
1251: d_progress := 0;
1252: IF (PO_LOG.d_proc) THEN
1253: PO_LOG.proc_begin(d_module);
1254: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1255: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1249: BEGIN
1250:
1251: d_progress := 0;
1252: IF (PO_LOG.d_proc) THEN
1253: PO_LOG.proc_begin(d_module);
1254: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1255: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1250:
1251: d_progress := 0;
1252: IF (PO_LOG.d_proc) THEN
1253: PO_LOG.proc_begin(d_module);
1254: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1255: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1251: d_progress := 0;
1252: IF (PO_LOG.d_proc) THEN
1253: PO_LOG.proc_begin(d_module);
1254: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1255: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1259: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1252: IF (PO_LOG.d_proc) THEN
1253: PO_LOG.proc_begin(d_module);
1254: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1255: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1259: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1260: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1253: PO_LOG.proc_begin(d_module);
1254: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1255: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1259: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1260: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1261: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1254: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1255: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1259: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1260: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1261: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1262: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1255: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1259: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1260: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1261: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1262: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1263: END IF;
1256: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1259: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1260: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1261: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1262: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1263: END IF;
1264:
1257: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1259: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1260: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1261: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1262: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1263: END IF;
1264:
1265: d_progress := 10;
1258: PO_LOG.proc_begin(d_module, 'p_reason', p_reason);
1259: PO_LOG.proc_begin(d_module, 'p_line_id', p_line_id);
1260: PO_LOG.proc_begin(d_module, 'p_shipment_id', p_shipment_id);
1261: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1262: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1263: END IF;
1264:
1265: d_progress := 10;
1266:
1287: IF (l_emp_flag IS NULL) THEN
1288: l_emp_id := NULL;
1289: END IF;
1290:
1291: IF (PO_LOG.d_stmt) THEN
1292: PO_LOG.stmt(d_module, d_progress, 'l_emp_flag', l_emp_flag);
1293: PO_LOG.stmt(d_module, d_progress, 'l_emp_id', l_emp_id);
1294: END IF;
1295:
1288: l_emp_id := NULL;
1289: END IF;
1290:
1291: IF (PO_LOG.d_stmt) THEN
1292: PO_LOG.stmt(d_module, d_progress, 'l_emp_flag', l_emp_flag);
1293: PO_LOG.stmt(d_module, d_progress, 'l_emp_id', l_emp_id);
1294: END IF;
1295:
1296: d_progress := 40;
1289: END IF;
1290:
1291: IF (PO_LOG.d_stmt) THEN
1292: PO_LOG.stmt(d_module, d_progress, 'l_emp_flag', l_emp_flag);
1293: PO_LOG.stmt(d_module, d_progress, 'l_emp_id', l_emp_id);
1294: END IF;
1295:
1296: d_progress := 40;
1297:
1328:
1329: END IF; -- if (p_action IN ('CANCEL', 'FINALLY CLOSE'))
1330:
1331: d_progress := 100;
1332: IF (PO_LOG.d_stmt) THEN
1333: PO_LOG.stmt(d_module, d_progress, 'l_ctl_repaced_null_entry', l_ctl_replaced_null_entry);
1334: END IF;
1335:
1336: IF (NOT l_ctl_replaced_null_entry)
1329: END IF; -- if (p_action IN ('CANCEL', 'FINALLY CLOSE'))
1330:
1331: d_progress := 100;
1332: IF (PO_LOG.d_stmt) THEN
1333: PO_LOG.stmt(d_module, d_progress, 'l_ctl_repaced_null_entry', l_ctl_replaced_null_entry);
1334: END IF;
1335:
1336: IF (NOT l_ctl_replaced_null_entry)
1337: THEN
1359: AND poah.action_code IS NOT NULL;
1360:
1361: d_progress := 130;
1362:
1363: IF (PO_LOG.d_stmt) THEN
1364: PO_LOG.stmt(d_module, d_progress, 'l_count_hist', l_count_hist);
1365: END IF;
1366:
1367: IF (l_count_hist > 0)
1360:
1361: d_progress := 130;
1362:
1363: IF (PO_LOG.d_stmt) THEN
1364: PO_LOG.stmt(d_module, d_progress, 'l_count_hist', l_count_hist);
1365: END IF;
1366:
1367: IF (l_count_hist > 0)
1368: THEN
1440: FROM po_headers_all poh
1441: WHERE poh.po_header_id = p_document_id;
1442:
1443: d_progress := 160;
1444: IF (PO_LOG.d_stmt) THEN
1445: PO_LOG.stmt(d_module, d_progress, 'l_revision_num', l_revision_num);
1446: END IF;
1447:
1448: INSERT INTO po_action_history(
1441: WHERE poh.po_header_id = p_document_id;
1442:
1443: d_progress := 160;
1444: IF (PO_LOG.d_stmt) THEN
1445: PO_LOG.stmt(d_module, d_progress, 'l_revision_num', l_revision_num);
1446: END IF;
1447:
1448: INSERT INTO po_action_history(
1449: object_id
1500: EXCEPTION
1501: WHEN PO_CORE_S.g_early_return_exc THEN
1502: l_ret_sts := 'U';
1503: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1504: IF (PO_LOG.d_exc) THEN
1505: PO_LOG.exc(d_module, d_progress, d_msg);
1506: END IF;
1507: END;
1508:
1501: WHEN PO_CORE_S.g_early_return_exc THEN
1502: l_ret_sts := 'U';
1503: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, d_msg);
1504: IF (PO_LOG.d_exc) THEN
1505: PO_LOG.exc(d_module, d_progress, d_msg);
1506: END IF;
1507: END;
1508:
1509: x_return_status := l_ret_sts;
1507: END;
1508:
1509: x_return_status := l_ret_sts;
1510:
1511: IF (PO_LOG.d_proc) THEN
1512: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1513: PO_LOG.proc_end(d_module);
1514: END IF;
1515:
1508:
1509: x_return_status := l_ret_sts;
1510:
1511: IF (PO_LOG.d_proc) THEN
1512: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1513: PO_LOG.proc_end(d_module);
1514: END IF;
1515:
1516: RETURN;
1509: x_return_status := l_ret_sts;
1510:
1511: IF (PO_LOG.d_proc) THEN
1512: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1513: PO_LOG.proc_end(d_module);
1514: END IF;
1515:
1516: RETURN;
1517:
1519: WHEN OTHERS THEN
1520: x_return_status := 'U';
1521:
1522: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1523: IF (PO_LOG.d_exc) THEN
1524: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1525: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1526: PO_LOG.proc_end(d_module);
1527: END IF;
1520: x_return_status := 'U';
1521:
1522: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1523: IF (PO_LOG.d_exc) THEN
1524: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1525: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1526: PO_LOG.proc_end(d_module);
1527: END IF;
1528:
1521:
1522: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1523: IF (PO_LOG.d_exc) THEN
1524: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1525: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1526: PO_LOG.proc_end(d_module);
1527: END IF;
1528:
1529: RETURN;
1522: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1523: IF (PO_LOG.d_exc) THEN
1524: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1525: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1526: PO_LOG.proc_end(d_module);
1527: END IF;
1528:
1529: RETURN;
1530:
1558:
1559: BEGIN
1560:
1561: d_progress := 0;
1562: IF (PO_LOG.d_proc) THEN
1563: PO_LOG.proc_begin(d_module);
1564: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1565: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1559: BEGIN
1560:
1561: d_progress := 0;
1562: IF (PO_LOG.d_proc) THEN
1563: PO_LOG.proc_begin(d_module);
1564: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1565: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1560:
1561: d_progress := 0;
1562: IF (PO_LOG.d_proc) THEN
1563: PO_LOG.proc_begin(d_module);
1564: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1565: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1561: d_progress := 0;
1562: IF (PO_LOG.d_proc) THEN
1563: PO_LOG.proc_begin(d_module);
1564: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1565: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1562: IF (PO_LOG.d_proc) THEN
1563: PO_LOG.proc_begin(d_module);
1564: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1565: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1563: PO_LOG.proc_begin(d_module);
1564: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1565: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1564: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1565: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1565: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1573: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1566: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1573: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1574: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1567: PO_LOG.proc_begin(d_module, 'p_draft_id ', p_draft_id ); --CLM Apprvl
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1573: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1574: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1575: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1568: PO_LOG.proc_begin(d_module, 'p_action', p_action);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1573: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1574: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1575: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1576: PO_LOG.proc_begin(d_module, 'p_old_status', p_old_status);
1569: PO_LOG.proc_begin(d_module, 'p_fwd_to_id', p_fwd_to_id);
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1573: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1574: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1575: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1576: PO_LOG.proc_begin(d_module, 'p_old_status', p_old_status);
1577: END IF;
1570: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1573: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1574: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1575: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1576: PO_LOG.proc_begin(d_module, 'p_old_status', p_old_status);
1577: END IF;
1578:
1571: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1573: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1574: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1575: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1576: PO_LOG.proc_begin(d_module, 'p_old_status', p_old_status);
1577: END IF;
1578:
1579: d_progress := 10;
1572: PO_LOG.proc_begin(d_module, 'p_note', p_note);
1573: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
1574: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1575: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
1576: PO_LOG.proc_begin(d_module, 'p_old_status', p_old_status);
1577: END IF;
1578:
1579: d_progress := 10;
1580:
1768: EXCEPTION
1769: WHEN PO_CORE_S.g_early_return_exc THEN
1770: l_ret_sts := 'U';
1771: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'Insert or update action history not successful');
1772: IF (PO_LOG.d_exc) THEN
1773: PO_LOG.exc(d_module, d_progress, 'Insert or update action history not successful');
1774: END IF;
1775:
1776: END;
1769: WHEN PO_CORE_S.g_early_return_exc THEN
1770: l_ret_sts := 'U';
1771: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, 'Insert or update action history not successful');
1772: IF (PO_LOG.d_exc) THEN
1773: PO_LOG.exc(d_module, d_progress, 'Insert or update action history not successful');
1774: END IF;
1775:
1776: END;
1777:
1776: END;
1777:
1778: x_return_status := l_ret_sts;
1779: d_progress := 100;
1780: IF (PO_LOG.d_proc) THEN
1781: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1782: PO_LOG.proc_end(d_module);
1783: END IF;
1784:
1777:
1778: x_return_status := l_ret_sts;
1779: d_progress := 100;
1780: IF (PO_LOG.d_proc) THEN
1781: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1782: PO_LOG.proc_end(d_module);
1783: END IF;
1784:
1785: RETURN;
1778: x_return_status := l_ret_sts;
1779: d_progress := 100;
1780: IF (PO_LOG.d_proc) THEN
1781: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1782: PO_LOG.proc_end(d_module);
1783: END IF;
1784:
1785: RETURN;
1786:
1788: WHEN OTHERS THEN
1789: x_return_status := 'U';
1790:
1791: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1792: IF (PO_LOG.d_exc) THEN
1793: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1794: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1795: PO_LOG.proc_end(d_module);
1796: END IF;
1789: x_return_status := 'U';
1790:
1791: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1792: IF (PO_LOG.d_exc) THEN
1793: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1794: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1795: PO_LOG.proc_end(d_module);
1796: END IF;
1797:
1790:
1791: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1792: IF (PO_LOG.d_exc) THEN
1793: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1794: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1795: PO_LOG.proc_end(d_module);
1796: END IF;
1797:
1798: RETURN;
1791: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
1792: IF (PO_LOG.d_exc) THEN
1793: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
1794: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
1795: PO_LOG.proc_end(d_module);
1796: END IF;
1797:
1798: RETURN;
1799:
1829:
1830: BEGIN
1831:
1832: d_progress := 0;
1833: IF (PO_LOG.d_proc) THEN
1834: PO_LOG.proc_begin(d_module);
1835: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1836: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1837: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1830: BEGIN
1831:
1832: d_progress := 0;
1833: IF (PO_LOG.d_proc) THEN
1834: PO_LOG.proc_begin(d_module);
1835: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1836: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1837: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1838: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1831:
1832: d_progress := 0;
1833: IF (PO_LOG.d_proc) THEN
1834: PO_LOG.proc_begin(d_module);
1835: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1836: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1837: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1838: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1839: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1832: d_progress := 0;
1833: IF (PO_LOG.d_proc) THEN
1834: PO_LOG.proc_begin(d_module);
1835: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1836: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1837: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1838: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1839: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1840: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1833: IF (PO_LOG.d_proc) THEN
1834: PO_LOG.proc_begin(d_module);
1835: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1836: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1837: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1838: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1839: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1840: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1841: END IF;
1834: PO_LOG.proc_begin(d_module);
1835: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1836: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1837: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1838: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1839: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1840: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1841: END IF;
1842:
1835: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
1836: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1837: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1838: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1839: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1840: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1841: END IF;
1842:
1843: BEGIN
1836: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
1837: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
1838: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
1839: PO_LOG.proc_begin(d_module, 'p_new_status', p_new_status);
1840: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
1841: END IF;
1842:
1843: BEGIN
1844:
2179: EXCEPTION
2180: WHEN PO_CORE_S.g_early_return_exc THEN
2181: l_ret_sts := 'U';
2182: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, l_err_msg);
2183: IF (PO_LOG.d_exc) THEN
2184: PO_LOG.exc(d_module, d_progress, l_err_msg);
2185: END IF;
2186: END;
2187:
2180: WHEN PO_CORE_S.g_early_return_exc THEN
2181: l_ret_sts := 'U';
2182: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, l_err_msg);
2183: IF (PO_LOG.d_exc) THEN
2184: PO_LOG.exc(d_module, d_progress, l_err_msg);
2185: END IF;
2186: END;
2187:
2188:
2187:
2188:
2189: x_return_status := l_ret_sts;
2190: d_progress := 200;
2191: IF (PO_LOG.d_proc) THEN
2192: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2193: PO_LOG.proc_end(d_module);
2194: END IF;
2195:
2188:
2189: x_return_status := l_ret_sts;
2190: d_progress := 200;
2191: IF (PO_LOG.d_proc) THEN
2192: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2193: PO_LOG.proc_end(d_module);
2194: END IF;
2195:
2196: RETURN;
2189: x_return_status := l_ret_sts;
2190: d_progress := 200;
2191: IF (PO_LOG.d_proc) THEN
2192: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2193: PO_LOG.proc_end(d_module);
2194: END IF;
2195:
2196: RETURN;
2197:
2199: WHEN OTHERS THEN
2200: x_return_status := 'U';
2201:
2202: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2203: IF (PO_LOG.d_exc) THEN
2204: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2205: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2206: PO_LOG.proc_end(d_module);
2207: END IF;
2200: x_return_status := 'U';
2201:
2202: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2203: IF (PO_LOG.d_exc) THEN
2204: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2205: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2206: PO_LOG.proc_end(d_module);
2207: END IF;
2208:
2201:
2202: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2203: IF (PO_LOG.d_exc) THEN
2204: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2205: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2206: PO_LOG.proc_end(d_module);
2207: END IF;
2208:
2209: RETURN;
2202: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2203: IF (PO_LOG.d_exc) THEN
2204: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2205: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2206: PO_LOG.proc_end(d_module);
2207: END IF;
2208:
2209: RETURN;
2210:
2232:
2233: BEGIN
2234:
2235: d_progress := 0;
2236: IF (PO_LOG.d_proc) THEN
2237: PO_LOG.proc_begin(d_module);
2238: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2239: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2233: BEGIN
2234:
2235: d_progress := 0;
2236: IF (PO_LOG.d_proc) THEN
2237: PO_LOG.proc_begin(d_module);
2238: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2239: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2241: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
2234:
2235: d_progress := 0;
2236: IF (PO_LOG.d_proc) THEN
2237: PO_LOG.proc_begin(d_module);
2238: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2239: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2241: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
2242: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
2235: d_progress := 0;
2236: IF (PO_LOG.d_proc) THEN
2237: PO_LOG.proc_begin(d_module);
2238: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2239: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2241: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
2242: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
2243: PO_LOG.proc_begin(d_module, 'p_doc_creation_date', p_doc_creation_date);
2236: IF (PO_LOG.d_proc) THEN
2237: PO_LOG.proc_begin(d_module);
2238: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2239: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2241: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
2242: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
2243: PO_LOG.proc_begin(d_module, 'p_doc_creation_date', p_doc_creation_date);
2244: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2237: PO_LOG.proc_begin(d_module);
2238: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2239: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2241: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
2242: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
2243: PO_LOG.proc_begin(d_module, 'p_doc_creation_date', p_doc_creation_date);
2244: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2245: END IF;
2238: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2239: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2241: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
2242: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
2243: PO_LOG.proc_begin(d_module, 'p_doc_creation_date', p_doc_creation_date);
2244: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2245: END IF;
2246:
2239: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2241: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
2242: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
2243: PO_LOG.proc_begin(d_module, 'p_doc_creation_date', p_doc_creation_date);
2244: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2245: END IF;
2246:
2247: d_progress := 10;
2240: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2241: PO_LOG.proc_begin(d_module, 'p_notify_action', p_notify_action);
2242: PO_LOG.proc_begin(d_module, 'p_notify_employee', p_notify_employee);
2243: PO_LOG.proc_begin(d_module, 'p_doc_creation_date', p_doc_creation_date);
2244: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2245: END IF;
2246:
2247: d_progress := 10;
2248:
2291: END IF; -- p_notify_action IS NOT NULL
2292:
2293: x_return_status := 'S';
2294: d_progress := 100;
2295: IF (PO_LOG.d_proc) THEN
2296: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2297: PO_LOG.proc_end(d_module);
2298: END IF;
2299:
2292:
2293: x_return_status := 'S';
2294: d_progress := 100;
2295: IF (PO_LOG.d_proc) THEN
2296: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2297: PO_LOG.proc_end(d_module);
2298: END IF;
2299:
2300: RETURN;
2293: x_return_status := 'S';
2294: d_progress := 100;
2295: IF (PO_LOG.d_proc) THEN
2296: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2297: PO_LOG.proc_end(d_module);
2298: END IF;
2299:
2300: RETURN;
2301:
2303: WHEN OTHERS THEN
2304: x_return_status := 'U';
2305:
2306: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2307: IF (PO_LOG.d_exc) THEN
2308: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2309: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2310: PO_LOG.proc_end(d_module);
2311: END IF;
2304: x_return_status := 'U';
2305:
2306: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2307: IF (PO_LOG.d_exc) THEN
2308: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2309: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2310: PO_LOG.proc_end(d_module);
2311: END IF;
2312:
2305:
2306: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2307: IF (PO_LOG.d_exc) THEN
2308: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2309: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2310: PO_LOG.proc_end(d_module);
2311: END IF;
2312:
2313: RETURN;
2306: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2307: IF (PO_LOG.d_exc) THEN
2308: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2309: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2310: PO_LOG.proc_end(d_module);
2311: END IF;
2312:
2313: RETURN;
2314:
2340:
2341: BEGIN
2342:
2343: d_progress := 0;
2344: IF (PO_LOG.d_proc) THEN
2345: PO_LOG.proc_begin(d_module);
2346: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2347: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2341: BEGIN
2342:
2343: d_progress := 0;
2344: IF (PO_LOG.d_proc) THEN
2345: PO_LOG.proc_begin(d_module);
2346: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2347: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2342:
2343: d_progress := 0;
2344: IF (PO_LOG.d_proc) THEN
2345: PO_LOG.proc_begin(d_module);
2346: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2347: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2343: d_progress := 0;
2344: IF (PO_LOG.d_proc) THEN
2345: PO_LOG.proc_begin(d_module);
2346: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2347: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2344: IF (PO_LOG.d_proc) THEN
2345: PO_LOG.proc_begin(d_module);
2346: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2347: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2345: PO_LOG.proc_begin(d_module);
2346: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2347: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2346: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2347: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2354: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2347: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2354: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2355: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2348: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2354: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2355: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2356: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2349: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2354: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2355: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2356: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2357: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2350: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); -- CLM Apprvl
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2354: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2355: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2356: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2357: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2358: END IF;
2351: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2354: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2355: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2356: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2357: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2358: END IF;
2359:
2352: PO_LOG.proc_begin(d_module, 'p_employee_id', p_employee_id);
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2354: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2355: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2356: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2357: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2358: END IF;
2359:
2360: d_progress := 10;
2353: PO_LOG.proc_begin(d_module, 'p_offline_code', p_offline_code);
2354: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2355: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2356: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2357: PO_LOG.proc_begin(d_module, 'p_login_id', p_login_id);
2358: END IF;
2359:
2360: d_progress := 10;
2361:
2384: THEN
2385: l_sequence_num := 1; -- Bug 13579433
2386: END IF;
2387:
2388: IF (PO_LOG.d_stmt) THEN
2389: PO_LOG.stmt(d_module, d_progress, 'l_sequence_num', l_sequence_num);
2390: END IF;
2391: --
2392:
2385: l_sequence_num := 1; -- Bug 13579433
2386: END IF;
2387:
2388: IF (PO_LOG.d_stmt) THEN
2389: PO_LOG.stmt(d_module, d_progress, 'l_sequence_num', l_sequence_num);
2390: END IF;
2391: --
2392:
2393: d_progress := 20;
2438: );
2439:
2440: x_return_status := 'S';
2441: d_progress := 100;
2442: IF (PO_LOG.d_proc) THEN
2443: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2444: PO_LOG.proc_end(d_module);
2445: END IF;
2446:
2439:
2440: x_return_status := 'S';
2441: d_progress := 100;
2442: IF (PO_LOG.d_proc) THEN
2443: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2444: PO_LOG.proc_end(d_module);
2445: END IF;
2446:
2447: RETURN;
2440: x_return_status := 'S';
2441: d_progress := 100;
2442: IF (PO_LOG.d_proc) THEN
2443: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2444: PO_LOG.proc_end(d_module);
2445: END IF;
2446:
2447: RETURN;
2448:
2450: WHEN OTHERS THEN
2451: x_return_status := 'U';
2452:
2453: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2454: IF (PO_LOG.d_exc) THEN
2455: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2456: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2457: PO_LOG.proc_end(d_module);
2458: END IF;
2451: x_return_status := 'U';
2452:
2453: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2454: IF (PO_LOG.d_exc) THEN
2455: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2456: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2457: PO_LOG.proc_end(d_module);
2458: END IF;
2459:
2452:
2453: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2454: IF (PO_LOG.d_exc) THEN
2455: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2456: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2457: PO_LOG.proc_end(d_module);
2458: END IF;
2459:
2460: RETURN;
2453: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2454: IF (PO_LOG.d_exc) THEN
2455: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2456: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2457: PO_LOG.proc_end(d_module);
2458: END IF;
2459:
2460: RETURN;
2461:
2479:
2480: BEGIN
2481:
2482: d_progress := 0;
2483: IF (PO_LOG.d_proc) THEN
2484: PO_LOG.proc_begin(d_module);
2485: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2486: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2480: BEGIN
2481:
2482: d_progress := 0;
2483: IF (PO_LOG.d_proc) THEN
2484: PO_LOG.proc_begin(d_module);
2485: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2486: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2481:
2482: d_progress := 0;
2483: IF (PO_LOG.d_proc) THEN
2484: PO_LOG.proc_begin(d_module);
2485: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2486: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2489: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2482: d_progress := 0;
2483: IF (PO_LOG.d_proc) THEN
2484: PO_LOG.proc_begin(d_module);
2485: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2486: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2489: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2490: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2483: IF (PO_LOG.d_proc) THEN
2484: PO_LOG.proc_begin(d_module);
2485: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2486: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2489: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2490: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2491: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2484: PO_LOG.proc_begin(d_module);
2485: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2486: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2489: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2490: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2491: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2492: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2485: PO_LOG.proc_begin(d_module, 'p_document_id', p_document_id);
2486: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2489: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2490: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2491: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2492: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2493: END IF;
2486: PO_LOG.proc_begin(d_module, 'p_revision_num', p_revision_num);
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2489: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2490: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2491: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2492: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2493: END IF;
2494:
2487: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2489: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2490: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2491: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2492: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2493: END IF;
2494:
2495: d_progress := 10;
2488: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id); --CLM Apprvl
2489: PO_LOG.proc_begin(d_module, 'p_action', p_action);
2490: PO_LOG.proc_begin(d_module, 'p_approval_path_id', p_approval_path_id);
2491: PO_LOG.proc_begin(d_module, 'p_note', p_note);
2492: PO_LOG.proc_begin(d_module, 'p_user_id', p_user_id);
2493: END IF;
2494:
2495: d_progress := 10;
2496:
2522: END IF;
2523:
2524: x_return_status := 'S';
2525: d_progress := 100;
2526: IF (PO_LOG.d_proc) THEN
2527: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2528: PO_LOG.proc_end(d_module);
2529: END IF;
2530:
2523:
2524: x_return_status := 'S';
2525: d_progress := 100;
2526: IF (PO_LOG.d_proc) THEN
2527: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2528: PO_LOG.proc_end(d_module);
2529: END IF;
2530:
2531: RETURN;
2524: x_return_status := 'S';
2525: d_progress := 100;
2526: IF (PO_LOG.d_proc) THEN
2527: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2528: PO_LOG.proc_end(d_module);
2529: END IF;
2530:
2531: RETURN;
2532:
2534: WHEN OTHERS THEN
2535: x_return_status := 'U';
2536:
2537: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2538: IF (PO_LOG.d_exc) THEN
2539: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2540: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2541: PO_LOG.proc_end(d_module);
2542: END IF;
2535: x_return_status := 'U';
2536:
2537: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2538: IF (PO_LOG.d_exc) THEN
2539: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2540: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2541: PO_LOG.proc_end(d_module);
2542: END IF;
2543:
2536:
2537: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2538: IF (PO_LOG.d_exc) THEN
2539: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2540: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2541: PO_LOG.proc_end(d_module);
2542: END IF;
2543:
2544: RETURN;
2537: PO_DOCUMENT_ACTION_PVT.error_msg_append(d_module, d_progress, SQLCODE, SQLERRM);
2538: IF (PO_LOG.d_exc) THEN
2539: PO_LOG.exc(d_module, d_progress, SQLCODE || SQLERRM);
2540: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2541: PO_LOG.proc_end(d_module);
2542: END IF;
2543:
2544: RETURN;
2545:
2603: BEGIN
2604:
2605: d_progress := 0;
2606:
2607: IF (PO_LOG.d_proc) THEN
2608: PO_LOG.proc_begin(d_module);
2609: PO_LOG.proc_begin(d_module, 'p_po_line_id', p_po_line_id);
2610: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2611: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2604:
2605: d_progress := 0;
2606:
2607: IF (PO_LOG.d_proc) THEN
2608: PO_LOG.proc_begin(d_module);
2609: PO_LOG.proc_begin(d_module, 'p_po_line_id', p_po_line_id);
2610: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2611: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2612: END IF;
2605: d_progress := 0;
2606:
2607: IF (PO_LOG.d_proc) THEN
2608: PO_LOG.proc_begin(d_module);
2609: PO_LOG.proc_begin(d_module, 'p_po_line_id', p_po_line_id);
2610: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2611: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2612: END IF;
2613:
2606:
2607: IF (PO_LOG.d_proc) THEN
2608: PO_LOG.proc_begin(d_module);
2609: PO_LOG.proc_begin(d_module, 'p_po_line_id', p_po_line_id);
2610: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2611: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2612: END IF;
2613:
2614: -- Changed the above line to handle the CPA case also
2607: IF (PO_LOG.d_proc) THEN
2608: PO_LOG.proc_begin(d_module);
2609: PO_LOG.proc_begin(d_module, 'p_po_line_id', p_po_line_id);
2610: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2611: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2612: END IF;
2613:
2614: -- Changed the above line to handle the CPA case also
2615: SELECT po_header_id, from_line_id, nvl(from_header_id, contract_id), amount, quantity, matching_basis
2643: WHERE po_line_id = l_idv_line_id;
2644: END IF;
2645:
2646: d_progress := 10;
2647: IF (PO_LOG.d_stmt) THEN
2648: PO_LOG.stmt(d_module, d_progress, 'l_idv_header_id', l_idv_header_id);
2649: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line', l_amt_ordered_idv_line);
2650: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr', l_clm_amt_released_hdr);
2651: PO_LOG.stmt(d_module, d_progress, 'l_line_quantity', l_line_quantity);
2644: END IF;
2645:
2646: d_progress := 10;
2647: IF (PO_LOG.d_stmt) THEN
2648: PO_LOG.stmt(d_module, d_progress, 'l_idv_header_id', l_idv_header_id);
2649: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line', l_amt_ordered_idv_line);
2650: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr', l_clm_amt_released_hdr);
2651: PO_LOG.stmt(d_module, d_progress, 'l_line_quantity', l_line_quantity);
2652: PO_LOG.stmt(d_module, d_progress, 'l_line_amount', l_line_amount);
2645:
2646: d_progress := 10;
2647: IF (PO_LOG.d_stmt) THEN
2648: PO_LOG.stmt(d_module, d_progress, 'l_idv_header_id', l_idv_header_id);
2649: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line', l_amt_ordered_idv_line);
2650: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr', l_clm_amt_released_hdr);
2651: PO_LOG.stmt(d_module, d_progress, 'l_line_quantity', l_line_quantity);
2652: PO_LOG.stmt(d_module, d_progress, 'l_line_amount', l_line_amount);
2653:
2646: d_progress := 10;
2647: IF (PO_LOG.d_stmt) THEN
2648: PO_LOG.stmt(d_module, d_progress, 'l_idv_header_id', l_idv_header_id);
2649: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line', l_amt_ordered_idv_line);
2650: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr', l_clm_amt_released_hdr);
2651: PO_LOG.stmt(d_module, d_progress, 'l_line_quantity', l_line_quantity);
2652: PO_LOG.stmt(d_module, d_progress, 'l_line_amount', l_line_amount);
2653:
2654: END IF;
2647: IF (PO_LOG.d_stmt) THEN
2648: PO_LOG.stmt(d_module, d_progress, 'l_idv_header_id', l_idv_header_id);
2649: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line', l_amt_ordered_idv_line);
2650: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr', l_clm_amt_released_hdr);
2651: PO_LOG.stmt(d_module, d_progress, 'l_line_quantity', l_line_quantity);
2652: PO_LOG.stmt(d_module, d_progress, 'l_line_amount', l_line_amount);
2653:
2654: END IF;
2655: IF p_po_mode = po_document_action_pvt.g_doc_action_APPROVE THEN
2648: PO_LOG.stmt(d_module, d_progress, 'l_idv_header_id', l_idv_header_id);
2649: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line', l_amt_ordered_idv_line);
2650: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr', l_clm_amt_released_hdr);
2651: PO_LOG.stmt(d_module, d_progress, 'l_line_quantity', l_line_quantity);
2652: PO_LOG.stmt(d_module, d_progress, 'l_line_amount', l_line_amount);
2653:
2654: END IF;
2655: IF p_po_mode = po_document_action_pvt.g_doc_action_APPROVE THEN
2656:
2671: IF(l_line_type = 'QUANTITY') THEN
2672: l_qty_ordered_idv_line := nvl(l_qty_ordered_idv_line,0) + l_line_quantity;
2673: ELSIF (l_line_type = 'AMOUNT') THEN
2674: -- to do for complex pricing
2675: IF (PO_LOG.d_stmt) THEN
2676: PO_LOG.stmt(d_module, d_progress, 'l_line_type ', l_line_type);
2677: END IF;
2678:
2679: END IF;
2672: l_qty_ordered_idv_line := nvl(l_qty_ordered_idv_line,0) + l_line_quantity;
2673: ELSIF (l_line_type = 'AMOUNT') THEN
2674: -- to do for complex pricing
2675: IF (PO_LOG.d_stmt) THEN
2676: PO_LOG.stmt(d_module, d_progress, 'l_line_type ', l_line_type);
2677: END IF;
2678:
2679: END IF;
2680: END IF;
2714: IF(l_line_type = 'QUANTITY') THEN
2715: l_diff_qty := l_mod_quantity - l_line_quantity;
2716: l_qty_ordered_idv_line := l_qty_ordered_idv_line + l_diff_qty;
2717: ELSIF (l_line_type = 'AMOUNT') THEN
2718: IF (PO_LOG.d_stmt) THEN
2719: PO_LOG.stmt(d_module, d_progress, 'l_line_type ', l_line_type);
2720: END IF;
2721:
2722: END IF;
2715: l_diff_qty := l_mod_quantity - l_line_quantity;
2716: l_qty_ordered_idv_line := l_qty_ordered_idv_line + l_diff_qty;
2717: ELSIF (l_line_type = 'AMOUNT') THEN
2718: IF (PO_LOG.d_stmt) THEN
2719: PO_LOG.stmt(d_module, d_progress, 'l_line_type ', l_line_type);
2720: END IF;
2721:
2722: END IF;
2723: END IF;
2722: END IF;
2723: END IF;
2724: EXCEPTION
2725: WHEN No_Data_Found THEN
2726: PO_LOG.stmt(d_module, d_progress, 'Line is not modified ', p_po_line_id);
2727: END;
2728: END IF;
2729: /*ELSIF (p_po_mode = po_document_action_pvt.g_doc_action_CANCEL) THEN
2730:
2752: IF(l_line_type = 'QUANTITY') THEN
2753: l_qty_ordered_idv_line := l_qty_ordered_idv_line - l_tot_dist_can_qty;
2754: ELSIF (l_line_type = 'AMOUNT') THEN
2755: -- to do for complex pricing
2756: IF (PO_LOG.d_stmt) THEN
2757: PO_LOG.stmt(d_module, d_progress, 'l_line_type ', l_line_type);
2758: END IF;
2759: END IF;
2760: END IF;*/
2753: l_qty_ordered_idv_line := l_qty_ordered_idv_line - l_tot_dist_can_qty;
2754: ELSIF (l_line_type = 'AMOUNT') THEN
2755: -- to do for complex pricing
2756: IF (PO_LOG.d_stmt) THEN
2757: PO_LOG.stmt(d_module, d_progress, 'l_line_type ', l_line_type);
2758: END IF;
2759: END IF;
2760: END IF;*/
2761:
2762: END IF;
2763:
2764: d_progress := 70;
2765:
2766: IF (PO_LOG.d_stmt) THEN
2767: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr ', l_clm_amt_released_hdr);
2768: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line ', l_amt_ordered_idv_line);
2769: PO_LOG.stmt(d_module, d_progress, 'l_qty_ordered_idv_line ', l_qty_ordered_idv_line);
2770: END IF;
2763:
2764: d_progress := 70;
2765:
2766: IF (PO_LOG.d_stmt) THEN
2767: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr ', l_clm_amt_released_hdr);
2768: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line ', l_amt_ordered_idv_line);
2769: PO_LOG.stmt(d_module, d_progress, 'l_qty_ordered_idv_line ', l_qty_ordered_idv_line);
2770: END IF;
2771:
2764: d_progress := 70;
2765:
2766: IF (PO_LOG.d_stmt) THEN
2767: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr ', l_clm_amt_released_hdr);
2768: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line ', l_amt_ordered_idv_line);
2769: PO_LOG.stmt(d_module, d_progress, 'l_qty_ordered_idv_line ', l_qty_ordered_idv_line);
2770: END IF;
2771:
2772: UPDATE po_headers_all SET CLM_AMOUNT_RELEASED = l_clm_amt_released_hdr
2765:
2766: IF (PO_LOG.d_stmt) THEN
2767: PO_LOG.stmt(d_module, d_progress, 'l_clm_amt_released_hdr ', l_clm_amt_released_hdr);
2768: PO_LOG.stmt(d_module, d_progress, 'l_amt_ordered_idv_line ', l_amt_ordered_idv_line);
2769: PO_LOG.stmt(d_module, d_progress, 'l_qty_ordered_idv_line ', l_qty_ordered_idv_line);
2770: END IF;
2771:
2772: UPDATE po_headers_all SET CLM_AMOUNT_RELEASED = l_clm_amt_released_hdr
2773: WHERE po_header_id = l_idv_header_id;
2784: x_return_status := FND_API.g_ret_sts_success;
2785:
2786: d_progress := 90;
2787:
2788: IF (PO_LOG.d_proc) THEN
2789: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2790: PO_LOG.proc_end(d_module);
2791: END IF;
2792:
2785:
2786: d_progress := 90;
2787:
2788: IF (PO_LOG.d_proc) THEN
2789: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2790: PO_LOG.proc_end(d_module);
2791: END IF;
2792:
2793: EXCEPTION
2786: d_progress := 90;
2787:
2788: IF (PO_LOG.d_proc) THEN
2789: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2790: PO_LOG.proc_end(d_module);
2791: END IF;
2792:
2793: EXCEPTION
2794: WHEN OTHERS THEN
2792:
2793: EXCEPTION
2794: WHEN OTHERS THEN
2795: x_return_status := 'U';
2796: IF PO_LOG.d_stmt THEN
2797: PO_LOG.stmt(d_module, d_progress, 'x_return_status', x_return_status);
2798: END IF;
2799:
2800: END upd_idv_qty_amt;
2793: EXCEPTION
2794: WHEN OTHERS THEN
2795: x_return_status := 'U';
2796: IF PO_LOG.d_stmt THEN
2797: PO_LOG.stmt(d_module, d_progress, 'x_return_status', x_return_status);
2798: END IF;
2799:
2800: END upd_idv_qty_amt;
2801:
2842: BEGIN
2843:
2844: d_progress := 0;
2845:
2846: IF (PO_LOG.d_proc) THEN
2847: PO_LOG.proc_begin(d_module);
2848: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
2849: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2850: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2843:
2844: d_progress := 0;
2845:
2846: IF (PO_LOG.d_proc) THEN
2847: PO_LOG.proc_begin(d_module);
2848: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
2849: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2850: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2851: END IF;
2844: d_progress := 0;
2845:
2846: IF (PO_LOG.d_proc) THEN
2847: PO_LOG.proc_begin(d_module);
2848: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
2849: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2850: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2851: END IF;
2852:
2845:
2846: IF (PO_LOG.d_proc) THEN
2847: PO_LOG.proc_begin(d_module);
2848: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
2849: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2850: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2851: END IF;
2852:
2853: FOR c_get_po_line_dtls_rec IN c_get_po_line_dtls(p_po_header_id) LOOP
2846: IF (PO_LOG.d_proc) THEN
2847: PO_LOG.proc_begin(d_module);
2848: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
2849: PO_LOG.proc_begin(d_module, 'p_draft_id', p_draft_id);
2850: PO_LOG.proc_begin(d_module, 'p_po_mode', p_po_mode);
2851: END IF;
2852:
2853: FOR c_get_po_line_dtls_rec IN c_get_po_line_dtls(p_po_header_id) LOOP
2854: upd_idv_qty_amt(p_po_line_id => c_get_po_line_dtls_rec.po_line_id
2858: END LOOP;
2859:
2860: d_progress := 10;
2861:
2862: IF (PO_LOG.d_proc) THEN
2863: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2864: PO_LOG.proc_end(d_module);
2865: END IF;
2866:
2859:
2860: d_progress := 10;
2861:
2862: IF (PO_LOG.d_proc) THEN
2863: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2864: PO_LOG.proc_end(d_module);
2865: END IF;
2866:
2867: END upd_idv_qty_amt_hdr;
2860: d_progress := 10;
2861:
2862: IF (PO_LOG.d_proc) THEN
2863: PO_LOG.proc_end(d_module, 'x_return_status', x_return_status);
2864: PO_LOG.proc_end(d_module);
2865: END IF;
2866:
2867: END upd_idv_qty_amt_hdr;
2868: