Bills of Material Level1 Items SQL

Use the below SQL to list Level1 Components/Sub-Assemblies for the Assembly.

select a.segment1 COMP_Item, a.description Comp_Descr, a.inventory_item_status_code Comp_Status, a.item_type,
d.segment1 ASSY_ITEM, d.description Assy_Descr, d.inventory_item_status_code Assy_Status
from mtl_system_items_b a
,bom_components_b b
,bom_structures_b c
,mtl_system_items_b d
where 1 = 1
and a.inventory_item_id = b.component_item_id
and a.organization_id = c.organization_id
and b.disable_date is null
and b.bill_sequence_id = c.common_bill_sequence_id
and d.inventory_item_id = c.assembly_item_id
and d.organization_id = c.organization_id
and d.segment1 = ‘SB68415’
and d.organization_id = 207 — M1
–and c.common_bill_sequence_id=229710
ORDER BY c.common_bill_sequence_id, b.item_num