The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT ol.inventory_item_id,
ol.item_revision,
ol.ordered_quantity,
ol.order_quantity_uom,
ol.shipped_quantity,
ol.fulfilled_quantity,
ol.org_id,
ol.item_type_code,
nvl(ol.sold_to_org_id, oh.sold_to_org_id),
nvl(ol.invoice_to_org_id, oh.invoice_to_org_id),
nvl(ol.ship_to_org_id, oh.ship_to_org_id),
nvl(ol.sold_from_org_id, oh.sold_from_org_id),
ol.line_id,
ol.header_id
INTO l_txn_source_rec.inventory_item_id,
l_txn_source_rec.item_revision,
l_txn_source_rec.source_quantity,
l_txn_source_rec.source_uom,
l_txn_source_rec.shipped_quantity,
l_txn_source_rec.fulfilled_quantity,
l_mo_org_id,
l_item_type_code,
l_txn_source_rec.party_account_id,
l_txn_source_rec.bill_to_address_id,
l_txn_source_rec.ship_to_address_id,
l_sold_from_org_id,
l_line_id,
px_txn_line_rec.source_txn_header_id
FROM oe_order_lines_all ol,
oe_order_headers_all oh
WHERE line_id = px_txn_line_rec.source_transaction_id
AND oh.header_id = ol.header_id;
SELECT party_id
INTO l_txn_source_rec.party_id
FROM hz_cust_accounts
where cust_account_id = l_txn_source_rec.party_account_id;
SELECT inventory_item_id,
revision,
shipped_quantity,
requested_quantity_uom,
organization_id,
customer_id
INTO l_txn_source_rec.inventory_item_id,
l_txn_source_rec.item_revision,
l_txn_source_rec.source_quantity,
l_txn_source_rec.source_uom,
l_txn_source_rec.organization_id,
l_txn_source_rec.party_id
-- FROM wsh_delivery_details
FROM wsh_delivery_details_ob_grp_v
WHERE delivery_detail_id = px_txn_line_rec.source_transaction_id;
SELECT item_id,
item_revision,
quantity,
unit_meas_lookup_code
INTO l_txn_source_rec.inventory_item_id,
l_txn_source_rec.item_revision,
l_txn_source_rec.source_quantity,
l_uom
FROM po_lines_all
WHERE po_line_id = px_txn_line_rec.source_transaction_id;
SELECT concatenated_segments ,
serial_number_control_code,
lot_control_code,
nvl(comms_nl_trackable_flag,'N'),
primary_uom_code,
nvl(shippable_item_flag,'N')
INTO l_txn_source_rec.inventory_item_name,
l_serial_control_code,
l_lot_control_code,
l_nl_trackable_flag,
l_txn_source_rec.primary_uom,
l_shippable_flag
FROM mtl_system_items_kfv
WHERE inventory_item_id = l_txn_source_rec.inventory_item_id
AND organization_id = l_txn_source_rec.organization_id;
SELECT sub_type_id
INTO l_sub_type_id
FROM csi_txn_sub_types
WHERE transaction_type_id = px_txn_line_rec.source_transaction_type_id
AND default_flag = 'Y';
SELECT concatenated_segments ,
serial_number_control_code,
lot_control_code,
nvl(comms_nl_trackable_flag,'N'),
primary_uom_code,
nvl(shippable_item_flag,'N')
INTO l_txn_source_rec.inventory_item_name,
l_serial_control_code,
l_lot_control_code,
l_nl_trackable_flag,
l_txn_source_rec.primary_uom,
l_shippable_flag
FROM mtl_system_items_kfv
WHERE inventory_item_id = l_txn_source_rec.inventory_item_id
AND organization_id = l_txn_source_rec.organization_id;
SELECT sub_type_id
INTO l_sub_type_id
FROM csi_txn_sub_types
WHERE transaction_type_id = p_txn_source_param_rec.source_transaction_type_id
AND default_flag = 'Y';
SELECT org_id INTO l_org_id
FROM oe_order_lines_all
WHERE line_id = p_order_line_id;
SELECT nvl(model_remnant_flag,'N'),ordered_quantity
INTO l_model_remnant_flag,l_model_qty
FROM oe_order_lines_all
WHERE line_id=l_parent_source_id;
SELECT nvl(link_to_line_id,-99)
INTO l_link_to_line_id
FROM oe_order_lines_all
WHERE line_id=l_child_source_id;
SELECT SUM(ordered_quantity) INTO l_sum_qty
FROM oe_order_lines_all
WHERE link_to_line_id = l_link_to_line_id
AND inventory_item_id = l_inventory_item_id;
SELECT * INTO l_model_line_rec
FROM oe_order_lines_all
WHERE line_id = p_model_line_id;
select sum(ordered_quantity)
into l_order_line_qty
from oe_order_lines_all
where link_to_line_id = l_line_tbl(l_ind).link_to_line_id
and inventory_item_id = l_line_tbl(l_ind).inventory_item_id
and model_remnant_flag = 'Y';
SELECT source_transaction_type_id,
source_txn_header_id
INTO l_src_txn_type_id,
l_src_txn_hdr_id
FROM csi_t_transaction_lines
WHERE source_transaction_table = p_txn_cascade_tbl(1).parent_source_table
AND source_transaction_id = p_txn_cascade_tbl(1).parent_source_id;
select nvl(ordered_quantity,0) INTO l_non_ib_mdl_qty
FROM oe_order_lines_all
WHERE line_id = p_txn_cascade_tbl(1).parent_source_id;
l_line_dtl_tbl.DELETE;
l_pty_dtl_tbl.DELETE;
l_pty_acct_tbl.DELETE;
l_ii_rltns_tbl.DELETE;
l_org_assgn_tbl.DELETE;
l_ext_attrib_tbl.DELETE;
l_txn_systems_tbl.DELETE;