Adding new user in Oracle Apps (EBS) from back end


Application users in Oracle Apps (EBS) can be created from the front end as well as back end. The back end method for user creation can be used when you don’t have sysadmin access to the application or also it can be used to speed up the process when there are many userids to be created.

You will require apps access to connect to database  to run the package fnd_user_pkg.


We can create user, disable/enable user, add/delete responsibility to the user through back end using this seeded oracle API.


fnd_user_pkg is the seeded API provided by Oracle.

In this post we will see how to use below two functionality of this API
Step 1: createuser : the procedure to create the user
Step 2: addresp : the procedure to add responsibility to a user

Step 1: createuser : - fnd_user_pkg.createuser

DECLARE
v_user_name VARCHAR2 (100) := upper('&Enter_User_Name');
 v_description VARCHAR2 (100) := 'NEW Test User';
BEGIN
 fnd_user_pkg.createuser
(x_user_name => v_user_name,
 x_owner => NULL,
 x_unencrypted_password => '&input_password',
 x_session_number => 0,
 x_start_date => SYSDATE,
 x_end_date => NULL,
 x_last_logon_date => NULL,
 x_description => v_description,
 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 => NULL,
 x_fax => NULL,
 x_customer_id => NULL,
 x_supplier_id => NULL,
 x_user_guid => NULL,
 x_change_source => NULL
 );
 COMMIT;
END;

Step 2: Simple anonymous block to add responsibility(Sysadmin) to the user :


BEGIN
fnd_user_pkg.addresp ('&Enter_User_Name','SYSADMIN',

'SYSTEM_ADMINISTRATOR','STANDARD',
'Add Responsibility to USER using pl/sql',SYSDATE,SYSDATE + 100);
commit;
dbms_output.put_line('Responsibility Added Successfully');
exception
        WHEN others THEN
                dbms_output.put_line(' Responsibility is not added due to ' || SQLCODE || substr(SQLERRM, 1, 100));
                ROLLBACK;
END;