1: PACKAGE BODY PO_PDOI_PRICE_TOLERANCE_PVT AS
2: /* $Header: PO_PDOI_PRICE_TOLERANCE_PVT.plb 120.5 2011/03/10 17:36:35 ppadilam ship $ */
3:
4: d_pkg_name CONSTANT VARCHAR2(50) :=
5: PO_LOG.get_package_base('PO_PDOI_PRICE_TOLERANCE_PVT');
6:
7: --------------------------------------------------------------------------
8: ---------------------- PRIVATE PROCEDURES PROTOTYPE ----------------------
9: --------------------------------------------------------------------------
86: l_batch_id Number;
87: BEGIN
88: d_position := 0;
89:
90: IF (PO_LOG.d_proc) THEN
91: PO_LOG.proc_begin(d_module, 'p_intf_header_id', p_intf_header_id);
92: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
93: PO_LOG.proc_begin(d_module, 'p_document_num', p_document_num);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
87: BEGIN
88: d_position := 0;
89:
90: IF (PO_LOG.d_proc) THEN
91: PO_LOG.proc_begin(d_module, 'p_intf_header_id', p_intf_header_id);
92: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
93: PO_LOG.proc_begin(d_module, 'p_document_num', p_document_num);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
88: d_position := 0;
89:
90: IF (PO_LOG.d_proc) THEN
91: PO_LOG.proc_begin(d_module, 'p_intf_header_id', p_intf_header_id);
92: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
93: PO_LOG.proc_begin(d_module, 'p_document_num', p_document_num);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
89:
90: IF (PO_LOG.d_proc) THEN
91: PO_LOG.proc_begin(d_module, 'p_intf_header_id', p_intf_header_id);
92: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
93: PO_LOG.proc_begin(d_module, 'p_document_num', p_document_num);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
90: IF (PO_LOG.d_proc) THEN
91: PO_LOG.proc_begin(d_module, 'p_intf_header_id', p_intf_header_id);
92: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
93: PO_LOG.proc_begin(d_module, 'p_document_num', p_document_num);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
91: PO_LOG.proc_begin(d_module, 'p_intf_header_id', p_intf_header_id);
92: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
93: PO_LOG.proc_begin(d_module, 'p_document_num', p_document_num);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
99: PO_LOG.proc_begin(d_module, 'p_buyer_id', p_buyer_id);
92: PO_LOG.proc_begin(d_module, 'p_po_header_id', p_po_header_id);
93: PO_LOG.proc_begin(d_module, 'p_document_num', p_document_num);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
99: PO_LOG.proc_begin(d_module, 'p_buyer_id', p_buyer_id);
100: PO_LOG.proc_begin(d_module, 'p_agent_id', p_agent_id);
93: PO_LOG.proc_begin(d_module, 'p_document_num', p_document_num);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
99: PO_LOG.proc_begin(d_module, 'p_buyer_id', p_buyer_id);
100: PO_LOG.proc_begin(d_module, 'p_agent_id', p_agent_id);
101: PO_LOG.proc_begin(d_module, 'p_vendor_id', p_vendor_id);
94: PO_LOG.proc_begin(d_module, 'p_batch_id', p_batch_id);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
99: PO_LOG.proc_begin(d_module, 'p_buyer_id', p_buyer_id);
100: PO_LOG.proc_begin(d_module, 'p_agent_id', p_agent_id);
101: PO_LOG.proc_begin(d_module, 'p_vendor_id', p_vendor_id);
102: PO_LOG.proc_begin(d_module, 'p_vendor_name', p_vendor_name);
95: PO_LOG.proc_begin(d_module, 'p_document_type', p_document_type);
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
99: PO_LOG.proc_begin(d_module, 'p_buyer_id', p_buyer_id);
100: PO_LOG.proc_begin(d_module, 'p_agent_id', p_agent_id);
101: PO_LOG.proc_begin(d_module, 'p_vendor_id', p_vendor_id);
102: PO_LOG.proc_begin(d_module, 'p_vendor_name', p_vendor_name);
103: END IF;
96: PO_LOG.proc_begin(d_module, 'p_document_subtype', p_document_subtype);
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
99: PO_LOG.proc_begin(d_module, 'p_buyer_id', p_buyer_id);
100: PO_LOG.proc_begin(d_module, 'p_agent_id', p_agent_id);
101: PO_LOG.proc_begin(d_module, 'p_vendor_id', p_vendor_id);
102: PO_LOG.proc_begin(d_module, 'p_vendor_name', p_vendor_name);
103: END IF;
104:
97: PO_LOG.proc_begin(d_module, 'p_commit_interval', p_commit_interval);
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
99: PO_LOG.proc_begin(d_module, 'p_buyer_id', p_buyer_id);
100: PO_LOG.proc_begin(d_module, 'p_agent_id', p_agent_id);
101: PO_LOG.proc_begin(d_module, 'p_vendor_id', p_vendor_id);
102: PO_LOG.proc_begin(d_module, 'p_vendor_name', p_vendor_name);
103: END IF;
104:
105: /*Bug 10023715:
98: PO_LOG.proc_begin(d_module, 'p_any_line_updated', p_any_line_updated);
99: PO_LOG.proc_begin(d_module, 'p_buyer_id', p_buyer_id);
100: PO_LOG.proc_begin(d_module, 'p_agent_id', p_agent_id);
101: PO_LOG.proc_begin(d_module, 'p_vendor_id', p_vendor_id);
102: PO_LOG.proc_begin(d_module, 'p_vendor_name', p_vendor_name);
103: END IF;
104:
105: /*Bug 10023715:
106: SELECT batch_id
128: );
129: RAISE;
130: END;
131:
132: IF (PO_LOG.d_stmt) THEN
133: PO_LOG.stmt(d_module, d_position, 'l_wf_item_key', l_wf_item_key);
134: PO_LOG.stmt(d_module, d_position, 'l_wf_item_exists', l_wf_item_exists);
135: PO_LOG.stmt(d_module, d_position, 'l_wf_item_end_date', l_wf_item_end_date);
136: END IF;
129: RAISE;
130: END;
131:
132: IF (PO_LOG.d_stmt) THEN
133: PO_LOG.stmt(d_module, d_position, 'l_wf_item_key', l_wf_item_key);
134: PO_LOG.stmt(d_module, d_position, 'l_wf_item_exists', l_wf_item_exists);
135: PO_LOG.stmt(d_module, d_position, 'l_wf_item_end_date', l_wf_item_end_date);
136: END IF;
137:
130: END;
131:
132: IF (PO_LOG.d_stmt) THEN
133: PO_LOG.stmt(d_module, d_position, 'l_wf_item_key', l_wf_item_key);
134: PO_LOG.stmt(d_module, d_position, 'l_wf_item_exists', l_wf_item_exists);
135: PO_LOG.stmt(d_module, d_position, 'l_wf_item_end_date', l_wf_item_end_date);
136: END IF;
137:
138: d_position := 10;
131:
132: IF (PO_LOG.d_stmt) THEN
133: PO_LOG.stmt(d_module, d_position, 'l_wf_item_key', l_wf_item_key);
134: PO_LOG.stmt(d_module, d_position, 'l_wf_item_exists', l_wf_item_exists);
135: PO_LOG.stmt(d_module, d_position, 'l_wf_item_end_date', l_wf_item_end_date);
136: END IF;
137:
138: d_position := 10;
139:
141: IF (l_wf_item_exists = 'Y' AND l_wf_item_end_date IS NULL) THEN
142: d_position := 20;
143:
144: -- Workflow item exists and is still open - bypass creating workflow
145: IF (PO_LOG.d_proc) THEN
146: PO_LOG.proc_end (d_module, 'bypass workflow', l_wf_item_exists);
147: END IF;
148:
149: RETURN;
142: d_position := 20;
143:
144: -- Workflow item exists and is still open - bypass creating workflow
145: IF (PO_LOG.d_proc) THEN
146: PO_LOG.proc_end (d_module, 'bypass workflow', l_wf_item_exists);
147: END IF;
148:
149: RETURN;
150: ELSE
151: d_position := 30;
152:
153: IF (l_wf_item_exists = 'Y' AND l_wf_item_end_date IS NOT NULL) THEN
154: -- Call purge workflow to remove the completed process
155: IF (PO_LOG.d_stmt) THEN
156: PO_LOG.stmt(d_module, d_position, 'Purging completed Workflow');
157: END IF;
158:
159: WF_PURGE.TOTAL
152:
153: IF (l_wf_item_exists = 'Y' AND l_wf_item_end_date IS NOT NULL) THEN
154: -- Call purge workflow to remove the completed process
155: IF (PO_LOG.d_stmt) THEN
156: PO_LOG.stmt(d_module, d_position, 'Purging completed Workflow');
157: END IF;
158:
159: WF_PURGE.TOTAL
160: (
172: WHERE interface_header_id = p_intf_header_id
173: AND process_code = 'NOTIFIED'
174: AND nvl(price_break_flag,'N') = 'N';
175:
176: IF (PO_LOG.d_stmt) THEN
177: PO_LOG.stmt(d_module, d_position, 'l_num_of_items', l_num_of_items);
178: END IF;
179:
180: d_position := 50;
173: AND process_code = 'NOTIFIED'
174: AND nvl(price_break_flag,'N') = 'N';
175:
176: IF (PO_LOG.d_stmt) THEN
177: PO_LOG.stmt(d_module, d_position, 'l_num_of_items', l_num_of_items);
178: END IF;
179:
180: d_position := 50;
181:
191:
192: l_open_form := 'PO_POXPCATN:INTERFACE_HEADER_ID="' || '&' || 'INTERFACE_HEADER_ID"' ||
193: ' ACCESS_LEVEL_CODE="' || '&' || 'ACCESS_LEVEL_CODE"';
194:
195: IF (PO_LOG.d_stmt) THEN
196: PO_LOG.stmt(d_module, d_position, 'l_agent_username', l_agent_username);
197: PO_LOG.stmt(d_module, d_position, 'l_agent_display_name', l_agent_display_name);
198: PO_LOG.stmt(d_module, d_position, 'l_open_form', l_open_form);
199: END IF;
192: l_open_form := 'PO_POXPCATN:INTERFACE_HEADER_ID="' || '&' || 'INTERFACE_HEADER_ID"' ||
193: ' ACCESS_LEVEL_CODE="' || '&' || 'ACCESS_LEVEL_CODE"';
194:
195: IF (PO_LOG.d_stmt) THEN
196: PO_LOG.stmt(d_module, d_position, 'l_agent_username', l_agent_username);
197: PO_LOG.stmt(d_module, d_position, 'l_agent_display_name', l_agent_display_name);
198: PO_LOG.stmt(d_module, d_position, 'l_open_form', l_open_form);
199: END IF;
200:
193: ' ACCESS_LEVEL_CODE="' || '&' || 'ACCESS_LEVEL_CODE"';
194:
195: IF (PO_LOG.d_stmt) THEN
196: PO_LOG.stmt(d_module, d_position, 'l_agent_username', l_agent_username);
197: PO_LOG.stmt(d_module, d_position, 'l_agent_display_name', l_agent_display_name);
198: PO_LOG.stmt(d_module, d_position, 'l_open_form', l_open_form);
199: END IF;
200:
201: WF_ENGINE.createProcess
194:
195: IF (PO_LOG.d_stmt) THEN
196: PO_LOG.stmt(d_module, d_position, 'l_agent_username', l_agent_username);
197: PO_LOG.stmt(d_module, d_position, 'l_agent_display_name', l_agent_display_name);
198: PO_LOG.stmt(d_module, d_position, 'l_open_form', l_open_form);
199: END IF;
200:
201: WF_ENGINE.createProcess
202: (
346: itemkey => l_wf_item_key
347: );
348: END IF;
349:
350: IF (PO_LOG.d_stmt) THEN
351: PO_LOG.stmt(d_module, d_position, 'workflow started');
352: END IF;
353:
354: IF (PO_LOG.d_proc) THEN
347: );
348: END IF;
349:
350: IF (PO_LOG.d_stmt) THEN
351: PO_LOG.stmt(d_module, d_position, 'workflow started');
352: END IF;
353:
354: IF (PO_LOG.d_proc) THEN
355: PO_LOG.proc_end (d_module);
350: IF (PO_LOG.d_stmt) THEN
351: PO_LOG.stmt(d_module, d_position, 'workflow started');
352: END IF;
353:
354: IF (PO_LOG.d_proc) THEN
355: PO_LOG.proc_end (d_module);
356: END IF;
357:
358: EXCEPTION
351: PO_LOG.stmt(d_module, d_position, 'workflow started');
352: END IF;
353:
354: IF (PO_LOG.d_proc) THEN
355: PO_LOG.proc_end (d_module);
356: END IF;
357:
358: EXCEPTION
359: WHEN OTHERS THEN
411: l_index NUMBER;
412: BEGIN
413: d_position := 0;
414:
415: IF (PO_LOG.d_proc) THEN
416: PO_LOG.proc_begin(d_module, 'p_po_header_id_tbl', p_po_header_id_tbl);
417: PO_LOG.proc_begin(d_module, 'p_item_id_tbl', p_item_id_tbl);
418: PO_LOG.proc_begin(d_module, 'p_category_id_tbl', p_category_id_tbl);
419: PO_LOG.proc_begin(d_module, 'p_vendor_id_tbl', p_vendor_id_tbl);
412: BEGIN
413: d_position := 0;
414:
415: IF (PO_LOG.d_proc) THEN
416: PO_LOG.proc_begin(d_module, 'p_po_header_id_tbl', p_po_header_id_tbl);
417: PO_LOG.proc_begin(d_module, 'p_item_id_tbl', p_item_id_tbl);
418: PO_LOG.proc_begin(d_module, 'p_category_id_tbl', p_category_id_tbl);
419: PO_LOG.proc_begin(d_module, 'p_vendor_id_tbl', p_vendor_id_tbl);
420: END IF;
413: d_position := 0;
414:
415: IF (PO_LOG.d_proc) THEN
416: PO_LOG.proc_begin(d_module, 'p_po_header_id_tbl', p_po_header_id_tbl);
417: PO_LOG.proc_begin(d_module, 'p_item_id_tbl', p_item_id_tbl);
418: PO_LOG.proc_begin(d_module, 'p_category_id_tbl', p_category_id_tbl);
419: PO_LOG.proc_begin(d_module, 'p_vendor_id_tbl', p_vendor_id_tbl);
420: END IF;
421:
414:
415: IF (PO_LOG.d_proc) THEN
416: PO_LOG.proc_begin(d_module, 'p_po_header_id_tbl', p_po_header_id_tbl);
417: PO_LOG.proc_begin(d_module, 'p_item_id_tbl', p_item_id_tbl);
418: PO_LOG.proc_begin(d_module, 'p_category_id_tbl', p_category_id_tbl);
419: PO_LOG.proc_begin(d_module, 'p_vendor_id_tbl', p_vendor_id_tbl);
420: END IF;
421:
422: -- initialize out parameter
415: IF (PO_LOG.d_proc) THEN
416: PO_LOG.proc_begin(d_module, 'p_po_header_id_tbl', p_po_header_id_tbl);
417: PO_LOG.proc_begin(d_module, 'p_item_id_tbl', p_item_id_tbl);
418: PO_LOG.proc_begin(d_module, 'p_category_id_tbl', p_category_id_tbl);
419: PO_LOG.proc_begin(d_module, 'p_vendor_id_tbl', p_vendor_id_tbl);
420: END IF;
421:
422: -- initialize out parameter
423: x_price_update_tolerance_tbl := PO_TBL_NUMBER();
451: RETURNING num1, num2 BULK COLLECT INTO l_index_tbl, l_tolerance_tbl;
452:
453: FOR i IN 1..l_index_tbl.COUNT
454: LOOP
455: IF (PO_LOG.d_stmt) THEN
456: PO_LOG.stmt(d_module, d_position, 'index', l_index_tbl(i));
457: PO_LOG.stmt(d_module, d_position, 'price tolerance from asl attributes',
458: l_tolerance_tbl(i));
459: END IF;
452:
453: FOR i IN 1..l_index_tbl.COUNT
454: LOOP
455: IF (PO_LOG.d_stmt) THEN
456: PO_LOG.stmt(d_module, d_position, 'index', l_index_tbl(i));
457: PO_LOG.stmt(d_module, d_position, 'price tolerance from asl attributes',
458: l_tolerance_tbl(i));
459: END IF;
460:
453: FOR i IN 1..l_index_tbl.COUNT
454: LOOP
455: IF (PO_LOG.d_stmt) THEN
456: PO_LOG.stmt(d_module, d_position, 'index', l_index_tbl(i));
457: PO_LOG.stmt(d_module, d_position, 'price tolerance from asl attributes',
458: l_tolerance_tbl(i));
459: END IF;
460:
461: x_price_update_tolerance_tbl(l_index_tbl(i)) := l_tolerance_tbl(i);
481: RETURNING num1, num2 BULK COLLECT INTO l_index_tbl, l_tolerance_tbl;
482:
483: FOR I IN 1..l_index_tbl.COUNT
484: LOOP
485: IF (PO_LOG.d_stmt) THEN
486: PO_LOG.stmt(d_module, d_position, 'index', l_index_tbl(i));
487: PO_LOG.stmt(d_module, d_position, 'price tolerance from headers',
488: l_tolerance_tbl(i));
489: END IF;
482:
483: FOR I IN 1..l_index_tbl.COUNT
484: LOOP
485: IF (PO_LOG.d_stmt) THEN
486: PO_LOG.stmt(d_module, d_position, 'index', l_index_tbl(i));
487: PO_LOG.stmt(d_module, d_position, 'price tolerance from headers',
488: l_tolerance_tbl(i));
489: END IF;
490:
483: FOR I IN 1..l_index_tbl.COUNT
484: LOOP
485: IF (PO_LOG.d_stmt) THEN
486: PO_LOG.stmt(d_module, d_position, 'index', l_index_tbl(i));
487: PO_LOG.stmt(d_module, d_position, 'price tolerance from headers',
488: l_tolerance_tbl(i));
489: END IF;
490:
491: x_price_update_tolerance_tbl(l_index_tbl(i)) := l_tolerance_tbl(i);
499: LOOP
500: d_position := 60;
501:
502: IF (x_price_update_tolerance_tbl(l_index) IS NULL) THEN
503: IF (PO_LOG.d_stmt) THEN
504: PO_LOG.stmt(d_module, d_position, 'index', l_index);
505: PO_LOG.stmt(d_module, d_position, 'price tolerance from profile',
506: PO_PDOI_PARAMS.g_profile.po_price_update_tolerance);
507: END IF;
500: d_position := 60;
501:
502: IF (x_price_update_tolerance_tbl(l_index) IS NULL) THEN
503: IF (PO_LOG.d_stmt) THEN
504: PO_LOG.stmt(d_module, d_position, 'index', l_index);
505: PO_LOG.stmt(d_module, d_position, 'price tolerance from profile',
506: PO_PDOI_PARAMS.g_profile.po_price_update_tolerance);
507: END IF;
508:
501:
502: IF (x_price_update_tolerance_tbl(l_index) IS NULL) THEN
503: IF (PO_LOG.d_stmt) THEN
504: PO_LOG.stmt(d_module, d_position, 'index', l_index);
505: PO_LOG.stmt(d_module, d_position, 'price tolerance from profile',
506: PO_PDOI_PARAMS.g_profile.po_price_update_tolerance);
507: END IF;
508:
509: x_price_update_tolerance_tbl(l_index) :=
512:
513: l_index := p_index_tbl.NEXT(l_index);
514: END LOOP;
515:
516: IF (PO_LOG.d_proc) THEN
517: PO_LOG.proc_end(d_module);
518: END IF;
519:
520: EXCEPTION
513: l_index := p_index_tbl.NEXT(l_index);
514: END LOOP;
515:
516: IF (PO_LOG.d_proc) THEN
517: PO_LOG.proc_end(d_module);
518: END IF;
519:
520: EXCEPTION
521: WHEN OTHERS THEN
559: l_exceed VARCHAR2(1) := FND_API.g_FALSE;
560: BEGIN
561: d_position := 0;
562:
563: IF (PO_LOG.d_proc) THEN
564: PO_LOG.proc_begin(d_module, 'p_price_tolerance', p_price_tolerance);
565: PO_LOG.proc_begin(d_module, 'p_old_price', p_old_price);
566: PO_LOG.proc_begin(d_module, 'p_new_price', p_new_price);
567: END IF;
560: BEGIN
561: d_position := 0;
562:
563: IF (PO_LOG.d_proc) THEN
564: PO_LOG.proc_begin(d_module, 'p_price_tolerance', p_price_tolerance);
565: PO_LOG.proc_begin(d_module, 'p_old_price', p_old_price);
566: PO_LOG.proc_begin(d_module, 'p_new_price', p_new_price);
567: END IF;
568:
561: d_position := 0;
562:
563: IF (PO_LOG.d_proc) THEN
564: PO_LOG.proc_begin(d_module, 'p_price_tolerance', p_price_tolerance);
565: PO_LOG.proc_begin(d_module, 'p_old_price', p_old_price);
566: PO_LOG.proc_begin(d_module, 'p_new_price', p_new_price);
567: END IF;
568:
569: d_position := 10;
562:
563: IF (PO_LOG.d_proc) THEN
564: PO_LOG.proc_begin(d_module, 'p_price_tolerance', p_price_tolerance);
565: PO_LOG.proc_begin(d_module, 'p_old_price', p_old_price);
566: PO_LOG.proc_begin(d_module, 'p_new_price', p_new_price);
567: END IF;
568:
569: d_position := 10;
570:
572: ((1 + p_price_tolerance/100) * p_old_price < p_new_price)) THEN
573: l_exceed := FND_API.g_TRUE;
574: END IF;
575:
576: IF (PO_LOG.d_proc) THEN
577: PO_LOG.proc_return(d_module, l_exceed);
578: END IF;
579:
580: RETURN l_exceed;
573: l_exceed := FND_API.g_TRUE;
574: END IF;
575:
576: IF (PO_LOG.d_proc) THEN
577: PO_LOG.proc_return(d_module, l_exceed);
578: END IF;
579:
580: RETURN l_exceed;
581: EXCEPTION