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;
/
SHOW ERR;
Other Most Useful PLSQL Scripts:
-- ------------------------------------------------
-- 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;
/
SHOW ERR;
Other Most Useful PLSQL Scripts:
- PL/SQL Function To Compute The Factorial Of A Number
- PL/SQL Function To Convert A Binary Number To A Decimal Number
- PL/SQL Function To Convert A Decimal Number To A Binary Number
- PL/SQL Function To Convert Ruppies(Numbers) In Words
- PL/SQL Function To Generate The Fibonacci Series
- PL/SQL Procedure For Counting All Tables And Respective Rows From Database
- PL/SQL Procedure To Display Monthly Calender
- PL/SQL Procedure To Reverse A String
- PL/SQL Script To Calculate Weekdays Between Two Given Dates
COMMENTS