Adding Responsibility FromApps-NEW
Adding Responsibility FromApps-NEW
v_username fnd_user.user_name%type;
v_resp_key fnd_responsibility.responsibility_key%type;
v_apps_short_name fnd_application.application_short_name%type;
v_resp_name fnd_responsibility_tl.responsibility_name%type;
cursor resp_info
is
select fr.responsibility_key, fa.application_short_name
from applsys.fnd_responsibility_tl frt,
applsys.fnd_responsibility fr,
applsys.fnd_application_tl fat,
applsys.fnd_application fa
where fr.responsibility_id = frt.responsibility_id
and fa.application_id = fat.application_id
and fr.application_id = fat.application_id
and frt.language = userenv ('LANG')
and fat.language = userenv ('LANG')
and frt.responsibility_name in (
'System Administrator');
begin
v_username := <USER NAME>;
commit;
dbms_output.put_line (
v_resp_name
|| ' responsibility added successfully for '
|| v_username);
end;
end loop;
exception
when others
then
dbms_output.put_line (
v_resp_name || ' responsibility not added for ' || v_username);
dbms_output.put_line ('SQLERRM: ' || substr (sqlerrm, 1, 100));
rollback;
end;