Below is the code to create users and adding responsibilities to the users through API
DECLARE
v_user_name := 'test_user';
v_session_id := sid;
/*Pass here sid from Below query-
SELECT username
, sid
, serial#
, status
FROM v$session
WHERE username = 'APPS'; */
BEGIN
FOR i IN 1..99
LOOP
fnd_user_pkg.createuser
(x_user_name => v_user_name||i
,x_owner => ''
,x_unencrypted_password => 'welcome9'
,x_session_number => v_session_id
,x_start_date => SYSDATE - 9
,x_end_date => SYSDATE + 99
,x_last_logon_date => SYSDATE - 9
,x_description => 'API User Creation'
,x_password_date => SYSDATE - 99
,x_password_accesses_left => 9999
,x_password_lifespan_accesses => 9999
,x_password_lifespan_days => 9999
,x_email_address => 'testuser@gmail.com'
,x_fax => ''
,x_customer_id => ''
,x_supplier_id => '');
fnd_user_pkg.addresp
(username => v_user_name||i
,resp_app => 'SYSADMIN'
,resp_key => 'SYSTEM_ADMINISTRATOR'
,security_group => 'STANDARD'
,description => 'Auto Assignment'
,start_date => SYSDATE - 99
,end_date => SYSDATE + 9999);
END LOOP;
END;
DECLARE
v_user_name := 'test_user';
v_session_id := sid;
/*Pass here sid from Below query-
SELECT username
, sid
, serial#
, status
FROM v$session
WHERE username = 'APPS'; */
BEGIN
FOR i IN 1..99
LOOP
fnd_user_pkg.createuser
(x_user_name => v_user_name||i
,x_owner => ''
,x_unencrypted_password => 'welcome9'
,x_session_number => v_session_id
,x_start_date => SYSDATE - 9
,x_end_date => SYSDATE + 99
,x_last_logon_date => SYSDATE - 9
,x_description => 'API User Creation'
,x_password_date => SYSDATE - 99
,x_password_accesses_left => 9999
,x_password_lifespan_accesses => 9999
,x_password_lifespan_days => 9999
,x_email_address => 'testuser@gmail.com'
,x_fax => ''
,x_customer_id => ''
,x_supplier_id => '');
fnd_user_pkg.addresp
(username => v_user_name||i
,resp_app => 'SYSADMIN'
,resp_key => 'SYSTEM_ADMINISTRATOR'
,security_group => 'STANDARD'
,description => 'Auto Assignment'
,start_date => SYSDATE - 99
,end_date => SYSDATE + 9999);
END LOOP;
END;