SELECT msi1.segment1 Parent_item,
msi1.description Parent_item_description,
msi1.item_type Parent_item_type,
msi2.segment1 Child_item,
msi2.description Child_item_description,
msi2.item_type Child_item_type,
--assembly_item_id, bom.organization_id, bic.component_item_id,
bic.component_quantity,
bic.effectivity_date,
bic.implementation_date,
bic.disable_date,
ood.organization_code,
OOD.ORGANIZATION_NAME,
bom.assembly_type,
bic.planning_factor,
bic.quantity_related,
bic.include_in_cost_rollup,
Bic.Check_Atp,
Bic.Component_Yield_Factor
FROM apps.bom_bill_of_materials bom,
Apps.Bom_Inventory_Components Bic,
apps.mtl_system_items_b msi1,
apps.mtl_system_items_b msi2,
apps.org_organization_definitions ood
WHERE BOM.bill_sequence_id = bIC.bill_sequence_id
AND msi1.inventory_item_id = bom.assembly_item_id
AND msi1.organization_id = bom.organization_id
AND msi2.inventory_item_id = bic.component_item_id
AND msi2.organization_id = bom.organization_id
AND ood.organization_id = bom.organization_id
And Nvl(Bic.Disable_Date, Sysdate + 1) > Sysdate
and bom.organization_id not in (select organization_id from apps.org_organization_definitions where organization_code not in ('CSM', 'DS3', 'FS1'))
and UPPER(msi1.item_type) not in ('FG', 'NRE', 'PC')
AND Upper(Msi2.Item_Type) NOT IN ('RW','FG', 'NRE', 'RETICLE')
AND Msi1.Inventory_Item_Status_Code='Active' ;
msi1.description Parent_item_description,
msi1.item_type Parent_item_type,
msi2.segment1 Child_item,
msi2.description Child_item_description,
msi2.item_type Child_item_type,
--assembly_item_id, bom.organization_id, bic.component_item_id,
bic.component_quantity,
bic.effectivity_date,
bic.implementation_date,
bic.disable_date,
ood.organization_code,
OOD.ORGANIZATION_NAME,
bom.assembly_type,
bic.planning_factor,
bic.quantity_related,
bic.include_in_cost_rollup,
Bic.Check_Atp,
Bic.Component_Yield_Factor
FROM apps.bom_bill_of_materials bom,
Apps.Bom_Inventory_Components Bic,
apps.mtl_system_items_b msi1,
apps.mtl_system_items_b msi2,
apps.org_organization_definitions ood
WHERE BOM.bill_sequence_id = bIC.bill_sequence_id
AND msi1.inventory_item_id = bom.assembly_item_id
AND msi1.organization_id = bom.organization_id
AND msi2.inventory_item_id = bic.component_item_id
AND msi2.organization_id = bom.organization_id
AND ood.organization_id = bom.organization_id
And Nvl(Bic.Disable_Date, Sysdate + 1) > Sysdate
and bom.organization_id not in (select organization_id from apps.org_organization_definitions where organization_code not in ('CSM', 'DS3', 'FS1'))
and UPPER(msi1.item_type) not in ('FG', 'NRE', 'PC')
AND Upper(Msi2.Item_Type) NOT IN ('RW','FG', 'NRE', 'RETICLE')
AND Msi1.Inventory_Item_Status_Code='Active' ;
No comments:
Post a Comment