Query to get the Multi-Org Tables Data


SELECT  OOD.ORGANIZATION_CODE ORG_CODE,
             OOD.ORGANIZATION_NAME ORG_NAME,
             HOU.NAME OU_NAME,
             HBG.BUSINESS_GROUP_NAME BG_NAME,
             GSOB.NAME SOB_NAME,
             HLE.NAME LE_NAME,
             MTSI.SECONDARY_INVENTORY_NAME INV_NAME,
             GLL.NAME LEDGER_NAME,
             GLL.LEDGER_CATEGORY_CODE CATEGORY,
             GLP.PERIOD_SET_NAME PERIOD_NAME,
             GCOA.CHART_OF_ACCOUNTS_NAME CA_NAME,
             FNC.CURRENCY_CODE        
FROM     ORG_ORGANIZATION_DEFINITIONS OOD,
             HR_OPERATING_UNITS HOU,
             HRFV_BUSINESS_GROUPS HBG,
             GL_SETS_OF_BOOKS GSOB,
             HR_LEGAL_ENTITIES HLE,
             MTL_SECONDARY_INVENTORIES MTSI,
             GL_LEDGERS GLL,
             GL_PERIODS GLP,
             GL_CODE_COMBINATIONS GCC,
             GLFV_CHARTS_OF_ACCOUNTS GCOA,
             FND_CURRENCIES FNC
WHERE   OOD.ORGANIZATION_ID=204
AND        OOD.ORGANIZATION_ID=HOU.ORGANIZATION_ID
AND        HOU.BUSINESS_GROUP_ID=HBG.BUSINESS_GROUP_ID
AND        HOU.SET_OF_BOOKS_ID=GSOB.SET_OF_BOOKS_ID
AND        HBG.BUSINESS_GROUP_ID=HLE.BUSINESS_GROUP_ID
AND        HOU.ORGANIZATION_ID=HLE.ORGANIZATION_ID
AND        HOU.ORGANIZATION_ID=MTSI.ORGANIZATION_ID
AND        OOD.CHART_OF_ACCOUNTS_ID=GLL.CHART_OF_ACCOUNTS_ID
AND        OOD.SET_OF_BOOKS_ID=GLL.LEDGER_ID
AND        GLP.PERIOD_YEAR=2014
AND        GLP.PERIOD_SET_NAME='Accounting'
AND        OOD.CHART_OF_ACCOUNTS_ID=GCC.CHART_OF_ACCOUNTS_ID
AND        GCC.ACCOUNT_TYPE='A'  AND GCC.SUMMARY_FLAG='Y'
AND        GCC.CHART_OF_ACCOUNTS_ID=GCOA.CHART_OF_ACCOUNTS_ID
AND        FNC.CURRENCY_CODE='USD'
*/