The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT SUM(order_quantity),
SUM(order_quantity_primary)
INTO x_past_due_qty_purch,
x_past_due_qty_primary
FROM chv_item_orders
WHERE schedule_id = x_schedule_id
AND schedule_item_id = x_schedule_item_id
AND due_date < x_horizon_start_date
-- AND document_approval_status = 'FIRM'
AND supply_document_type = 'RELEASE';
SELECT SUM(order_quantity),
SUM(order_quantity_primary)
INTO x_authorization_qty,
x_authorization_qty_primary
FROM chv_item_orders
WHERE schedule_id = x_schedule_id
AND schedule_item_id = x_schedule_item_id
AND due_date < x_authorization_end_date;