BOM Tables and Query
BOM Tables and Query
MFG_LOOKUPS
= 'BOM_ITEM_TYPE'
= 'WIP_SUPPLY_TYPE'
= 'BOM_ASSEMBLY_TYPE'
,org_organization_definitions b
,BOM_DEPARTMENT_CLASSES c
,hr_locations d
where a.organization_id in (:P_organization_id)
AND
a.organization_id = b.organization_id
AND
a.DEPARTMENT_CLASS_CODE = c.DEPARTMENT_CLASS_CODE
AND
a.organization_id = c.organization_id
AND
a.location_id = d.location_id(+)
select b.organization_code "Plant",
a.RESOURCE_CODE "Resource Name",
a.DESCRIPTION "Resource Description",
a.UNIT_OF_MEASURE
from BOM_RESOURCES a
,org_organization_definitions b
--,mfg_lookups c
where a.organization_id in (:P_organization_id)
AND
a.organization_id = b.organization_id
AND
a.Disable_date is Null
--AND
c.lookup_type = 'BOM_BASIS_TYPE'
--AND
c.LOOKUP_CODE = a.DEFAULT_BASIS_TYPE
exec mo_global.set_policy_context('S',:P_org_id);
--BOM_RESOURCE_TYPE
--BOM_BASIS_TYPE
select * from mfg_lookups where lookup_type like 'BOM_BASIS_TYPE'
select * from BOM_DEPARTMENT_RESOURCES
select * from BOM_RESOURCE_SHIFTS
select b.organization_code "Plant",
a.DEPARTMENT_CODE "Department",
a.DESCRIPTION "Department Description",
a.DEPARTMENT_CLASS_CODE "Department Class",
c.DESCRIPTION "Department Class Description",
d.location_code "Department_location",
f.RESOURCE_CODE "Resource Name",
f.DESCRIPTION "Resource Description",
f.UNIT_OF_MEASURE
from BOM_DEPARTMENTS a
,org_organization_definitions b
,BOM_DEPARTMENT_CLASSES c
,hr_locations d
,BOM_DEPARTMENT_RESOURCES e
,BOM_RESOURCES f
-- ,BOM_RESOURCE_SHIFTS g
where a.organization_id in (:P_oranization_id)
AND
a.organization_id = b.organization_id
AND
a.DEPARTMENT_CLASS_CODE = c.DEPARTMENT_CLASS_CODE
AND
a.organization_id = c.organization_id
AND
a.location_id = d.location_id(+)
AND
a.DEPARTMENT_ID = e.DEPARTMENT_ID
AND
e.RESOURCE_ID = f.RESOURCE_ID
--AND
a.DEPARTMENT_ID = g.DEPARTMENT_ID
--AND
f.RESOURCE_ID = g.RESOURCE_ID