How to get list of Responsibilities user belongs to? [message #157106] |
Tue, 31 January 2006 06:31 |
parabol64
Messages: 22 Registered: September 2005
|
Junior Member |
|
|
Hi all.
I've recently installed the latest Oracle Financials.
I've been trying to write a query that would return a list of responsibilities a user belongs to.
I've noticed a table, fnd_user_resp_groups_old that I could join to fnd_user and get just that.
However, the '_old' postfix worried me a bit.
Does anyone know why it's been made _old, and whether I should be using it at all?
Another question on that matter-
In Oracle, when a user logs in, he specifies a responsibility.
I assume the security rules for that resp are then applied.
What happens if the user belongs to other responsibilities with other security rules? Should all be applied, or only the ones which apply to the responsibility the user is currently logged in?
Thanks in advance,
g.
|
|
|
Re: How to get list of Responsibilities user belongs to? [message #157114 is a reply to message #157106] |
Tue, 31 January 2006 07:05 |
Art Metzer
Messages: 2480 Registered: December 2002
|
Senior Member |
|
|
VARIABLE user_name VARCHAR2(100)
EXEC :user_name := 'PARABOL64';
SELECT fu.user_name
, frv.responsibility_name
FROM apps.fnd_responsibility_vl frv
, applsys.fnd_request_groups frg
, apps.fnd_user_resp_groups_all furga
, applsys.fnd_user fu
WHERE fu.user_name = :user_name
AND TRUNC(SYSDATE) BETWEEN fu.start_date
AND NVL(fu.end_date
, TO_DATE('31-DEC-4712'
, 'DD-MON-YYYY'))
AND fu.user_id = furga.user_id
AND TRUNC(SYSDATE) BETWEEN furga.start_date
AND NVL(furga.end_date
, TO_DATE('31-DEC-4712'
, 'DD-MON-YYYY'))
AND furga.responsibility_id = frv.responsibility_id
AND frv.request_group_id = frg.request_group_id
/
|
|
|
Re: How to get list of Responsibilities user belongs to? [message #157145 is a reply to message #157106] |
Tue, 31 January 2006 08:59 |
vban2000
Messages: 207 Registered: March 2005
|
Senior Member |
|
|
another one found on the net... not sure what is the difference...
SELECT b.responsibility_name NAME
FROM apps.fnd_user_resp_groups a,
apps.fnd_responsibility_vl b,
apps.fnd_user u
WHERE a.user_id = u.user_id
AND u.user_id = &p_user_id
AND a.responsibility_id = b.responsibility_id
AND a.responsibility_application_id = b.application_id
AND SYSDATE BETWEEN a.start_date AND NVL (a.end_date, SYSDATE + 1)
AND b.end_date IS NULL
AND u.end_date IS NULL
|
|
|
|
Re: How to get list of Responsibilities user belongs to? [message #157756 is a reply to message #157106] |
Sun, 05 February 2006 09:57 |
subba reddy
Messages: 4 Registered: January 2006 Location: bangalore
|
Junior Member |
|
|
SELECT RESPONSIBILITY_KEY, RESPONSIBILITY_ID
FROM
APPLSYS.FND_RESPONSIBILITY
WHERE
REQUEST_GROUP_ID IN (SELECT REQUEST_GROUP_ID FROM APPLSYS.FND_REQUEST_GROUP_UNITS
WHERE
REQUEST_UNIT_ID=(SELECT CONCURRENT_PROGRAM_ID FROM APPLSYS.FND_CONCURRENT_PROGRAMS WHERE CONCURRENT_PROGRAM_NAME IN '&Prog_Short_Name'))
ORDER BY RESPONSIBILITY_KEY
Concurrent program short name should be given as a parameter in CAPS.
|
|
|
|
Re: How to get list of Responsibilities user belongs to? [message #166967 is a reply to message #157917] |
Mon, 10 April 2006 10:03 |
parabol64
Messages: 22 Registered: September 2005
|
Junior Member |
|
|
i'm currently using the following sql to retrieve responsibility ID and name for a user:
SELECT DISTINCT APPLSYS.FND_RESPONSIBILITY_TL.RESPONSIBILITY_NAME, APPLSYS.FND_RESPONSIBILITY.RESPONSIBILITY_ID
FROM APPLSYS.FND_RESPONSIBILITY,APPLSYS.FND_RESPONSIBILITY_tl, APPS.FND_USER_RESP_GROUPS, APPS.FND_USER_RESP_GROUPS_ALL, APPLSYS.FND_USER, APPLSYS.FND_REQUEST_GROUPS
WHERE APPLSYS.FND_USER.USER_NAME = 'USERNAME' AND TRUNC(SYSDATE) BETWEEN APPLSYS.FND_USER.START_DATE AND NVL(APPLSYS.FND_USER.END_DATE,
TO_DATE('31-DEC-4000', 'DD-MON-YYYY')) AND APPLSYS.FND_USER.USER_ID = APPS.FND_USER_RESP_GROUPS_ALL.USER_ID AND TRUNC(SYSDATE)
BETWEEN APPS.FND_USER_RESP_GROUPS_ALL.START_DATE AND NVL(APPS.FND_USER_RESP_GROUPS_ALL.END_DATE, TO_DATE('31-DEC-4000', 'DD-MON-YYYY'))
AND APPS.FND_USER_RESP_GROUPS_ALL.RESPONSIBILITY_ID = APPLSYS.FND_RESPONSIBILITY.RESPONSIBILITY_ID
AND APPLSYS.FND_RESPONSIBILITY.RESPONSIBILITY_ID = APPLSYS.FND_RESPONSIBILITY_TL.RESPONSIBILITY_ID
AND APPLSYS.FND_RESPONSIBILITY.REQUEST_GROUP_ID = APPLSYS.FND_REQUEST_GROUPS.REQUEST_GROUP_ID
This too seems not to return the expected result ie what I actually see when I log in to Financials with that user.
|
|
|