--创建用户
begin
fnd_user_pkg.CreateUser( 'S2018','','QWER1234');
commit;
end;
--批量添加职责
declare
cursor c_c is
select fa.APPLICATION_SHORT_NAME,
fr.RESPONSIBILITY_NAME,
fr.RESPONSIBILITY_KEY,
upper(fdg.data_group_name) dg,
'test' des,fr.*
from FND_RESPONSIBILITY_VL fr, fnd_application_vl fa,fnd_data_groups fdg
where fr.APPLICATION_ID = fa.APPLICATION_ID
and fr.DATA_GROUP_ID=fdg.data_group_id
and fr.RESPONSIBILITY_NAME like '1100%';
BEGIN
-- fnd_user_pkg.CreateUser( 'SIE_LZC2018','','QWER1234');
for c in c_c loop
fnd_user_pkg.AddResp(username => 'SIE_LZC2018',
resp_app =>c.APPLICATION_SHORT_NAME,
resp_key =>c.RESPONSIBILITY_KEY,
security_group => c.dg,
description =>c.des,
start_date =>sysdate,
end_date =>null );
COMMIT;
end loop;
END;