0% found this document useful (0 votes)
314 views

BOM Tables and Query

This document contains sample SQL queries to retrieve different types of information from Oracle E-Business Suite BOM (bill of materials) tables including: 1. BOM details such as assembly items, components, quantities and units. 2. Resources associated with BOM operations including work centers, resource codes, usage rates. 3. Departments, department classes, locations, and resources associated with departments.

Uploaded by

Parth Desai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
314 views

BOM Tables and Query

This document contains sample SQL queries to retrieve different types of information from Oracle E-Business Suite BOM (bill of materials) tables including: 1. BOM details such as assembly items, components, quantities and units. 2. Resources associated with BOM operations including work centers, resource codes, usage rates. 3. Departments, department classes, locations, and resources associated with departments.

Uploaded by

Parth Desai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

BOM_DEPARTMENTS Departments

BOM_DEPARTMENT_CLASSES Department classes


BOM_DEPARTMENT_RESOURCES Resources associated with departments
BOM_OPERATIONAL_ROUTINGS Routings
BOM_OPERATION_NETWORKS Routing operation networks
BOM_OPERATION_RESOURCES Resources on operations
BOM_OPERATION_SEQUENCES Routing operations
BOM_OPERATION_SKILLS
BOM_RESOURCES Resources, overheads, material cost codes, and material overheads
BOM_STANDARD_OPERATIONS Standard operations
BOM_ALTERNATE_DESIGNATORS Alternate designators
BOM_COMPONENTS_B Bill of material components
BOM_STRUCTURES_B Bills of material
BOM_STRUCTURE_TYPES_B Structure Type master table
BOM_BILL_OF_MATERIALS
BOM_PARAMETERS
BOM_DEPENDENT_DESC_ELEMENTS
BOM_REFERENCE_DESIGNATORS
BOM_SUBSTITUTE_COMPONENTS
FND_DOCUMENTS
FND_DOCUMENTS_TL
FND_DOCUMENTS_SHORT_TEXT
FND_ATTACHED_DOCUMENTS
Select * from
WHERE
--LOOKUP_CODE
--LOOKUP_CODE
--LOOKUP_CODE

MFG_LOOKUPS
= 'BOM_ITEM_TYPE'
= 'WIP_SUPPLY_TYPE'
= 'BOM_ASSEMBLY_TYPE'

----------------------------------------------------------------1) Query for BOM Details


SELECT d.inventory_item_id,
d.concatenated_segments "Assembly_item",
e.organization_code "Organization",
nvl(a.ALTERNATE_BOM_DESIGNATOR,'10') "ALTERNATIVE BOM",
b.ITEM_NUM "ITEM",
c.concatenated_segments "COMPONENT",
b.component_quantity "UNIT",
c.primary_uom_code "QUANTITY",
d.primary_uom_code "UNIT"
FROM bom_bill_of_materials
a
,bom_inventory_components b
,mtl_system_items_kfv c
,mtl_system_items_kfv d
,org_organization_definitions e
WHERE 1=1
AND a.organization_id in (:P_organization_id)
AND (a.BILL_SEQUENCE_ID = b.BILL_SEQUENCE_ID
OR a.COMMON_BILL_SEQUENCE_ID = b.BILL_SEQUENCE_ID)
AND
b.implementation_date IS NOT NULL
AND
b.DISABLE_DATE
IS NULL
AND a.organization_id = c.organization_id
AND b.COMPONENT_ITEM_ID = c.inventory_ITEM_ID
AND a.assembly_item_id = d.inventory_item_id
AND a.organization_id = d.organization_id
AND a.organization_id = e.organization_id
--AND
c.organization_id = :P_organization_id

--AND a.ASSEMBLY_ITEM_ID = :P_assembly_item_id


-- AND ALTERNATE_BOM_DESIGNATOR IS NULL
ORDER BY e.organization_code,d.inventory_item_id,ALTERNATE_BOM_DESIGNATOR,b.ITEM
_NUM;

---------------------------------------------------------------2) Query for Resources


SELECT c.concatenated_segments "Assemly_Item",
d.organization_code "Organization",
a.alternate_routing_designator "Alternate_routing",
b.operation_seq_num "OPERATION NUMBER",
e.department_code "WORK CENTER",
b.operation_description "DESCRIPTION(Operation)",
c.primary_uom_code "OPERATION UNIT",
G.uom "UNIT",
f.operation_code,
g.resource_code,
g.USAGE_RATE_OR_AMOUNT
h.DESCRIPTION
FROM
bom_operational_routings a
,bom_operation_sequences b
,mtl_system_items_kfv c
,org_organization_definitions d
,bom_departments e
,bom_standard_operations f
,bom_operation_resources_v g
,bom_resources h
WHERE a.organization_id in (:P_organization_id)
AND a.organization_id = d.organization_id
AND a.organization_id = c.organization_id
AND a.assembly_item_id = c.inventory_item_id
AND a.routing_sequence_id = b.routing_sequence_id
AND b.department_id = e.department_id
AND b.disable_date is null
--AND a.assembly_item_id = :P_assembly_item_id
AND f.standard_operation_id(+) = b.standard_operation_id
AND g.operation_sequence_id = b.operation_sequence_id
AND h.resource_id = g.resource_id
order by d.organization_code,c.concatenated_segments,a.alternate_routing_designa
tor, b.operation_seq_num
------------------------------------------------------------------------------------------3) Departments and Resources and Departments associated with Resources

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"
from BOM_DEPARTMENTS a

,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

You might also like