2012年4月12日 星期四

增加一個請求群組 (報表 or 程式) 到 MENU 上


增加一個請求群組 (報表 or 程式) 到 MENU 上
一、系統管理員>>安全性>>職責>>請求

1.      新增一個請求群組:
(1)    群組代號: 請以 XX 開頭編碼, 以區分是 USER 自訂
2.      表身加入要放入此群組的報表程式名稱

二、系統管理員>> 應用模組 >>功能

新增一筆資料
1.      函數: 以 XX開頭編號 , 此函數代號不可重複
2.      使用者函數名稱: 輸入中文名稱, 此名稱是在功能表中使用的名稱
3.      摘要: 非必要, 說明資料
4.      型態 : 表單
5.      內容相依性:職責
6.      表單: 執行報表
7.      參數: REQUEST_GROUP_CODE="XXHS_INV_REPORTS" REQUEST_GROUP_APPL_SHORT_NAME="INV" TITLE="INV:庫存XML報表" USE_ORG="Y"
紅字需注意
REQUEST_GROUP_CODE="XXHS_INV_REPORTS"  --> 就 是你設定的代碼
REQUEST_GROUP_APPL_SHORT_NAME="INV" --> 就是你設定的 Application 縮寫
TITLE 自行命名


存檔後完成功能建立

  
三、系統管理員>> 應用模組 >>功能表

進入功能表畫面後, 先查詢出要編輯的功能表, 然後在表身新增一筆資料, 在函數欄輸入函數名稱後存檔

再去看職責 INV_HS_1 , MENU 上多了一項

如何在report中使用fnd_profile.value

 問題:在 EBS report客戶化開發中,如何使用 fnd_profile.value

方法:report中使用fnd_profile.valueoracle標準方法為:

       1、添加用戶參數p_conc_request_id

       2
、在BeforeReportAfterReport兩個report trigger中,添加srw.user_exit('FND SRWEXIT');


即可在report中正常使用fnd_profile.value.

function BeforeReport return boolean is
begin
  begin
   SRW.USER_EXIT('FND SRWINIT');
   exception when srw.user_exit_failure then
   srw.message(3001,'Error in SRWINIT');
   raise;  end;  return (TRUE);end;

 
function AfterReport return boolean is
begin
  begin
   SRW.USER_EXIT('FND SRWEXIT');
   exception when srw.user_exit_failure then 
   srw.message(4001,'Error in SRWEXIT');  end;   return (TRUE);
end;


原因: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  ,eventhough  you  change  OU.  You can also get the correct  OU by using definitoin of parameter  to pass in report.