Profile Options

Submitted by code_admin on Tue, 07/17/2018 - 13:52

List Profile Option Values

  1. SELECT    
  2.     fpo.profile_option_id,    
  3.      fpo.profile_option_name,    
  4.      fpot.user_profile_option_name,    
  5.      fpot.description,    
  6.      fpov.level_id,    
  7.      fpov.level_value,
  8.      CASE WHEN fpov.level_id=10004 THEN
  9.          usr.user_name
  10.      ELSE
  11.          'NOT USER LEVEL'
  12.      END AS user_name,
  13.      fpov.profile_option_value
  14.  FROM apps.fnd_profile_options fpo
  15.  left join (
  16.      SELECT *    
  17.      FROM apps.fnd_profile_options_tl
  18.  ) fpot ON fpot.profile_option_name=fpo.profile_option_name
  19.  left join (
  20.      SELECT *
  21.      FROM fnd_profile_option_values
  22.  ) fpov ON fpov.profile_option_id=fpo.profile_option_id
  23.  left join (
  24.      SELECT *
  25.      FROM fnd_user
  26.  ) usr ON usr.user_id=fpov.level_value
  27. ;

Create Custom Profile Option

Log in as Application Devloper responsibility, Goto Profile and add to the form.
Naming convention somthgin like:
XXGC:API_VALIDATE_ONLY

To get the right value:
select fnd_profile.value('XXGC:GREENWICHLOGOIMAGELOCATION') from dual

Setting a system level profile option

  1. conn apps/${APPS_PWD};
  2.  
  3. SET SERVEROUTPUT ON
  4.  
  5. declare
  6.     l_res boolean;
  7.     l_val varchar2(1024) := '${ICXDO_TOP}/resource/xdodelivery.cfg';
  8. BEGIN
  9.     dbms_output.put_line('Start profile.sql');  
  10.    
  11.     l_res := FND_PROFILE.SAVE(
  12.       X_NAME=>'IBY_XDO_DELIVERY_CFG_FILE',  /* Profile name you are setting */
  13.       X_VALUE=>l_val,                   /* Profile value you are setting */
  14.       X_LEVEL_NAME=>'SITE',                     /* Level that you're setting at: 'SITE','APPL','RESP','USER', etc. */
  15.       X_LEVEL_VALUE=>NULL,
  16.         /* Level value that you are setting at, e.g. user id for 'USER' level.
  17.            X_LEVEL_VALUE is not used at site level. */
  18.       X_LEVEL_VALUE_APP_ID=>NULL,
  19.         /* Used for 'RESP' and 'SERVRESP' level; Resp Application_Id. */
  20.       X_LEVEL_VALUE2=>NULL
  21.         /* 2nd Level value that you are setting at.  This is for the 'SERVRESP'
  22.            hierarchy. */
  23.     );
  24.    
  25.     if (not l_res) then
  26.         dbms_output.put_line('ERROR - FND_PROFILE.SAVE returned false');  
  27.     end if;
  28.    
  29.    
  30.     dbms_output.put_line('End profile.sql');  
  31. EXCEPTION
  32.     WHEN OTHERS THEN
  33.         dbms_output.put_line('Exception occured - '|| SQLERRM ||' - '|| SQLCODE);  
  34. END;
  35. /
  36.  
  37. SET SERVEROUTPUT OFF
  38.  
  39. EXIT;

Other Articles

See also Known Profile Options

RJM Article Type
Quick Reference