السبت، 10 فبراير 2018

PLSQL Script To UPDATE Oracle FND User

In one of earlier posts we had created a user in Oracle application through the API. 

The following script will now update the created user using the API. The API in picture here is: 

API - fnd_user_pkg.updateuser

Lets update the Email id of the user OPERATIONS using the following Script:

-- ------------------------------------------------ 
-- API to UPDATE Oracle FND User 
-- ------------------------------------------------ 
DECLARE 
    lc_user_name                           VARCHAR2(100)   := '
operations'; 
    lc_user_password                   VARCHAR2(100)   := '
welcome'; 
    ld_user_start_date                   DATE                      := TO_DATE('04-FEB-2013'); 
    ld_user_end_date                    VARCHAR2(100)  := NULL; 
    ld_password_date                   VARCHAR2(100)  := TO_DATE('
04-FEB-2013'); 
    ld_password_lifespan_days  NUMBER               := 90; 
    ln_person_id                            NUMBER                := 123456; 
    lc_email_address                     VARCHAR2(100)  := 'example@example.com';
 


BEGIN 
   fnd_user_pkg.updateuser    (  x_user_name                           => lc_user_name, 
      x_owner                                   => NULL, 
      x_unencrypted_password    => lc_user_password, 
      x_start_date                             => ld_user_start_date, 
      x_end_date                              => ld_user_end_date, 
      x_password_date                   => ld_password_date, 
      x_password_lifespan_days  => ld_password_lifespan_days, 
      x_employee_id                       => ln_person_id, 
      x_email_address                    => lc_email_address 
   );
 

 COMMIT; 

EXCEPTION 
    WHEN OTHERS THEN 
                      ROLLBACK;                       DBMS_OUTPUT.PUT_LINE(SQLERRM); 
END; 

ليست هناك تعليقات:

إرسال تعليق