Saturday 28 March 2020

Script to add responsibility to user in Oracle apps

Script to add responsibility to user in Oracle apps

In this post , we will be discuss about Script to add responsibility to user in Oracle apps. This plsql script help to add the responsibility to users in oracle. We can add the responsibilities in bull to users using this script in oracle apps. We can use this script to add the responsibilities to users from backend in oracle apps. Here below is the complete about Script to add responsibility to user in Oracle apps.

Script to add responsibility to user in Oracle apps
Script to add responsibility to user in Oracle apps

Detail plsql Script to add responsibility to user in Oracle apps

Here below is the complete plsql Script to add responsibility to user in Oracle apps.

DECLARE

   v_user_name        VARCHAR2 (20) := 'TEST_USERS';
   v_req_resp_key     VARCHAR2 (50) := 'Payables_Manager';
   v_description      VARCHAR2 (100);
   v_req_resp_name    VARCHAR2 (200);
   v_appl_shrt_name   VARCHAR2 (20);
   v_appl_name        VARCHAR2 (50);
   v_resp_key         VARCHAR2 (50);
  
BEGIN

   SELECT fav.application_short_name,
          fav.application_name,
          frv.responsibility_name
     INTO v_appl_shrt_name, v_appl_name, v_req_resp_name
     FROM fnd_application_vl fav, fnd_responsibility_vl frv
    WHERE frv.application_id = fav.application_id
      AND frv.responsibility_key = v_req_resp_key;

   fnd_user_pkg.addresp (username         => v_user_name,
                         resp_app         => v_appl_shrt_name,
                         resp_key         => v_req_resp_key,
                         security_group   => 'STANDARD',
                         description      => v_description,
                         start_date       => SYSDATE,
                         end_date         => NULL
                                              );
   COMMIT;
  
   DBMS_OUTPUT.put_line ('responsibility is added to the user ');
  
EXCEPTION
   WHEN OTHERS THEN
      DBMS_OUTPUT.put_line ('responsibility is added to the user'|| SQLCODE || '; ' || SUBSTR (SQLERRM, 1, 250));
END;
Script to add responsibility to user in Oracle apps
Script to add responsibility to user in Oracle apps

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *