Create User In Oracle Apps Through Back End
declare
l_user_name varchar2(30):='TESTUSER';
l_owner varchar2(30):='xxxxx'; -- Any existing user
l_unencrypted_password varchar2(240) :='welcome123';
l_session_number number :=userenv('sessionid');
l_start_date date :=sysdate-1;
l_end_date date := null;
l_last_logon_date date := null;
l_description varchar2(240) := 'FirstName, Lastname';
l_password_date date := SYSDATE;
l_password_accesses_left number := null;
l_password_lifespan_accesses number := null;
l_password_lifespan_days number := 90;
l_employee_id number := null;
l_email_address varchar2(240) := 'existing@email.com';
l_fax varchar2(30) := null;
l_customer_id number := null;
l_supplier_id number := null;
begin
fnd_user_pkg.CreateUser(
x_user_name => l_user_name,
x_owner => l_owner,
x_unencrypted_password => l_unencrypted_password,
x_session_number => l_session_number,
x_start_date => l_start_date,
x_end_date => l_end_date,
x_last_logon_date => l_last_logon_date,
x_description => l_description,
x_password_date => l_password_date,
x_password_accesses_left => l_password_accesses_left,
x_password_lifespan_accesses => l_password_lifespan_accesses,
x_password_lifespan_days => l_password_lifespan_days,
x_employee_id => l_employee_id,
x_email_address => l_email_address,
x_fax => l_fax,
x_customer_id => l_customer_id,
x_supplier_id => l_supplier_id);
fnd_user_pkg.addresp(l_user_name,'SYSADMIN','SYSTEM_ADMINISTRATOR','STANDARD',null,sysdate-1,sysdate+90);
DBMS_OUTPUT.PUT_LINE('User Created SuccessFully');
COMMIT;
end;
No comments:
Post a Comment