Follow us: Connect on YouTube Connect on YouTube Connect on YouTube

Pages

Tuesday, 29 March 2016

How to Add Responsibility to User from Backend in Oracle applications R12

Query to find parameter values:

SELECT fa.application_short_name,
  fr.responsibility_key,
  fsg.security_group_key,
  frt.description
FROM apps.fnd_responsibility fr,
  fnd_application fa,
  fnd_security_groups fsg,
  fnd_responsibility_tl frt
WHERE frt.responsibility_name = 'System Administrator'
AND frt.LANGUAGE              = USERENV ('LANG')
AND frt.responsibility_id     = fr.responsibility_id
AND fr.application_id         = fa.application_id
AND fr.data_group_id          = fsg.security_group_id;


API to add responsibility to user:

DECLARE
   v_user_name             VARCHAR2 (30)  := '&user_name';
   v_responsibility_name   VARCHAR2 (100) := '&responsibility_name';
   v_application_name      VARCHAR2 (100) := NULL;
   v_responsibility_key    VARCHAR2 (100) := NULL;
   v_security_group        VARCHAR2 (100) := NULL;
   v_description           VARCHAR2 (100) := NULL;
BEGIN
   SELECT fa.application_short_name, fr.responsibility_key,
          fsg.security_group_key, frt.description
     INTO v_application_name, v_responsibility_key,
          v_security_group, v_description
     FROM apps.fnd_responsibility fr,
          fnd_application fa,
          fnd_security_groups fsg,
          fnd_responsibility_tl frt
    WHERE frt.responsibility_name = v_responsibility_name
      AND frt.LANGUAGE = USERENV ('LANG')
      AND frt.responsibility_id = fr.responsibility_id
      AND fr.application_id = fa.application_id
      AND fr.data_group_id = fsg.security_group_id;

   fnd_user_pkg.addresp (username            => v_user_name,
                         resp_app            => v_application_name,
                         resp_key            => v_responsibility_key,
                         security_group      => v_security_group,
                         description         => v_description,
                         start_date          => SYSDATE,
                         end_date            => NULL
                        );
   COMMIT;
   DBMS_OUTPUT.put_line(   'Responsiblity '
                         || v_responsibility_name
                         || ' is attached to the user '
                         || v_user_name
                         || ' Successfully'
                        );
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line
                         (   'Unable to attach responsibility to user due to'
                          || SQLCODE
                          || ' '
                          || SUBSTR (SQLERRM, 1, 100)
                         );

Share this article :

8 comments:

  1. Oracle Apps R12 and Oracle Fusion Cloud Self Paced Online Training Videos Published on Udemy with Life Time Access & Live Meeting Support to Clear your Queries. Avail 25% to 80% discount. Please Check https://www.oracleappstechnical.com for Never Before Offers and Discount Coupon Codes.

    ReplyDelete
  2. I wish to show thanks to you just for bailing me out of this particular trouble. As a result of checking my web site only
    토토사이트

    ReplyDelete
  3. and meeting techniques that were not productive, Same as your blog I found another one come my web site info for you 안전놀이터

    ReplyDelete
  4. https://hostinglelo.in Imagine yourself uncovering the ivory mosaic of an enchanted kingdom to help your hero rescue his bride from the hands of an evil dragon. Enthralling, right? Games are much more than the simple look and find game.

    ReplyDelete
  5. https://www.buyyoutubesubscribers.in/2021/12/10/1000-subscribers-on-youtube-in-a-day/ The explosion of video over the last few years has led to a number of video hosting sites popping up. The biggest of these is YouTube. This site has grown and grown over the years and now it is estimated 48 hours of video is uploaded every minute. Incredible when you think about it.

    ReplyDelete
  6. homosexuality was a wrongdoing), however was dazzled by her capacity to deal with the unfriendly group.
    우리계열

    ReplyDelete
  7. https://www.visualaidscentre.com/lasik-eye-surgery-in-delhi/ If you have heard of YouTube you will know it is a free online video storage site which lets you view video content for free. More and more business owners are slowly discovering how YouTube marketing is going to benefit their business.

    ReplyDelete