The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT NVL(process_enabled_flag, 'N')
INTO l_process_enabled_flag
FROM mtl_parameters
WHERE organization_id = i_org_id;
SELECT
MP.primary_cost_method,
MP.cost_organization_id,
DECODE(DECODE(MSI.planning_make_buy_code,
1,MSI.planning_make_buy_code,
2,MSI.planning_make_buy_code,
2),
1,NVL(MSI.shrinkage_rate,0),
0),
NVL(MSI.std_lot_size,1),
DECODE(MSI.planning_make_buy_code,
1,MSI.planning_make_buy_code,
2,MSI.planning_make_buy_code,
2),
DECODE(MSI.inventory_asset_flag,
'Y', 1,
2),
MP.DEFAULT_MATERIAL_COST_ID
INTO l_costing_method,
l_cost_org,
l_shrinkage_rate,
l_std_lot_size,
l_planning_make_buy_code,
l_inv_asset_flag,
l_def_matl_cost_code_id
from mtl_system_items MSI,
mtl_parameters MP
WHERE MSI.inventory_item_id = i_item_id
AND MSI.organization_id = i_org_id
AND MSI.costing_enabled_flag = 'Y'
AND MP.organization_id = i_org_id;
INSERT INTO cst_item_costs
(
inventory_item_id,
organization_id,
cost_type_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
defaulted_flag,
shrinkage_rate,
lot_size,
based_on_rollup_flag,
inventory_asset_flag,
item_cost)
VALUES
(
i_item_id,
i_org_id,
l_cost_type_id,
sysdate,
i_user_id,
sysdate,
i_user_id,
2,
l_shrinkage_rate,
l_std_lot_size,
l_planning_make_buy_code,
l_inv_asset_flag,
0 );
/* insert default material overhead or TL matl cost row
in CST_ITEM_COST_DETAILS depending on cost method*/
CSTPIDIC.CSTPIDIO(i_item_id,
i_org_id,
i_user_id,
l_cost_type_id,
l_item_type,
l_std_lot_size,
l_shrinkage_rate,
l_return_code,
l_return_err);
select 0
into l_temp
from mtl_system_items msi
where msi.inventory_item_id = i_item_id
and msi.organization_id = i_org_id
and msi.costing_enabled_flag = 'N';