The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_insert NUMBER;
l_insert_mode NUMBER;
l_insert_status NUMBER;
'SELECT location_id,'
|| 'parent_location_id,'
|| 'location_code,'
|| 'active_start_date,'
|| 'active_end_date'
|| ' FROM pn_locations'
|| ' WHERE SYSDATE BETWEEN active_start_date AND NVL(active_end_date,'
|| ''''||TO_DATE('31/12/4712','DD/MM/YYYY') || ''''
||')';
x_insert => l_insert,
x_insert_mode => l_insert_mode,
x_insert_status => l_insert_status,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
IF l_insert = 1 AND l_process_flag THEN
l_info := 'Figuring out how location code maps to serial number ';
l_info := 'Inserting data into mtl_eam_asset_num_interface table ';
fnd_message.set_name ('PN','PN_XPEAM_INSERTING');
INSERT INTO mtl_eam_asset_num_interface(
inventory_item_id,
serial_number,
interface_header_id,
import_mode,
import_scope,
current_status,
batch_id,
batch_name,
current_organization_id,
owning_department_id,
pn_location_id,
process_flag,
maintainable_flag,
creation_date,
last_update_date,
created_by,
last_updated_by,
last_update_login,
instance_number,
active_start_date,
active_end_date
) VALUES (
p_inventory_item_id,
l_serial_num,
mtl_eam_asset_int_header_s.nextval,
l_insert_mode,
1,
l_insert_status,
p_inventory_item_id,
p_batch_name,
p_organization_id,
p_owning_department_id,
location_rec.location_id,
'P',
p_maintainable_flag,
SYSDATE,
SYSDATE,
fnd_global.user_id,
fnd_global.user_id,
fnd_global.login_id,
l_serial_num,
location_rec.active_start_date,
location_rec.active_end_date
);
fnd_message.set_token ('IMP_MODE', TO_CHAR(l_insert_mode));
fnd_message.set_token ('CUR_STATUS', TO_CHAR(l_insert_status));
fnd_message.set_name ('PN','PN_XPEAM_INSERTED');
l_info := 'Doing batch commit after every 100 INSERT ';