Home » Applications » Oracle Fusion Apps & E-Business Suite » How to get list of Responsibilities user belongs to?
How to get list of Responsibilities user belongs to? [message #157106] Tue, 31 January 2006 06:31 Go to next message
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 #157376 is a reply to message #157106] Thu, 02 February 2006 01:14 Go to previous messageGo to next message
prabhuapps
Messages: 79
Registered: June 2005
Location: Bangalore
Member
Hi,

I thing this will also help...

SELECT FRT.RESPONSIBILITY_NAME FROM
FND_USER_RESP_GROUPS_DIRECT FURGD
,FND_RESPONSIBILITY_TL FRT
WHERE FURGD.RESPONSIBILITY_ID = FRT.RESPONSIBILITY_ID
AND FURGD.USER_ID = :USER_ID

if any issue please let me know...

Regards,
Prabhu
Re: How to get list of Responsibilities user belongs to? [message #157756 is a reply to message #157106] Sun, 05 February 2006 09:57 Go to previous messageGo to next message
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 #157917 is a reply to message #157756] Tue, 07 February 2006 03:48 Go to previous messageGo to next message
parabol64
Messages: 22
Registered: September 2005
Junior Member
Which way does financials ACTUALLY retrieves the responsibilities then? Each of these queries above returns a different result.
Anyone has a clue?


Thanks,
g.
Re: How to get list of Responsibilities user belongs to? [message #166967 is a reply to message #157917] Mon, 10 April 2006 10:03 Go to previous message
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.

Previous Topic: Provisional posting
Next Topic: what is MD50,MD70, 2BE doc?
Goto Forum:
  


Current Time: Mon Dec 23 11:29:28 CST 2024