select
(select msi.segment1 from mtl_system_items msi where msi.inventory_item_id=bom.assembly_item_id and msi.organization_id=402) parent_item,
bom.assembly_item_id,
lpad(' ',2*(level-1),' ')||
(select msi.segment1 from mtl_system_items msi where msi.inventory_item_id=bic.component_item_id and msi.organization_id=402) child_item,
bic.component_item_id child_item_id,
--bic.component_sequence_id ,
bic.bill_sequence_id ,
--parent_bill_seq_id ,
bic.operation_seq_num ,
--bic.bom_item_type ,
--bic.item_num ,
level,
bic.component_quantity
from
bom_inventory_components bic,
(select * from bom_bill_of_materials where organization_id=402) bom
where bom.bill_sequence_id=bic.bill_sequence_id
start with bom.assembly_item_id=1040442
connect by prior bic.component_item_id=bom.assembly_item_id
--order by level, bom.assembly_item_id
No comments:
Post a Comment