Wednesday, April 2, 2014

How to add System administrator responsibility from backend-Oracle Apps R12

Often oracle apps developers are given only limit access (only certain responsibilities) to the front end application, in such a case you can add a responsibility from back end. We will know how to do this.

By using the below pl/sql you can add any responsibility to a user. Here in the below example we are adding the system administrator responsibility.

Syntax:
fnd_user_pkg.addresp(username => v_user_name
,resp_app => 'SYSADMIN'
,resp_key => 'SYSTEM_ADMINISTRATOR'
,security_group => 'STANDARD'
,description => 'Auto Assignment'
,start_date => SYSDATE - 10
,end_date => SYSDATE + 1000);

Usage:
BEGIN
    fnd_user_pkg.addresp ('OPERATIONS','SYSADMIN','SYSTEM_ADMINISTRATOR','STANDARD',
'Add Sysadmin Responsibility to OPERATIONS user using pl/sql', SYSDATE, SYSDATE + 100);
COMMIT;
DBMS_OUTPUT.put_line ('Responsibility Added Successfully');
EXCEPTION
WHEN OTHERS
  THEN
DBMS_OUTPUT.put_line ( ' Responsibility is not added due to ' || SQLCODE || SUBSTR (SQLERRM, 1, 100));
ROLLBACK;
END;

No comments:

Post a Comment