0% found this document useful (0 votes)
38 views

Adding Responsibility To User Using Script - Oracle Applications

This Oracle script allows a user to add a responsibility to another user by prompting for the user name and responsibility name. It looks up the application and responsibility key from tables, adds the responsibility to the user with standard security group and today's date as the start date, and commits or rolls back the transaction accordingly.

Uploaded by

Mohd Ameer
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Adding Responsibility To User Using Script - Oracle Applications

This Oracle script allows a user to add a responsibility to another user by prompting for the user name and responsibility name. It looks up the application and responsibility key from tables, adds the responsibility to the user with standard security group and today's date as the start date, and commits or rolls back the transaction accordingly.

Uploaded by

Mohd Ameer
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Adding Responsibility to User using script - Oracle Applications

Prerequisites: Apps password (database) Run below script. When prompted provide the following details to the script - Enter the user name to which responsibility is to be added - Enter the responsibility to be added to this user. DECLARE v_user_name VARCHAR2 (20) := '&Enter_User_Name'; v_req_resp_name VARCHAR2 (50) := '&Enter_Required_Responsibility'; v_description VARCHAR2 (100) := 'Adding Responsibility to user using script'; 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_key INTO v_appl_shrt_name, v_appl_name, v_resp_key FROM FND_APPLICATION_VL fav, FND_RESPONSIBILITY_VL frv WHERE frv.application_id = fav.application_id AND frv.responsibility_name = v_req_resp_name; fnd_user_pkg.addresp (username => v_user_name, resp_app => v_appl_shrt_name, resp_key => v_resp_key, security_group => 'STANDARD', description => v_description, start_date => SYSDATE, end_date => NULL); COMMIT; DBMS_OUTPUT.put_line ('The responsibility ' || v_req_resp_name || ' is added to the user ' || v_user_name); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.put_line ('Responsibility IS NOT added due to ' || SQLCODE || '; ' || SUBSTR (SQLERRM, 1, 250)); ROLLBACK; END;

You might also like