1. 批量增加用戶角色
begin
for r_resp in (select fa.application_id,
fa.application_short_name,
fr.responsibility_id,
fr.responsibility_name,
fr.responsibility_key,
fsg.security_group_key
from fnd_application fa,
fnd_responsibility_vl fr,
fnd_security_groups fsg
where fr.responsibility_name like '%財務查詢' --lower(fr.responsibility_name) = lower(p_resp)
and fa.application_id = fr.application_id
and fr.data_group_id = fsg.security_group_id) loop
fnd_user_pkg.addresp(username => 'QILIJUN',
resp_app => r_resp.application_short_name,
resp_key => r_resp.responsibility_key,
security_group => r_resp.security_group_key,
description => null,
start_date => sysdate,
end_date => null);
end loop;
end;