2016-07-30

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

 參考資料:https://community.oracle.com/thread/2208873?tstart=0

                https://dotblogs.com.tw/jeff-yeh/2009/05/20/8489

可以輸入Function Name來查詢這個程式是位於那些權限

  1. 需要找時間研究一下 CONNECT BY
  2. 應該可以找到掛在那一階
SELECT DISTINCT FRT.RESPONSIBILITY_ID, FRT.RESPONSIBILITY_NAME
  FROM APPLSYS.FND_RESPONSIBILITY    FR,
       APPLSYS.FND_RESPONSIBILITY_TL FRT,
       APPLSYS.WF_LOCAL_USER_ROLES   WLUR
 WHERE FR.APPLICATION_ID = FRT.APPLICATION_ID
   AND FR.RESPONSIBILITY_ID = FRT.RESPONSIBILITY_ID
   AND FR.RESPONSIBILITY_ID = WLUR.ROLE_ORIG_SYSTEM_ID
   AND WLUR.ROLE_ORIG_SYSTEM = 'FND_RESP'
   AND SYSDATE BETWEEN FR.START_DATE AND NVL(FR.END_DATE, SYSDATE + 1)
   AND SYSDATE BETWEEN WLUR.START_DATE AND
       NVL(WLUR.EXPIRATION_DATE, SYSDATE + 1)
   AND FR.MENU_ID IN
       (SELECT MENU_ID
          FROM APPLSYS.FND_MENU_ENTRIES FME
        CONNECT BY PRIOR FME.MENU_ID = FME.SUB_MENU_ID
         START WITH FME.FUNCTION_ID =
                    (SELECT FUNCTION_ID
                       FROM APPLSYS.FND_FORM_FUNCTIONS FFF
                      WHERE FFF.FUNCTION_NAME = 'CBM_OM_FRM_040'));

20170517
http://192.168.50.10/wordpress/blog/2017/05/17/oraclestart-with-connect-by-prior%e7%94%a8%e6%b3%95/

沒有留言:

張貼留言