The following lines contain the word 'select', 'insert', 'update' or 'delete':
| PL/SQL body for package: PO_WF_PO_PRICAT_UPDATE
|
| NOTES
| MODIFIED IMRAN ALI (08/25/98) - Created
*=====================================================================*/
--
-- Process_line_items
--
procedure process_line_items ( itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
result out NOCOPY varchar2 )
is
x_progress varchar2(100);
SELECT interface_header_id, interface_line_id, price_chg_accept_flag, price_break_flag
FROM po_lines_interface
WHERE interface_header_id = X_interface_header_id
AND NVL(process_code, 'PENDING') = X_process_code
ORDER By interface_line_id, unit_price desc;
x_progress := 'PO_WF_PO_PRICAT_UPDATE.process_line_items: 01';
/* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey,x_progress);
po_debug.put_line ('Procedure PO_WF_PO_PRICAT_UPDATE.Process_line_items');
-- process price break - update acceptance flag.
update po_lines_interface
set price_chg_accept_flag = x_current_line_accept_flag
where interface_header_id = c_interface_header_id
and interface_line_id = c_interface_line_id;
wf_core.context('PO_WF_PO_PRICAT_UPDATE','process_line_items',x_progress);
select 'COMPLETE:N' into result from sys.dual
where exists ( select 'un_processed_items_exist'
from PO_LINES_INTERFACE
where interface_header_id = x_interface_header_id
and NVL(process_code, 'PENDING') = 'NOTIFIED'
and NVL(price_chg_accept_flag,'NULL') = 'NULL' );
wf_core.context('PO_WF_PO_PRICAT_UPDATE','were_all_items_processed',x_progress);
select 'COMPLETE:Y' into result from sys.dual
where exists ( select 'items_were_rejected'
from PO_LINES_INTERFACE
where interface_header_id = x_interface_header_id
and NVL(process_code, 'PENDING') = 'NOTIFIED'
and NVL(price_chg_accept_flag,'NULL') = 'N');
wf_core.context('PO_WF_PO_PRICAT_UPDATE','were_any_items_rejected',x_progress);
select notification_id into x_nid
from wf_item_activity_statuses_v
where item_type = itemtype
AND item_key = itemkey
AND ACTIVITY_NAME = 'BUYER_NOTIFICATION';
wf_core.context('PO_WF_PO_PRICAT_UPDATE','cancel_buyer_notif',x_progress);