add

About Me

My photo
Oracle Apps - Techno Functional consultant

Friday, December 13

Update user details using API


Update an existing Oracle User in R12 Oracle Apps using API FND_USER_PKG.UPDATEUSER

----------
We will try to update the email address for an existing user OPerations using the API. There was no email_address populated to the user Operations prior to running the API.



DECLARE
   v_user_name       VARCHAR2 (100) := 'OPERATIONS';

   v_email_address   VARCHAR2 (100) := 'operations@welcome.com';
BEGIN
   fnd_user_pkg.updateuser (x_user_name                    => v_user_name,
                            x_owner                        => NULL,
                            x_unencrypted_password         => NULL,
                            x_session_number               => 0,
                            x_start_date                   => NULL,
                            x_end_date                     => NULL,
                            x_last_logon_date              => NULL,
                            x_description                  => NULL,
                            x_password_date                => NULL,
                            x_password_accesses_left       => NULL,
                            x_password_lifespan_accesses   => NULL,
                            x_password_lifespan_days       => NULL,
                            x_employee_id                  => NULL,
                            x_email_address                => v_email_address,
                            x_fax                          => NULL,
                            x_customer_id                  => NULL,
                            x_supplier_id                  => NULL,
                            x_user_guid                    => NULL,
                            x_change_source                => NULL);

   --COMMIT;

   DBMS_OUTPUT.
    put_line ('User ' || v_user_name || ' is Updated successfully');
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.
       put_line (
         'Error encountered while updating the user and the error is '
         || SQLERRM);
END;

No comments: