Friday, 5 January 2018

Query to find BOM Components in Cloud

SELECT msib.item_number Struct,
  msib2.item_number Com_item,
  mp.organization_code org_struct,
  mp2.organization_code org_comp
FROM EGP_COMPONENTS_B BIC,
  EGP_STRUCTURES_B BOM ,
  EGP_SYSTEM_ITEMS_B msib ,
  EGP_SYSTEM_ITEMS_B msib2 ,
  INV_ORG_PARAMETERS mp ,
  INV_ORG_PARAMETERS mp2
WHERE 1                  =1
AND bic.bill_sequence_id = bom.bill_sequence_id
AND BOM.PK1_VALUE        = MSIB.INVENTORY_ITEM_ID
AND bom.PK2_Value        = msib.organization_id
AND bic.PK1_VALUE        = msib2.inventory_item_id
AND bic.PK2_Value        = msib2.organization_id
AND MP.ORGANIZATION_ID   = MSIB.ORGANIZATION_ID
AND MP2.ORGANIZATION_ID  = MSIB2.ORGANIZATION_ID
AND msib2.item_number    =:Component_Item

No comments:

Post a Comment