Tuesday, 19 January 2016

Find the list of all the Organizations (in same item master and to which access is allowed)

SELECT orgs.ORGANIZATION_ID
  FROM ORG_ACCESS_VIEW    oav,
       MTL_SYSTEM_ITEMS_B msi,
       MTL_PARAMETERS     orgs,
       MTL_PARAMETERS     child_org
 WHERE orgs.ORGANIZATION_ID = oav.ORGANIZATION_ID
   AND msi.ORGANIZATION_ID = orgs.ORGANIZATION_ID
   AND orgs.MASTER_ORGANIZATION_ID = child_org.MASTER_ORGANIZATION_ID
   AND oav.RESPONSIBILITY_ID = FND_PROFILE.Value('RESP_ID')
   AND oav.RESP_APPLICATION_ID = FND_PROFILE.value('RESP_APPL_ID')
   AND msi.INVENTORY_ITEM_ID = BOM_MASTER_INVENTORY_ID
   AND orgs.ORGANIZATION_ID NOT IN MASTER_ITEM_ORG_ID
   AND child_org.ORGANIZATION_ID IN MASTER_ITEM_ORG_ID

No comments:

Post a Comment

Query to Find Receipt Class and its GL Combinition Query

SELECT ARC.NAME ReceiptClass,        ARC.CREATION_METHOD_CODE Creation_Mehthod,        DECODE (ARC.REMIT_METHOD_CODE,             ...