Query to Extract Inactive Items from Activity BOM
Preventive Maintenance Schedule gives Error for inactive BOM lines when Work Orders are implemented. The following query can be used to identify and extract Inactive Items in BOM Lines for Activities.
SELECT msi.concatenated_segments, bic.item_num, bic.operation_seq_num,msi2.concatenated_segments, bic.component_quantity
FROM bom_bill_of_materials_v bbm,
mtl_system_items_kfv msi,
mtl_system_items_kfv msi2,
bom_inventory_components_v bic
WHERE bbm.assembly_item_id = msi.inventory_item_id
AND bbm.bill_sequence_id = bic.bill_sequence_id
AND msi2.inventory_item_id = bic.component_item_id
AND msi.segment1 LIKE 'AB'
AND msi.organization_id = XY
AND bbm.organization_id = XY
AND msi2.organization_id = XY
AND msi2.inventory_item_status_code = 'Inactive'
Replace "AB" with your relevant SEGMENT 1 of Activity.
Replace "XY" with your relevant Org ID.
Comments
Post a Comment