The following lines contain the word 'select', 'insert', 'update' or 'delete':
l_last_updated_by NUMBER := to_number(p_userid);
l_last_update_date DATE := sysdate;
select count(*)
into l_cc_items_ct
from mtl_cycle_count_items
where inventory_item_id = p_inventory_item_id
and cycle_count_header_id = p_cycle_count_header_id
and abc_class_id = p_abc_class_id;
select count(*)
into l_subs_ct
from mtl_cc_subinventories
where cycle_count_header_id = p_cycle_count_header_id
and subinventory = p_subinventory_code;
select mtl_cc_schedule_requests_s.nextval
into l_cycle_count_schedule_id
from dual;
insert into mtl_cc_subinventories
( cycle_count_header_id ,
subinventory ,
last_update_date ,
last_updated_by ,
creation_date ,
created_by
)
values
( p_Cycle_Count_Header_Id ,
p_subinventory_code ,
l_last_update_date ,
l_last_updated_by ,
l_creation_date ,
l_created_by
);
MTL_CYCLE_COUNT_ITEMS_PKG.Insert_Row(
X_Rowid => l_RowId2,
X_Cycle_Count_Header_Id => p_cycle_count_header_id,
X_Inventory_Item_Id => p_Inventory_Item_Id,
X_Last_Update_Date => l_last_update_date,
X_Last_Updated_By => l_last_updated_by,
X_Creation_Date => l_creation_date,
X_Created_By => l_created_by,
X_Last_Update_Login => NULL,
X_Abc_Class_Id => p_Abc_Class_Id,
X_Item_Last_Schedule_Date => NULL,
X_Schedule_Order => NULL,
X_Approval_Tolerance_Positive => NULL,
X_Approval_Tolerance_Negative => NULL,
X_Control_Group_Flag => 2
);
insert into mtl_cc_schedule_requests (
cycle_count_schedule_id ,
last_update_date ,
last_updated_by ,
creation_date ,
created_by ,
cycle_count_header_id ,
request_source_type ,
schedule_date ,
schedule_status ,
subinventory ,
inventory_item_id ,
revision ,
lot_number ,
serial_number ,
locator_id )
values (
l_cycle_count_schedule_id,
l_last_update_date ,
l_last_updated_by ,
l_creation_date ,
l_created_by ,
p_cycle_count_header_id ,
2 ,
p_schedule_date ,
1 ,
p_subinventory_code ,
p_inventory_item_id ,
p_revision ,
p_lot_number ,
p_serial_number ,
p_locator_id
);