Monday, 2 August 2021

AOL : Query to fetch responsibilities attached to a User

 Query to fetch the responsibilities attached to a FND_USER login.


SELECT t.responsibility_id,

       t.responsibility_name,

       v.RESPONSIBILITY_KEY,

       (select (fa.APPLICATION_SHORT_NAME ||' - '|| fa.APPLICATION_NAME) application_name

          from fnd_application_vl fa

         where fa.APPLICATION_ID = t.application_id) application_name

  FROM FND_RESPONSIBILITY_TL t, fnd_responsibility_vl v

 WHERE t.RESPONSIBILITY_ID IN

       (SELECT RESPONSIBILITY_ID

          FROM FND_USER_RESP_GROUPS

         WHERE USER_ID IN (SELECT USER_ID

                             FROM FND_USER

                            WHERE USER_NAME = 'FNDUSERNAME'))

   and v.RESPONSIBILITY_ID = t.responsibility_id;

AOL: Apps Initialize Script

 Apps Initialization Script  : 

l_resp_id number; 

l_user_id number; 

l_app_id   number;

BEGIN

select t.RESPONSIBILITY_ID 

into g_resp_id

 from fnd_responsibility_tl t where t.RESPONSIBILITY_NAME like 'Purchasing Administrator';

SELECT f.USER_ID

into l_user_id

 FROM fnd_user f WHERE f.user_name =  'USERNAME';

 select t.application_id 

into l_app_id  

from fnd_application_vl t where application_short_name = 'PO';


  fnd_global.apps_initialize(user_id           => l_user_id

                            ,resp_id           => g_resp_id

                            ,resp_appl_id      => l_app_id  

                            ,security_group_id => 0

                            ,server_id         => NULL);


EXCEPTION

  WHEN OTHERS THEN

    dbms_output.put_line('SQLERRM ' || SQLERRM);

  

END;

AOL : Query to fetch responsibilities attached to a User

 Query to fetch the responsibilities attached to a FND_USER login. SELECT t.responsibility_id,        t.responsibility_name,        v.RESPON...