Friday 3 March 2023

API to remove end date the User in Oracle Apps - FND_USER_PKG.UPDATEUSER - Remove End Date from User Accounts

 API to remove end date the User in Oracle Apps - FND_USER_PKG.UPDATEUSER 

Remove End Date from User Accounts         



    --***************************************************************************************************--

    --* Author:     Danish Halim                                                                        *--

    --*                                                                                                 *--

    --* Date:       03 March 2023                                                                       *--

    --*                                                                                                 *--    

    --* Purpose:    API to remove end date the User in Oracle Apps - FND_USER_PKG.UPDATEUSER            *--

    --*             Remove End Date from User Accounts                                                  *--

    --***************************************************************************************************--


DECLARE

   CURSOR usercur

   IS

   

      SELECT fu.user_name

        FROM apps.fnd_user fu

       WHERE fu.end_date IS NOT NULL

         AND fu.user_name IN('SURYA');

       

BEGIN

   FOR myuser IN usercur

   LOOP

   

      BEGIN

      fnd_user_pkg.updateuser( x_user_name      => myuser.user_name,

                               x_owner          => 'ECONET',

                               x_end_date       => TO_DATE('2', 'J')             -- removes end-date

                             );

                             

        DBMS_OUTPUT.PUT_LINE('User Remove End Date : '||myuser.user_name ||' - ' || SQLERRM); 

        

      EXCEPTION

      WHEN OTHERS THEN

        ROLLBACK;

        DBMS_OUTPUT.PUT_LINE('Exception : '||SQLERRM);

        

      END;

      

   END LOOP;

   

END;

/

COMMIT;


No comments:

Post a Comment

How to Load a .csv file into Oracle Custom Forms via Push Button - EBS R12. How to upload file using Oracle Form

Here we create a form and add the button (File Location) and when the button is pressed, you will select a file such as ''Danish_Att...