The following lines contain the word 'select', 'insert', 'update' or 'delete':
select MSI.concatenated_segments, pl.ITEM_DESCRIPTION
into x_item_number, x_item_desc
from po_lines_all pl,
po_distributions_all pd,
mtl_system_items_kfv msi
where pd.po_distribution_id = p_po_distribution_id
and pd.po_line_id = pl.po_line_id
and msi.organization_id = p_organization_id
and pl.item_id = msi.inventory_item_id;
select po_line_id, line_location_id, po_header_id, org_id,
quantity_ordered
into x_po_line_id, x_line_location_id, x_po_header_id, x_org_id,
x_qty_ordered
from po_distributions_all
where po_distribution_id = p_po_distribution_id;
select promised_date
into x_curr_promise_date
from po_line_locations_all
where line_location_id = x_line_location_id;
select pv.vendor_name, pvs.vendor_site_code
into x_subcontractor_name, x_subcontractor_site
from po_vendors pv, po_vendor_sites_all pvs, po_headers_all ph
where ph.po_header_id = x_po_header_id
and pv.vendor_id = ph.vendor_id
and pvs.vendor_site_id = ph.vendor_site_id
and pvs.org_id = ph.org_id;
select unit_meas_lookup_code
into x_uom
from po_lines_all
where po_line_id = x_po_line_id;
wf_core.context('WIP_WF_UPDATE_DATE', 'StartWFNBDProcess', item_key);
/* update dates in PO_LINE_LOCATIONS */
PROCEDURE update_need_by_date( itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out nocopy varchar2) is
l_line_location_id number :=
wf_engine.GetItemAttrNumber( itemtype => itemtype,
itemkey => itemkey,
aname => 'LINE_LOCATION_ID');
PO_UPDATE_DATE_PKG.UPDATE_NEED_BY_DATE(l_line_location_id,
l_new_need_by_date);
wf_core.context('WIP_WF_UPDATE_DATE', 'Update Need By Date', itemtype,
itemkey, actid, funcmode);
END update_need_by_date;
/* update dates in PO_LINE_LOCATIONS */
PROCEDURE update_promise_date( itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out nocopy varchar2) is
l_line_location_id number :=
wf_engine.GetItemAttrNumber( itemtype => itemtype,
itemkey => itemkey,
aname => 'LINE_LOCATION_ID');
PO_UPDATE_DATE_PKG.UPDATE_PROMISED_DATE(l_line_location_id,
l_new_promise_date);
wf_core.context('WIP_WF_UPDATE_DATE', 'Update Promise Date', itemtype,
itemkey, actid, funcmode);
END update_promise_date;