Monday, February 11, 2013

how to add a responsibility to a user from backend


BEGIN
   fnd_user_pkg.addresp (
      'OPERATIONS', -- Username
      'SYSADMIN', --application short name
      'SYSTEM_ADMINISTRATOR', -- Responsibility Key
      'STANDARD', -- Security Group Key
      'Add Sysadmin Responsibility to OPERATIONS user using pl/sql', --'Description
      SYSDATE, --Start date
        SYSDATE
      + 100 --End date
   );
   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