忙裏偷閑

很多事情很多心情寫了也就記下了; 不寫,以後可能就忘了.
個人資料
正文

Query to extract ledgers user can access based on security rule

(2010-06-09 15:08:52) 下一個
Query 1:
select DISTINCT fpov.profile_option_value ledger_id
from apps.fnd_user_resp_groups_direct furgd,
         applsys.fnd_user u,
         applsys.fnd_profile_option_values fpov,
         applsys.fnd_responsibility res,
         applsys.fnd_responsibility_tl restl
where furgd.user_id = u.user_id
and furgd.responsibility_id = fpov.level_value
and fpov.level_value = res.responsibility_id
and res.responsibility_id = restl.responsibility_id
and restl.language = 'US'
and fpov.profile_option_id = 1201
and u.user_name = 'LLIU' -- user login name
and res.application_id = 101 and((furgd.END_DATE IS NULL) OR (furgd.END_DATE >= SYSDATE))
and((res.END_DATE IS NULL) OR (res.END_DATE >= SYSDATE))

Query 2: default ledger
select name from gl_ledgers where ledger_id = gl_access_set_security_pkg.get_default_ledger_id(:$PROFILES$.GL)
[ 打印 ]
閱讀 ()評論 (1)
評論
目前還沒有任何評論
登錄後才可評論.