The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT c.description item_Description,
c.planning_make_buy_code mbf,
c.primary_uom_code uom,
p.ap_accrual_account accru_Acct,
p.invoice_price_var_account ipv_acct,
nvl(p.encumbrance_account,
c.encumbrance_account) budget_Acct,
decode(c.inventory_asset_flag, 'Y', p.material_account,
NVL(c.expense_Account, p.expense_Account)) charge_Acct,
NVL(c.source_type, p.source_type) src_type,
DECODE(c.source_type, NULL,
DECODE(p.source_type, NULL, NULL, p.source_organization_id),
c.source_organization_id) src_org,
DECODE(c.source_type, NULL,
DECODE(p.source_type, NULL, NULL, p.source_subinventory),
c.source_subinventory) src_subinv,
c.purchasing_enabled_flag purch_flag,
c.internal_order_enabled_flag order_flag,
c.mtl_transactions_enabled_flag transact_flag,
c.list_price_per_unit unit_price,
c.planner_code planner,
build_in_wip_flag build_in_wip,
pick_components_flag pick_components
FROM mtl_system_items c,
mtl_parameters p
WHERE c.inventory_item_id = p_inventory_item_id
AND c.organization_id = p.organization_id
AND p.organization_id = p_organization_id;
SELECT primary_uom_code
FROM mtl_system_items_b
WHERE organization_id = t_organization_id
AND inventory_item_id = t_item_id;
is select misl.source_type, misl.source_organization_id, misl.vendor_id
into l_source_type, l_repair_organization_id, l_repair_supplier_id
from MRP_ITEM_SOURCING_LEVELS_V misl, csp_planning_parameters cpp
where cpp.organization_id = p_organization_id
and misl.organization_id = cpp.organization_id
and misl.assignment_set_id =cpp.repair_assignment_set_id
and inventory_item_id = l_supplied_item_id --l_line_tbl(I).supplied_item_id
and SOURCE_TYPE in (1,3)
and sourcing_level = (select min(sourcing_level) from MRP_ITEM_SOURCING_LEVELS_V
where organization_id = p_organization_id
and assignment_set_id = cpp.repair_assignment_set_id
and inventory_item_id = l_supplied_item_id --l_line_tbl(I).supplied_item_id
and sourcing_level not in (2,9))
order by misl.rank,misl.source_type;
SELECT fnd_global.user_id INTO l_user_id from dual;
select location_id
into l_location_id
from hr_organization_units
where organization_id = p_organization_id;
Select count(*)
into l_supplier_count
from hr_organization_information
where ORG_INFORMATION_CONTEXT = 'Customer/Supplier Association'
and org_information3 = l_repair_supplier_id
and organization_id = l_repair_organization_id;
select misl.source_type, misl.source_organization_id, misl.vendor_id
into l_source_type, l_repair_organization_id, l_repair_supplier_id
from MRP_ITEM_SOURCING_LEVELS_V misl, csp_planning_parameters cpp
where cpp.organization_id = p_organization_id
and misl.organization_id = cpp.organization_id
and misl.assignment_set_id =cpp.repair_assignment_set_id
and inventory_item_id = l_line_tbl(I).supplied_item_id
and SOURCE_TYPE in (1,3)
and sourcing_level = (select min(sourcing_level) from MRP_ITEM_SOURCING_LEVELS_V
where organization_id = p_organization_id
and assignment_set_id = cpp.repair_assignment_set_id
and inventory_item_id = l_line_tbl(I).supplied_item_id
and sourcing_level not in (2,9))
order by misl.rank;
Select organization_id
into l_repair_supplier_org_id
from hr_organization_information
where ORG_INFORMATION_CONTEXT = 'Customer/Supplier Association'
and org_information3 = l_repair_supplier_id;
SELECT repair_program
INTO l_repair_program
FROM mtl_system_items_b
WHERE organization_id = l_repair_supplier_org_id
AND inventory_item_id = p_inventory_item_id;
SELECT WIP_JOB_SCHEDULE_INTERFACE_S.nextval
INTO l_wip_id
FROM dual;
INSERT INTO WIP_JOB_SCHEDULE_INTERFACE(
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
CREATION_DATE,
CREATED_BY,
GROUP_ID,
PROCESS_PHASE,
PROCESS_STATUS,
ORGANIZATION_ID,
LOAD_TYPE,
LAST_UNIT_COMPLETION_DATE,
PRIMARY_ITEM_ID,
START_QUANTITY,STATUS_TYPE)
VALUES(
sysdate,
l_user_id,
sysdate,
nvl(fnd_global.login_id, 0),
l_wip_id,
2,
1,
p_organization_id,
1,
l_line_tbl(I).plan_date,
l_line_tbl(I).supplied_item_id,
l_line_tbl(I).quantity,
3);