The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT count(1) into l_neg_exists
FROM mtl_onhand_quantities_detail
WHERE organization_id = p_organization_id
AND inventory_item_id = p_inventory_item_id
AND subinventory_code like p_subinventory
AND nvl(lot_number,'@@@') like nvl(p_lot,'@@@')
AND nvl(revision,'@@@') like nvl(p_revision,'@@@')
AND nvl(locator_id,-999) = nvl(p_locator,-999)
AND primary_transaction_quantity < 0
AND rownum < 2;
/* select USERENV('SESSIONID') into l_sessionid from dual;
insert into mtl_onhand_lock_temp(LOCK_HANDLE) values(l_lock_handle);
INSERT INTO mtl_onhand_lock_temp(
lock_handle
, header_id)
VALUES (
x_lock_handle
, p_header_id);
select lock_handle bulk collect into table_handle from mtl_onhand_lock_temp;
DELETE MTL_ONHAND_LOCK_TEMP;
DELETE mtl_onhand_lock_temp
WHERE header_id = p_header_id;
SELECT lock_handle
BULK COLLECT INTO table_handle
FROM mtl_onhand_lock_temp
WHERE header_id = p_header_id;
DELETE mtl_onhand_lock_temp
WHERE header_id = p_header_id;