2012年12月31日 星期一

FND_PRIFILE.VALUE

USERNAME
Your user's current Oracle Application Object Library username.
USER_ID
Your user's current Oracle Application Object Library user ID.
RESP_ID
Your user's current responsibility ID.
APPL_SHRT_NAME
The short name of the application connected to your user's current responsibility.
RESP_APPL_ID
The application ID of the application connected to your user's current responsibility.
FORM_NAME
The name of the current form. Not available for concurrent programs.
FORM_ID
The form ID of the current form. Not available for concurrent programs.
FORM_APPL_NAME
The name of the application for which the current form is registered. Not available for concurrent programs.
FORM_APPL_ID
The application ID of the application for which the current form is registered. Not available for concurrent programs.
LOGON_DATE
Your user's logon date for the current session.
LAST_LOGON_DATE
Your user's logon date for the previous session.
LOGIN_ID
Your user's Sign–On Audit login ID in Oracle Application Object Library.
CONC_REQUEST_ID
Instance of your running current program. You can only use this profile option in a concurrent program. You use this profile option to fill the REQUEST_ID Who column.
CONC_PROGRAM_ID
The program ID associated with a running current program. You can only use this profile option in a concurrent program. You use this profile option to fill the PROGRAM_ID Who column.
CONC_PROGRAM_APPLICATION_ID
The application ID associated with a running current program. You can only use this profile option in a concurrent program. You use this profile option to fill the PROGRAM_APPLICATION_ID Who column.
CONC_LOGIN_ID
The login ID associated with a running concurrent program. You can only use this profile option in a concurrent program. You can use this profile option to fill the LAST_UPDATE_LOGIN Who column.
CONC_PRINT_OUTPUT
The value Yes or No that you enter in the Print Output field when you register a concurrent program. You can use the routine afpoput() from your concurrent programs to change the value of this profile option for a particular instance of your running concurrent program. This profile option determines whether the concurrent managers print the concurrent program's output to the printer.
CONC_PRINT_STYLE
The print style of your concurrent program's output that you enter in the Print Style field when you register a concurrent program. You can use the routine afpoput() from your concurrent programs to change the value of this profile option.

ORG_ID
作業單位  fnd_profile.value('ORG_ID')
MFG_ORGANIZATION_ID
存貨組織  fnd_profile.value(' MFG_ORGANIZATION_ID ')


USERNAME : FND_PROFILE.VALUE('USERNAME')
職責:fnd_profile.value('RESP_NAME')
fnd_profile.value('ORG_ID')

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.