2016-08-05

[Oracle]Query to list all Oracle report assigned to a responsibility

 參考網址:http://dbnerdz.blogspot.tw/2013/09/query-to-list-all-oracle-reports.html

如何透過報表名稱,回查報表名稱位置,但是這個SQL應該可以改善,再找時間研究看看

SELECT DISTINCT FCPL.USER_CONCURRENT_PROGRAM_NAME "REPORT NAME",
       FNRTL.RESPONSIBILITY_NAME--,
       --FRG.REQUEST_GROUP_NAME,
       --FCP.CONCURRENT_PROGRAM_NAME       "CONCURRENT PROGRAM SHORT NAME"
  FROM APPS.FND_REQUEST_GROUPS         FRG,
       APPS.FND_REQUEST_GROUP_UNITS    FRGU,
       APPS.FND_CONCURRENT_PROGRAMS    FCP,
       APPS.FND_CONCURRENT_PROGRAMS_TL FCPL,
       APPS.FND_EXECUTABLES            FE,
       APPS.FND_RESPONSIBILITY         FNR,
       APPS.FND_RESPONSIBILITY_TL      FNRTL
 WHERE FRG.APPLICATION_ID = FRGU.APPLICATION_ID
   AND FRG.REQUEST_GROUP_ID = FRGU.REQUEST_GROUP_ID
   AND FRG.REQUEST_GROUP_ID = FNR.REQUEST_GROUP_ID
   AND FRG.APPLICATION_ID = FNR.APPLICATION_ID
   AND FNR.RESPONSIBILITY_ID = FNRTL.RESPONSIBILITY_ID
   AND FRGU.REQUEST_UNIT_ID = FCP.CONCURRENT_PROGRAM_ID
   AND FRGU.UNIT_APPLICATION_ID = FCP.APPLICATION_ID
   AND FCP.CONCURRENT_PROGRAM_ID = FCPL.CONCURRENT_PROGRAM_ID
   AND FE.EXECUTION_METHOD_CODE LIKE 'P' --'ORACLE REPORTS'
   AND FCP.EXECUTABLE_ID = FE.EXECUTABLE_ID
   AND FE.APPLICATION_ID = FCP.EXECUTABLE_APPLICATION_ID
   --AND FNRTL.RESPONSIBILITY_NAME LIKE '&RESPONSIBILITY_NAME'
      -- Example Resp. Name : Oracle Inventory or put '%' to get the list of all the responsibilities
   AND FNRTL.LANGUAGE = 'US'
   AND FCPL.LANGUAGE = 'US'
   AND FCP.CONCURRENT_PROGRAM_NAME LIKE 'CB%'

 

沒有留言:

張貼留言