[SQL]各項參數的取得方式

Oracle sql pl/s1l set of books id org id user id username request id

--取得 Set Of Books Id
SELECT fnd_profile.VALUE('GL_SET_OF_BKS_ID')
FROM   DUAL;

--取得當前Org Id
SELECT TO_NUMBER(fnd_profile.VALUE('ORG_ID'))
FROM   DUAL;

org_id := :$PROFILES%.ORG_ID
fnd_profile.value('MFG_ORGANIZATION_ID')

--取得User_id
SELECT TO_NUMBER(fnd_profile.VALUE('USER_ID'))
FROM   DUAL;
fnd.global.user_id --not in report
fnd_who.profile('USER ID')  in report

--取得Username
SELECT fnd_profile.VALUE('USERNAME')
FROM   DUAL;
fnd_global.user_name

--取得Request_id
SELECT fnd_profile.VALUE('CONCURRENT_REQUEST_ID')
FROM   DUAL;
fnd_reqeust.submit_request