The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT po_header_id, po_line_id
INTO l_orig_po_header_id, l_orig_po_line_id
FROM po_line_locations
WHERE line_location_id = p_orig_line_location_id;
select line_type_id, item_id
into l_line_type_id, l_item_id
from po_lines
where po_line_id=p_po_line_id; -- Bug 2761415
SELECT msi.invoice_close_tolerance,
msi.receive_close_tolerance
INTO l_invoice_close_tolerance,
l_receive_close_tolerance
FROM mtl_system_items msi
WHERE msi.inventory_item_id = l_item_id
AND msi.organization_id = x_po_shipment_record.ship_to_organization_id;
SELECT nvl(l_invoice_close_tolerance,msi.invoice_close_tolerance),
nvl(l_receive_close_tolerance,msi.receive_close_tolerance)
INTO l_invoice_close_tolerance,
l_receive_close_tolerance
FROM mtl_system_items msi
WHERE msi.inventory_item_id = l_item_id
AND msi.organization_id = p_inv_org_id;
SELECT nvl(l_receive_close_tolerance,receipt_close)
INTO l_receive_close_tolerance
FROM po_line_types_v
WHERE line_type_id = l_line_type_id;
SELECT nvl(l_invoice_close_tolerance, posp.INVOICE_CLOSE_TOLERANCE),
nvl(l_receive_close_tolerance, posp.RECEIVE_CLOSE_TOLERANCE)
INTO l_invoice_close_tolerance,
l_receive_close_tolerance
FROM po_system_parameters posp;
SELECT quotation_class_code,
vendor_site_id,
vendor_id
INTO l_quotation_class_code,
l_vendor_site_id,
l_vendor_id
FROM po_headers
WHERE po_header_id = l_orig_po_header_id;
SELECT match_option
INTO l_invoice_match_option
FROM po_vendor_sites
WHERE vendor_site_id = l_vendor_site_id;
SELECT match_option
INTO l_invoice_match_option
FROM po_vendors
WHERE vendor_id = l_vendor_id;
SELECT match_option
INTO l_invoice_match_option
FROM financials_system_parameters;
SELECT terms_id,
ship_via_lookup_code,
fob_lookup_code,
freight_terms_lookup_code
INTO l_terms_id,
l_ship_via_lookup_code,
l_fob,
l_freight_terms
FROM po_headers
WHERE po_header_id = l_orig_po_header_id ;
SELECT rcv.qty_rcv_tolerance,
rcv.qty_rcv_exception_code
INTO l_qty_tolerance,
l_qty_exception_code
FROM rcv_parameters rcv,
financials_system_parameters fsp
WHERE rcv.organization_id = fsp.inventory_organization_id;
SELECT receiving_flag,
inspection_required_flag
INTO l_rcv_flag,
l_insp_flag
FROM po_system_parameters;
x_po_shipment_record.last_updated_by := fnd_global.user_id;
x_po_shipment_record.last_update_date := SYSDATE;
x_po_shipment_record.last_update_login := fnd_global.login_id;
select unit_price
into l_price_from_line
from po_lines
where po_header_id = p_po_header_id
and po_line_id = p_po_line_id;
x_po_shipment_record.program_update_date := NULL;
SELECT po_line_locations_s.nextval
INTO x_po_shipment_record.line_location_id
FROM SYS.DUAL;