0% found this document useful (0 votes)
11 views

main coding for user and responsibility acces

Uploaded by

sail8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

main coding for user and responsibility acces

Uploaded by

sail8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

declare

v_user_name varchar2(30) :='sai_test'; -- User Name


v_password varchar2(30) :='Huber12345$'; -- Password
-- c_get_resp varchar2(30);
-- List of responsibilities to be added automatically
cursor cur_get_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 ( 'System Administrator'
,'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 !!!!!'); */
dbms_output.put_line ('1');

dbms_output.put_line ('2');
for c_get_resp in cur_get_responsibilities
loop
fnd_user_pkg.addresp (
username => upper(v_user_name)
,resp_app => c_get_resp.application_short_name--'FND'
,resp_key => c_get_resp.responsibility_key --'FND_FUNC_ADMIN'

,security_group => 'STANDARD'


,description => null
,start_date => sysdate
,end_date => null);
dbms_output.put_line ('3');

end loop;
commit;
exception
when others then
dbms_output.put_line ('4');
dbms_output.put_line ('Exception : '||SUBSTR(SQLERRM, 1, 500));
rollback;
end;
/
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 ( 'System Administrator'
,'Application Developer'
,'Functional Administrator') ;
/
select * from FND_SECURITY_GROUPS;
/

You might also like