The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT mps.acct_period_id,
mps.organization_id,
mps.inventory_type,
sum(mps.inventory_value) sumvalue,
msi.default_cost_group_id
FROM mtl_period_summary mps, mtl_secondary_inventories msi
WHERE mps.organization_id = p_organization_id
AND mps.organization_id = msi.organization_id
AND mps.secondary_inventory = msi.secondary_inventory_name
GROUP BY mps.acct_period_id,
mps.organization_id,
mps.inventory_type,
msi.default_cost_group_id;
INSERT INTO
mtl_period_cg_summary(acct_period_id,
organization_id,
inventory_type,
inventory_value,
cost_group_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
request_id,
program_application_id,
program_id,
program_update_date)
VALUES (l_record.acct_period_id,
l_record.organization_id,
l_record.inventory_type,
l_record.sumvalue,
l_record.default_cost_group_id,
SYSDATE,
fnd_global.user_id,
SYSDATE,
fnd_global.user_id,
fnd_global.login_id,
fnd_global.conc_request_id,
fnd_global.prog_appl_id,
fnd_global.conc_program_id,
SYSDATE);