好好学习,天天向上!
If you want something, work for it!

在EBS的Report开发中,需要根据客户化的一个Profile来控制用户可以访问的数据,可是在开发的过程中发现一直取不到该Profile的值,后来百度才找到了原因。

解决方法:

1、添加用户参数p_conc_request_id

2、在BeforeReport和AfterReport两个report trigger中,添加srw.user_exit('FND SRWEXIT')

官方解释如下:

The oracle standard report always use srw.user_exit('FND SRWINIT') to get the previous session information depend on p_conc_request_id, and set the client session to be the same OU. Because the application is difference session with concurrent program. If you use fnd_profile.value(...) to get the profile. You may get the same OU , even though you change OU. You can  also get the correct OU by using definition of parameter to pass in report.

实例如下所示(不可以写在AFTER PARAMETER FORM的trigger里面,经实验这个trigger还是取不到值):

function BeforeReport return boolean is
begin   
  SRW.USER_EXIT('FND SRWINIT');
  srw.message(201, nvl(fnd_profile.value('RESP_ID'),0));
  return (TRUE);
end;

posted on 2013-11-14 11:18  EchoChen  阅读(778)  评论(0编辑  收藏  举报