Script to create user in oracle apps
In this post , We will be discuss about script to create user in oracle apps. I will share the complete Oracle Standard API script to create user in oracle apps . This script is using the oracle standard API provided by oracle to mass create users in oracle apps. I will share the complete PLSQL script which will help to create user in oracle apps from backend. This help to create the mass users in oracle apps from backend. Here below is the detail about script to create user in oracle apps.
script to create user in oracle apps |
2 Important API using script to create user in oracle apps
1.fnd_user_pkg.createuser
2.fnd_user_pkg.addresp
Detail Script to create user in oracle apps
Declare
v_user_name varchar2(30) :='XX_USER'; -- User Name
v_password varchar2(30) :='TEST123'; -- Password
cursor create_responsibilities
is
select resp.responsibility_key
,resp.responsibility_name
,app.application_short_name
from fnd_responsibility_vl resp
,fnd_application app
where resp.application_id = app.application_id
and resp.responsibility_name in ( 'Application Developer' ) ;
begin
fnd_user_pkg.createuser (
x_user_name => upper(v_user_name)
,x_owner => null
,x_unencrypted_password => v_password
,x_session_number => userenv('sessionid')
,x_start_date => sysdate
,x_end_date => null );
dbms_output.put_line ('User '||v_user_name||' created !!!!!');
for get_resp in create_responsibilities
loop
fnd_user_pkg.addresp (
username => v_user_name
,resp_app => get_resp.application_short_name
,resp_key => get_resp.responsibility_key
,security_group => 'STANDARD'
,description => null
,start_date => sysdate
,end_date => null);
dbms_output.put_line('Responsibility '||get_resp.responsibility_name||' added !!!!!!');
end loop;
commit;
exception
when others then
dbms_output.put_line ('Exception : '||SUBSTR(SQLERRM, 1, 500));
rollback;
end;
0 comments:
Post a Comment