The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT count('x')
INTO l_count_exist_VMI_ASL
FROM dual
WHERE exists
( SELECT 'X'
FROM po_approved_supplier_list pasl,
po_vendor_sites pvs ,
po_asl_status_rules_v pasr ,
po_asl_attributes paa
WHERE pasl.vendor_site_id = pvs.vendor_site_id
AND pasr.status_id = pasl.asl_status_id
AND pasr.business_rule like '2_SOURCING'
AND pasr.allow_action_flag like 'Y'
AND ( pasl.disable_flag = 'N'
OR pasl.disable_flag IS NULL)
AND paa.asl_id = pasl.asl_id
AND paa.enable_vmi_flag = 'Y' ) ;
select hoi.organization_id ,
DECODE(HOI.ORG_INFORMATION_CONTEXT, 'Accounting Information',
TO_NUMBER(HOI.ORG_INFORMATION3), TO_NUMBER(NULL)) operating_unit ,
mp.wms_enabled_flag ,
imst.whse_code ,
msi.item_type ,
msi.outside_operation_flag ,
msi.eam_item_type ,
msi.base_item_id ,
msi.bom_item_type ,
msi.replenish_to_order_flag ,
msi.auto_created_config_flag
from gl_sets_of_books gsob ,
hr_organization_units hou ,
hr_organization_information hoi ,
mtl_parameters mp ,
hr_organization_information hoi2 ,
mtl_system_items msi ,
ic_whse_mst imst
where HOU.ORGANIZATION_ID = HOI.ORGANIZATION_ID
and HOU.ORGANIZATION_ID = MP.ORGANIZATION_ID
and HOI.ORG_INFORMATION_CONTEXT||'' ='Accounting Information'
and HOI.ORG_INFORMATION1 = TO_CHAR(GSOB.SET_OF_BOOKS_ID)
and hoi.organization_id = hoi2.organization_id
and hoi2.org_information_context = 'CLASS'
and hoi2.org_information1 = 'INV'
and msi.organization_id = hoi.organization_id
and msi.inventory_item_id = x_inventory_item_id
and hoi.organization_id = imst.mtl_organization_id (+)
and GSOB.SET_OF_BOOKS_ID = (
select set_of_books_id
from po_vendor_sites_all pvsa ,
HR_ORGANIZATION_INFORMATION HOI ,
GL_SETS_OF_BOOKS GSOB
where pvsa.vendor_site_id = x_supplier_site_id
and NVL(DECODE(HOI.ORG_INFORMATION_CONTEXT,'Accounting Information',
TO_NUMBER(HOI.ORG_INFORMATION3),TO_NUMBER(NULL)),-99)= NVL(pvsa.org_id,-99)
and HOI.ORG_INFORMATION1 = TO_CHAR(GSOB.SET_OF_BOOKS_ID)
and rownum < 2) ;
SELECT fspa.purch_encumbrance_flag,
fspa.req_encumbrance_flag
INTO l_purch_encumbrance_flag ,
l_req_encumbrance_flag
FROM FINANCIALS_SYSTEM_PARAMS_ALL fspa ,
po_vendor_sites_all pvs
WHERE pvs.vendor_site_id = x_supplier_site_id
AND NVL(fspa.org_id,-99) = NVL(pvs.org_id,-99) ;