May 2, 2014

To Query Profile option details for any user or responsibility

bishnupc / /

SELECT FPO.PROFILE_OPTION_ID,
      FPO.PROFILE_OPTION_NAME,
      FPOT.USER_PROFILE_OPTION_NAME,
      FPOV.LEVEL_ID,
      DECODE(FPOV.LEVEL_ID,
             '10001',
             'Site',
             '10002',
             'Appllication',
             '10003',
             'Responsibility',
             '10004',
             'User',
             FPOV.LEVEL_ID) LEVEL_TYPE,
      FPOV.LEVEL_VALUE,
      DECODE(FPOV.LEVEL_ID,
             '10001',
             'Site',
             '10002',
             (SELECT APPLICATION_NAME
                FROM APPS.FND_APPLICATION_TL
               WHERE APPLICATION_ID =FPOV.LEVEL_VALUE),
             '10003',
             (SELECT RESPONSIBILITY_NAME
                FROM APPS.FND_RESPONSIBILITY_TL
               WHERE RESPONSIBILITY_ID =FPOV.LEVEL_VALUE),
             10004,
             (SELECT DESCRIPTION
                FROM APPS.FND_USER
               WHERE USER_ID = FPOV.LEVEL_VALUE),
             FPOV.LEVEL_ID) LEVEL_VALUE,
      FPOV.PROFILE_OPTION_VALUE,
      FPOV.LAST_UPDATE_DATE,
      FPO.SQL_VALIDATION,
      TRUNC(FPOV.LAST_UPDATE_DATE),
      (SELECT DESCRIPTION
         FROM APPS.FND_USER
        WHERE USER_ID = FPOV.LAST_UPDATED_BY)UPDATED_BY
 FROM APPS.FND_PROFILE_OPTIONS       FPO,
      APPS.FND_PROFILE_OPTION_VALUES FPOV,
      APPS.FND_PROFILE_OPTIONS_TL    FPOT
WHERE FPOV.PROFILE_OPTION_ID = FPO.PROFILE_OPTION_ID
  AND FPOT.PROFILE_OPTION_NAME =FPO.PROFILE_OPTION_NAME
  AND FPOV.LEVEL_VALUE =
      (SELECT USER_ID FROM FND_USER WHERE USER_NAMEIN ('305030341')) --for user
  /*AND (FPOV.LEVEL_ID = 10003 AND
      FPOV.LEVEL_VALUE IN
      (SELECT RESPONSIBILITY_ID
          FROM FND_RESPONSIBILITY_TL
         WHERE RESPONSIBILITY_NAME LIKE '%%')) --for responsibility*/
  /*AND UPPER(FPOT.USER_PROFILE_OPTION_NAME) LIKE '%WMS%TCP%' -- for profile option*/ 

Copyright © . Oracle Apps (SCM) . All Rights Reserved
Oracle Apps (SCM) is an online knowledge sharing blog which index online free tutorials, blogs and other sources, to get easier and accessible manner. The blog has been created keeping only one intention of sharing knowledge and for learning purpose. All trademarks, trade names, service marks, copyrighted work, logos referenced herein belong to their respective owners/companies. If any of the posting is violating copyright and you want us to remove that content. Please contact Here