首页 > 代码库 > Oracle EBS-SQL (BOM-10):检查有BOM无计划员的数据.sql

Oracle EBS-SQL (BOM-10):检查有BOM无计划员的数据.sql

select DISTINCT
     msi.segment1 编码
    ,msi.description 描述
    ,msi.item_type 物料类型
    ,msi.inventory_item_status_code 状态
    ,msi.planner_code 计划员
from
      INV.MTL_SYSTEM_ITEMS_B msi
     ,apps.BOM_BILL_OF_MATERIALS bom
     ,apps.BOM_INVENTORY_COMPONENTS bic
where
     msi.organization_id=X
  --and  msi.inventory_item_status_code = ‘Active‘
    and bom.ORGANIZATION_ID=X
    and bom.assembly_item_id=msi.inventory_item_id
    and bom.bill_sequence_id=bic.bill_sequence_id
    and bic.DISABLE_DATE is null
    and  msi.item_type in (‘FG‘,‘SA‘)
    and msi.planner_code is null
order by msi.segment1