The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT count(1)
INTO l_cnt
FROM mtl_units_of_measure_vl
WHERE UPPER(uom_code) = UPPER(p_uom);
/* Fill out rest of array with NULLs (or insert will fail) */
FOR i IN 1 .. 20 LOOP
IF i > l_num THEN
l_itemarray(i) := NULL;
SELECT hazard_class_id
INTO l_hazard_class_id
FROM po_hazard_classes
WHERE upper(hazard_class) = upper(p_hazrdmatl);
itg_debug_pub.Add( 'Inserting into mtl_system_items_interface',1);
g_action := 'Item-interface insert';
INSERT INTO mtl_system_items_interface (
set_process_id,
creation_date,
last_update_date,
last_updated_by,
hazard_class_id,
transaction_type,
process_flag,
primary_uom_code,
description,
segment1,
segment2,
segment3,
segment4,
segment5,
segment6,
segment7,
segment8,
segment9,
segment10,
segment11,
segment12,
segment13,
segment14,
segment15,
segment16,
segment17,
segment18,
segment19,
segment20,
organization_id,
inventory_item_status_code,
template_id,
receiving_routing_id,
item_type
) VALUES (
l_set_process_id,
l_create_date,
l_create_date,
FND_GLOBAL.user_id,
l_hazard_class_id,
DECODE(l_syncind, 'A','CREATE', 'C','UPDATE'),
1,
UPPER(p_uom),
p_itemdesc,
l_itemarray(1),
l_itemarray(2),
l_itemarray(3),
l_itemarray(4),
l_itemarray(5),
l_itemarray(6),
l_itemarray(7),
l_itemarray(8),
l_itemarray(9),
l_itemarray(10),
l_itemarray(11),
l_itemarray(12),
l_itemarray(13),
l_itemarray(14),
l_itemarray(15),
l_itemarray(16),
l_itemarray(17),
l_itemarray(18),
l_itemarray(19),
l_itemarray(20),
p_org_id,
p_itemstatus,
p_itemtype,
p_rctrout,
NULL
) RETURNING rowid INTO l_sii_rowid;
g_action := 'Item-categories interface insert';
itg_debug_pub.Add('SI - Inserting into mtl_items_categories_interface', 1);
INSERT INTO mtl_item_categories_interface(
set_process_id,
item_number,
creation_date,
last_update_date,
last_updated_by,
organization_id,
transaction_type,
category_name,
category_set_name,
process_flag
) VALUES (
l_set_process_id,
p_item,
l_create_date,
l_create_date,
FND_GLOBAL.user_id,
p_org_id,
'CREATE',
p_commodity1,
p_commodity2,
1
)RETURNING rowid INTO l_ici_rowid;
itg_debug_pub.Add('Committing item interfaces insert.', 1);
SELECT mtl_system_items_intf_sets_s.nextval
INTO l_process_set_id
FROM dual;
argument7 => l_upd_flag /* create_update (1 = cr, 2 = up) */
);
SELECT process_flag
INTO l_process_flag
FROM mtl_system_items_interface
WHERE rowid = p_msii_rid;
SELECT process_flag
INTO l_process_flag
FROM mtl_item_categories_interface
WHERE rowid = p_mici_rid;
SELECT message_name, substr(error_message,1,2000)
FROM mtl_interface_errors
WHERE request_id = p_request_id
AND upper(table_name) = upper(p_table_name);
select count(*) into l_err_msg
from mtl_interface_errors
where request_id = p_request_id and
upper(table_name) = upper(p_table_name);