用户配置文件相当于系统参数,可以在不同层级(Site层、应用模块层、责任层、用户层)设置不同的值;作用范围小的覆盖范围大的层,系统已经预设了很多user
profile; 开发人员也可以定义

在EBS
中我们可能定义profile,用于存储特定的用户信息,以便在程序运行中进行调用。相当于全局变量.

1. Profile的定义

Path:application developer/profile

其中的hierarchy type
用来确定profile的作用范围。一般选security.

Profile的作用范围是底层优先的,也就是user
层的最优先,其次是organization….

比较常用的是根据responsibility 来提取profile的信息.

SQL Validation 是用来定义profile value 的value set的,当然不定义,然后手工输入也没问题,但为了安全,还是定义一个比较好,定义方法如下:

SQL="SELECT fv_region.flex_value \"Log Mode\",
fv_region.flex_value
into :visible_option_value,
:profile_option_value
FROM fnd_flex_value_sets fvs_region,
fnd_flex_values fv_region
WHERE fvs_region.flex_value_set_name = 'FAC_REORG_ASSET_REGION'
AND fvs_region.flex_value_set_id = fv_region.flex_value_set_id
AND fv_region.enabled_flag = 'Y' "
COLUMN="\"Log Mode\"(10)"

2. Profile
的维护

Path: System administrator/profile/system

可根据需要,在site/application/responsibility/organization/user层对相应的profile进行赋值。

3.使用profile

几个相关函数的使用说明实例

1.
FND_PROFILE.GET
(‘Name of the Profile’,variable name);

[sql]
view plaincopyprint?

1. SELECT fnd_profile.value('PROFILEOPTION')

2.       ,fnd_profile.value('MFG_ORGANIZATION_ID')

3.       ,fnd_profile.value('ORG_ID')

4.       ,fnd_profile.value('LOGIN_ID')

5.       ,fnd_profile.value('USER_ID')

6.       ,fnd_profile.value('USERNAME')

7.       ,fnd_profile.value('CONCURRENT_REQUEST_ID')

8.       ,fnd_profile.value('GL_SET_OF_BKS_ID')

9.       ,fnd_profile.value('SO_ORGANIZATION_ID')

10.      ,fnd_profile.value('APPL_SHRT_NAME')

11.      ,fnd_profile.value('RESP_NAME')

12.      ,fnd_profile.value('RESP_ID')

13.  FROM DUAL;

SELECTfnd_profile.value('PROFILEOPTION')

,fnd_profile.value('MFG_ORGANIZATION_ID')

,fnd_profile.value('ORG_ID')

,fnd_profile.value('LOGIN_ID')

,fnd_profile.value('USER_ID')

,fnd_profile.value('USERNAME')

,fnd_profile.value('CONCURRENT_REQUEST_ID')

,fnd_profile.value('GL_SET_OF_BKS_ID')

,fnd_profile.value('SO_ORGANIZATION_ID')

,fnd_profile.value('APPL_SHRT_NAME')

,fnd_profile.value('RESP_NAME')

,fnd_profile.value('RESP_ID')

FROM DUAL;

2. variable name :=
FND_PROFILE.VALUE(‘Name ofthe profile’);

3.
FND_PROFILE.PUT
(‘Name of the profile’, valueof the profile);

[sql]
view plaincopyprint?

1. SET SERVEROUTPUT ON;

2. DECLARE

3.    v_conc_login_id      NUMBER;

4. BEGIN

5.    FND_PROFILE.put ('CONC_LOGIN_ID',1425);

6.    fnd_profile.get ('CONC_LOGIN_ID', v_conc_login_id);

7.    DBMS_OUTPUT.put_line (v_conc_login_id);

8. END;

9. Output:

10.1425

11.PL/SQL procedure successfully completed

SETSERVEROUTPUT ON;

DECLARE

v_conc_login_id      NUMBER;

BEGIN

FND_PROFILE.put ('CONC_LOGIN_ID',1425);

fnd_profile.get ('CONC_LOGIN_ID',v_conc_login_id);

DBMS_OUTPUT.put_line (v_conc_login_id);

END;

Output:

1425

PL/SQLprocedure successfully completed

FND_PROFILE.GET is the procedure and FND_PROFILE.VALUE is the function so,it return a value. 

4.FND_PROFILE.SAVE used to set the profile values frombackend.

The table
fnd_profile_options_tl
, profileoptions names are kept.  Now find the corresponding the Profileoption namefor which you need to update from backend. For thisexample I took my favorite“ORG_ID”

SELECT profile_option_name

  FROM fnd_profile_options_tl

 WHERE user_profile_option_nameLIKE'MO%'



It returns more than one row but i can make out that "ORG_ID" is thePROFILE_OPTION_NAME for MO: Operating Unit. Now I need to know the Org_ID ofthe Org whose value is to be set in MO: Operating Unit. SO I use thesimpleselect as below

SELECT organization_id,NAME

  FROMhr_all_organization_units;

From the organization name I find the one which will be the default OperatingUnit, and I note the ID. In my case the ID for my default Operating Unit is286. Now with the code below I set the profile option value usingfnd_profile.save.

DECLARE

   stat   BOOLEAN;

BEGIN

   DBMS_OUTPUT.DISABLE;

   DBMS_OUTPUT.ENABLE(100000);

   stat := fnd_profile.SAVE('ORG_ID',286,'SITE');

   IF stat

   THEN

      DBMS_OUTPUT.put_line('Stat = TRUE - profileupdated');

   ELSE

      DBMS_OUTPUT.put_line('Stat = FALSE - profileNOT updated');

   END IF;

   COMMIT;

END;



5.fnd_profile.defined

IF (fnd_profile.defined('TRANSACTION_DATE')) THEN

  l_profile_value := TO_NUMBER(fnd_profile.value('TRANSACTION_DATE'));

  ....

In oracle user Profile functionality is provided inthe FND_PROFILE package and the FNDSQF library.

What is inside this API:

·        Retrieve user profile values for the current run-time environment

·        Set user profile values for the current run-time environment

There are various Objects that can be used with thisAPI's. These are discussed below:

1. Put :This can be used to put a value to the specified user profile option.

Usage:

·        FND_Profile.Put('PROFILE_NAME','New_Value')

·        FND_Profile.Put('USERNAME', Usr_Name)

·        FND_Profile.Put('RESP_ID', Resp_ID)

·        FND_Profile.Put('RESP_APPL_ID', Resp_App_ID)

·        FND_Profile.Put('USER_ID', User_ID)

2.DEFINED : this is function returns TRUE if a value hasbeen assigned to the specified profile option.

Usage:

·        SELECT fnd_profile.defined('ACCOUNT_GENERATOR:DEBUG_MODE')ACC_GEN_DEBUG_SESSION_MODE FROM DUAL;

3.GET :This is used to retrieve the current value of the specified user profileoption

Usage :

Different type of options can be retrieved like

·        FND_Profile.Get('PROFILENAME', Profile_name);

·        FND_Profile.Get('CONC_LOGIN_ID', Conc_login_id);

·        FND_Profile.Get('LOGIN_ID', loginid);

4.VALUE : This is function which returns a character string. Used to retrievethe current value of the specified user profile option.

Usage:

·        fnd_profile.value('PROFILEOPTION')

·        fnd_profile.value('MFG_ORGANIZATION_ID')

·        fnd_profile.value('login_ID')

·        fnd_profile.value('USER_ID')

·        fnd_profile.value('USERNAME')

·        fnd_profile.value('CONCURRENT_REQUEST_ID')

·        fnd_profile.value('GL_SET_OF_BKS_ID')

·        fnd_profile.value('ORG_ID')

·        fnd_profile.value('SO_ORGANIZATION_ID')

·        fnd_profile.value('APPL_SHRT_NAME')

·        fnd_profile.value('RESP_NAME')

·        fnd_profile.value('RESP_ID')

5.VALUE_WNPS: This is a function, returns a character string.This is Used to retrieve the current value of the specified user profile optionwithout caching it.

6.SAVE_USER :This is function used to save a value for a profileoption permanently to the database, for the current user level. It is necessaryto explicitly issue a commit
when using this function. Returns TRUE if profile optionis successfully saved, otherwise FALSE.

7.SAVE :This is function used to save a value for a profile option permanently tothe database, for a specified level. It is necessary to explicitly issue acommit when using
this function. Returns TRUE if profile option is successfullysaved, otherwise FALSE.

Usage

·        fnd_profile.save('GUEST_USER_PWD', 'GUEST/ORACLE', 'SITE');

8.INITIALIZE :This is used by internal Applications ObjectLibrary to initialize the internal profile information at the level context.

The cache is first cleared of all database options.

Usage:

·        fnd_profile.initialize(user_id);

9.PUTMULTIPLE :This is used by internal Applications Object Libraryto set multiple pairs of profile options and values.

FORM开发中Profiles的使用的更多相关文章

  1. Form开发中组件控制的几个常用方法

    转自:http://oracleseeker.com/2009/09/01/graphical_component_control_in_oracle_ebs_form/ 在Oracle EBS 的F ...

  2. input file 在开发中遇到的问题 类似ajax form表单提交 input file中的文件

    最近在做项目的过程中遇到个问题,在这里做个记录防止日后忘记 现今的主流浏览器由于ajax提交form表单无法把文件类型数据提交到后台,供后台处理,可是开发中由于某些原因又不得不用ajax提交文件, 为 ...

  3. 【初码干货】使用阿里云对Web开发中的资源文件进行CDN加速的深入研究和实践

    提示:阅读本文需提前了解的相关知识 1.阿里云(https://www.aliyun.com) 2.阿里云CDN(https://www.aliyun.com/product/cdn) 3.阿里云OS ...

  4. 关于 WP 开发中.xaml 与.xaml.cs 的关系

    今天我们先来看一下在WP8.1开发中最长见到的几个文件之间的关系.比较论证,在看这个问题之前我们简单看看.NET平台其他两个不同的框架: Windows Forms 先看看Window Forms中的 ...

  5. iOS开发中 workspace 与 static lib 工程的联合使用

    在iOS开发中,其实workspace的使用没有完全发挥出来,最近做了一些研究,也想把之前写过的代码整理下,因为iOS里面的布局方式,交互方式也就那么几种.所以,整理好了之后,更能快捷开发,而且能够形 ...

  6. highcharts插件使用总结和开发中遇到的问题及解决办法

    这里使用的highchart是2014-01-09从官网下载的版本,版本号是3.0.8, 当过了几天后,发现版本号变成了3.0.9,不由得的感叹highchart的版本更新之快. 在jsp中使用hig ...

  7. ASP.NET开发中主要的字符验证方法-JS验证、正则表达式、验证控件、后台验证

    ASP.NET开发中主要的字符验证方法-JS验证.正则表达式.验证控件.后台验证 2012年03月19日 星期一 下午 8:53 在ASP.NET开发中主要的验证方法收藏 <1>使用JS验 ...

  8. Web开发中设置快捷键来增强用户体验

    从事对日外包一年多以来,发现日本的无论是WinForm项目还是Web项目都注重快捷键的使用,日本人操作的时候都喜欢用键盘而不是用鼠标去点,用他们的话来说"键盘永远比鼠标来的快",所 ...

  9. iOS开发中遇到的一些问题及解决方案【转载】

    iOS开发中遇到的一些问题及解决方案[转载] 2015-12-29 [385][scrollView不接受点击事件,是因为事件传递失败] // //  MyScrollView.m //  Creat ...

随机推荐

  1. [LeetCode] Path Sum IV 二叉树的路径和之四

    If the depth of a tree is smaller than 5, then this tree can be represented by a list of three-digit ...

  2. 数据结构与算法 —— 链表linked list(04)

    我们在上篇文章里面提到了链表的翻转,给定一个链表,对每两个相邻的节点作交换,并返回头节点,今天的这道题是它的升级版,如下: k个一组翻转链表 给出一个链表,每 k 个节点一组进行翻转,并返回翻转后的链 ...

  3. win10 jkd配置注意事项

    更换新的电脑预装win10家庭版,根据常规方法配置jdk8后运行javac提示:不是内部或外部命令,也不是可运行的程序或批处理文件. 1 设置变量classpath时前面有个点(完成这一步后javac ...

  4. [Codeforces 863E]Turn Off The TV

    Description Luba needs your help again! Luba has n TV sets. She knows that i-th TV set will be worki ...

  5. [JLOI 2012]树

    Description 在这个问题中,给定一个值S和一棵树.在树的每个节点有一个正整数,问有多少条路径的节点总和达到S.路径中节点的深度必须是升序的.假设节点1是根节点,根的深度是0,它的儿子节点的深 ...

  6. [SDOI2006]仓库管理员的烦恼

    题目描述 仓库管理员M最近一直很烦恼,因为他的上司给了他一个艰难的任务:让他尽快想出一种合理的方案,把公司的仓库整理好. 已知公司共有n个仓库和n种货物,由于公司进货时没能很好的归好类,使得大部分的仓 ...

  7. 51nod 1486 大大走格子(容斥原理)

    1486 大大走格子 题目来源: CodeForces 基准时间限制:1 秒 空间限制:131072 KB 分值: 160 难度:6级算法题   有一个h行w列的棋盘,里面有一些格子是不能走的,现在要 ...

  8. 【USACO】干草金字塔

    题目描述 贝西要用干草包堆出一座金字塔.干草包会从传送带上陆续运来,依次出现 N 包,每包干草可 以看做是一个二维平面上的一个长方形,第 i 包干草的宽度是 W i ,长度统一为 1. 金字塔的修建有 ...

  9. 12_Python的(匿名函数)Lambda表达式_Python编程之路

    Python作为一门高级语言,与很多编程语言一样都具有匿名函数这一特征 匿名函数,也就Lambda表达式,通俗来讲就是不用命名的方法,直接定义,直接用即可 创建匿名函数需要用到Lambda关键字,下面 ...

  10. Windows下免安装版mysql5.7的初始密码

    MySQL5.7之后,初始密码不在默认为空,而是随机生成的密码. 在mysql/data目录下,生成了一个.err文件(等同linux下的log日志文件,此文件会被mysql服务占用). 使用记事本可 ...