Tuesday, October 24, 2017

Query to get Profile Option Values in Oracle APPS

SELECT fpo.profile_option_name profile_short_name,
         fpot.user_profile_option_name profile_name,
         DECODE (fpov.level_id,
                 10001, 'Site',
                 10002, 'Application',
                 10003, 'Responsibility',
                 10004, 'User',
                 10005, 'Server',
                 'UnDefined') profile_level,
         DECODE (TO_CHAR (fpov.level_id),
                 '10001', '',
                 '10002', fap.application_short_name,
                 '10003', frsp.responsibility_key,
                 '10005', fnod.node_name,
                 '10006', hou.name,
                 '10004', fu.user_name,
                 'UnDefined') profile_context,
                fpov.profile_option_value profile_value
    FROM fnd_profile_options fpo,
         fnd_profile_option_values fpov,
         fnd_profile_options_tl fpot,
         fnd_user fu,
         fnd_application fap,
         fnd_responsibility frsp,
         fnd_nodes fnod,
         hr_operating_units hou
   WHERE fpo.profile_option_id = fpov.profile_option_id(+)
     AND fpo.profile_option_name = fpot.profile_option_name
     AND fu.user_id(+) = fpov.level_value
     AND frsp.application_id(+) = fpov.level_value_application_id
     AND frsp.responsibility_id(+) = fpov.level_value
     AND fap.application_id(+) = fpov.level_value
     AND fnod.node_id(+) = fpov.level_value
     AND hou.organization_id(+) = fpov.level_value
     AND fpot.user_profile_option_name = :p_user_profile_option_name
ORDER BY short_name;


Note: Pass p_user_profile_option_name as User Profile Option Name and not the Profile Option Name.

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)