Friday, August 4, 2017

User Management 


Respo assigned to a user

Connect to apps user

SELECT fu.user_name                "User Name",
       frt.responsibility_name     "Responsibility Name",
       furg.start_date             "Start Date",
       furg.end_date               "End Date",     
       fr.responsibility_key       "Responsibility Key",
       fa.application_short_name   "Application Short Name"
  FROM fnd_user_resp_groups_direct        furg,
       applsys.fnd_user                   fu,
       applsys.fnd_responsibility_tl      frt,
       applsys.fnd_responsibility         fr,
       applsys.fnd_application_tl         fat,
       applsys.fnd_application            fa
WHERE furg.user_id             =  fu.user_id
   AND furg.responsibility_id   =  frt.responsibility_id
   AND fr.responsibility_id     =  frt.responsibility_id
   AND fa.application_id        =  fat.application_id
   AND fr.application_id        =  fat.application_id
   AND frt.language             =  USERENV('LANG')
   AND UPPER(fu.user_name)      =  UPPER('username')  -- <change it>
   -- AND (furg.end_date IS NULL OR furg.end_date >= TRUNC(SYSDATE))
ORDER BY frt.responsibility_name;



End date all the users


use below script to end date all user’s in EBS – in Not in add users what you need it will take long time but this is the best way to end date user’s using fnd_user_pkg.updateuser.

DECLARE
   CURSOR user_cur
   IS
      SELECT user_name, end_date
        FROM fnd_user
       WHERE (end_date IS NULL OR end_date > TRUNC (SYSDATE))
         AND user_id > 1000
         AND user_name NOT IN
                ('MASTRACCIF', 'ANONYMOUS',
                 'CONCURRENT MANAGER', 'WFMAILEROWNER', 'ASADMIN',
                 'INITIAL SETUP', 'FEEDER SYSTEM', 'WIZARD', 'K32910',
                 'DBA_SUPPORT', 'IBE_ADMIN', 'HRMSADMIN',
                 'AME_ADMIN','CLAIMS','HOUSTONC','K116525','K19724','ROHRSSEKEV112908');
BEGIN
   FOR user_rec IN user_cur
   LOOP
      fnd_user_pkg.updateuser (x_user_name      => user_rec.user_name,
                               x_owner          => 'SEED',
                               x_end_date       => TRUNC (SYSDATE)
                              );
   END LOOP;
   COMMIT;
END;
/

No comments:

Post a Comment