Monday 4 June 2012

Attach Responsibility to User through SQL using apps Login


Attach Responsibility to User through PL/SQL using apps Login

BEGIN
   fnd_user_pkg.addresp
      ('XX_TEST',                                /*Application User Name */
       'SYSADMIN',      /*get from Query Below */
       'SYSTEM_ADMINISTRATOR',                        /*get from Query Below */
       'STANDARD',
                  /* Most of cases it is ‘STANDARD’ so you can hard code it */
       'STANDARD',                             /* Any comments you want */
       sysdate,                                 /* Sysdate From Today */
       sysdate+365
      );                           /* Sysdate + 365 Rights for Next One Year*/
   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