The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
transaction_id,
primary_quantity,
primary_unit_of_measure,
unit_of_measure,
source_doc_unit_of_measure,
transaction_type,
shipment_line_id,
po_line_location_id,
parent_transaction_id
FROM
rcv_transactions
WHERE transaction_date <= trunc(p_accrual_cutoff_date)+1
START WITH transaction_id = c_transaction_id
CONNECT BY parent_transaction_id = PRIOR transaction_id;
SELECT
item_id
INTO
X_item_id
FROM
rcv_shipment_lines
WHERE
shipment_line_id = v_shipment_line_id;
SELECT
transaction_type
INTO
v_parent_type
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
SELECT
transaction_type
INTO
v_parent_type
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
SELECT
transaction_type
INTO
v_parent_type
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
SELECT
transaction_type,parent_transaction_id
INTO
v_parent_type,grand_parent_id
FROM
rcv_transactions
WHERE
transaction_id = v_parent_id;
/*Bug 2272666 Added the no data found exception for the select statement itself
Earlier the no data found exception was handled for the entire function which
is removed because for this sql case it is not getting excuted sometimes.
If correction is done just after doing a receipt the grand parent id will be
-1 in that case the sql below won't fetch any records.
*/
BEGIN
SELECT
transaction_type
INTO
grand_parent_type
FROM
rcv_transactions
WHERE
transaction_id = grand_parent_id;
SELECT
ps.quantity,
rt.quantity_billed -- This quantity is in transaction UOM
INTO
ordered_po_qty,
billed_txn_qty
FROM
po_line_locations ps,
rcv_transactions rt
WHERE
rt.transaction_id = top_transaction_id and
rt.po_line_location_id = ps.line_location_id;