Friday 14 August 2020

How to assign role to user in oracle apps from backend

How to assign role to user in oracle apps from backend

Hi Friends, We are going to discuss about how to assign role to user in oracle apps from backend. In Oracle apps, we have the standard api which helps to assign roles to user from backend. We will share the complete plsql script, using this we can assign the role to users from backend. If we must assign roles to mass users in oracle apps, then we can use this below script in oracle apps. Please find below the complete plsql script to assign role to user in oracle apps from backend.

How to assign role to user in oracle apps from backend
How to assign role to user in oracle apps from backend

Standard API to assign role to user in oracle apps from backend

fnd_user_pkg.addresp

Complete PLSQL Script to assign role to user in oracle apps from backend

 Here below is the complete plsql script to assign role to user in oracle apps from backend

DECLARE

 

   v_user_name        VARCHAR2 (20) := 'User Name';

   v_req_resp_key     VARCHAR2 (50) := 'Receivables_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 ('Roles has been added to the user ');

 

EXCEPTION

   WHEN OTHERS THEN

      DBMS_OUTPUT.put_line ('Roles is added to the user'|| SQLCODE || '; ' || SUBSTR (SQLERRM, 1, 250));

END;


How to assign role to user in oracle apps from backend
How to assign role to user in oracle apps from backend


0 comments:

Post a Comment

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

Name

Email *

Message *