The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT mp.organization_id
INTO x_trading_partner_ID
from mtl_parameters mp, hr_organization_information hoi
where mp.organization_id = hoi.organization_id and
hoi.org_information1 = 'INV' and
hoi.org_information2 = 'Y' and
hoi.org_information_context = 'CLASS' and
mp.organization_code = p_trading_partner_Code;
SELECT 'X'
INTO p_duplicate
FROM wsh_transactions_history
WHERE document_type = p_doc_type
AND document_number = p_doc_number
AND action_type = p_action_type
AND trading_partner_id = x_trading_partner_id
AND document_direction = p_doc_direction;
SELECT 'X'
INTO p_940_exists
FROM wsh_transactions_history
WHERE document_number = p_orig_document_number
AND document_type = 'SR'
AND document_direction = 'I'
AND action_type = 'A';
SELECT 'X'
INTO p_940_exists
FROM wsh_transactions_history
WHERE document_number = p_orig_document_number
AND document_type = 'SR'
AND document_direction = 'O'
AND action_type = 'A';
SELECT DISTINCT wdd.delivery_detail_id
FROM wsh_del_details_interface wdd,
wsh_del_assgn_interface wda
WHERE wdd.delivery_detail_interface_id = wda.delivery_detail_interface_id
AND wdd.container_flag = 'N'
AND wda.delivery_id = p_delivery_id
AND wda.interface_action_code = '94X_INBOUND'
AND wdd.interface_action_code = '94X_INBOUND';
SELECT 'X'
INTO x_delivery_exists
FROM wsh_new_deliveries
WHERE delivery_id = p_delivery_id;
SELECT 'X'
INTO x_delivery_detail_exists
FROM wsh_delivery_details wdd,
wsh_delivery_assignments_v wda
WHERE wdd.delivery_detail_id = wda.delivery_detail_id
AND wdd.delivery_detail_id = delivery_detail_int_rec.delivery_detail_id
AND wda.delivery_id = p_delivery_id;
SELECT customer_id, initial_pickup_location_id,
intmed_ship_to_location_id, organization_id,
ultimate_dropoff_location_id
FROM wsh_new_deliveries
WHERE delivery_id = p_delivery_id;
SELECT DISTINCT delivery_detail_id, customer_id, customer_item_id,
deliver_to_location_id, intmed_ship_to_location_id,
inventory_item_id, organization_id, ship_from_location_id,
ship_to_location_id
FROM wsh_delivery_details
WHERE delivery_detail_id = p_delivery_detail_id;
SELECT customer_id, initial_pickup_location_id,
intmed_ship_to_location_id, organization_id,
ultimate_dropoff_location_id
FROM wsh_new_del_interface
WHERE delivery_id = p_delivery_id
AND INTERFACE_ACTION_CODE ='94X_INBOUND';
SELECT DISTINCT wdd.delivery_detail_id, wdd.customer_id, wdd.customer_item_id,
wdd.deliver_to_location_id, wdd.intmed_ship_to_location_id,
wdd.inventory_item_id, wdd.organization_id,
wdd.ship_from_location_id, wdd.ship_to_location_id
FROM wsh_del_assgn_interface wda, wsh_del_details_interface wdd
WHERE wda.delivery_id = p_delivery_id
AND wda.delivery_detail_interface_id = wdd.delivery_detail_interface_id
AND wdd.container_flag = 'N'
AND WDD.INTERFACE_ACTION_CODE = '94X_INBOUND'
AND WDA.INTERFACE_ACTION_CODE ='94X_INBOUND';
wsh_debug_sv.log (l_module_name, 'Inserting into wsh_interface_errors');
INSERT INTO wsh_interface_errors
(interface_error_id,
interface_table_name,
interface_id, error_message, creation_date,
created_by, last_update_date, last_updated_by,
last_update_login,INTERFACE_ACTION_CODE)
VALUES (wsh_interface_errors_s.NEXTVAL,
p_interface_errors_rec.p_interface_table_name,
p_interface_errors_rec.p_interface_id, l_text, SYSDATE,
fnd_global.user_id, SYSDATE, fnd_global.user_id,
fnd_global.user_id,'94X_INBOUND');