Declare
CURSOR cur_resp
IS
SELECT application_short_name, responsibility_key, security_group_key
FROM fnd_responsibility fr,
fnd_application fa,
fnd_security_groups frg,
fnd_responsibility_tl frt
WHERE fr.application_id = fa.application_id
AND fr.data_group_id = frg.security_group_id
AND fr.responsibility_id = frt.responsibility_id
AND frt.language = 'US'
AND fr.responsibility_id = 12345;
BEGIN
FOR i IN cur_resp
LOOP
BEGIN
fnd_user_pkg.delresp (username => 'ALI',
resp_app => i.application_short_name,
resp_key => i.responsibility_key,
security_group => i.security_group_key);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLERRM);
END;
DBMS_OUTPUT.put_line (
|| i.application_short_name
|| ' '
|| i.responsibility_key
|| ' '
|| i.security_group_key);
END LOOP;
COMMIT;
END;
CURSOR cur_resp
IS
SELECT application_short_name, responsibility_key, security_group_key
FROM fnd_responsibility fr,
fnd_application fa,
fnd_security_groups frg,
fnd_responsibility_tl frt
WHERE fr.application_id = fa.application_id
AND fr.data_group_id = frg.security_group_id
AND fr.responsibility_id = frt.responsibility_id
AND frt.language = 'US'
AND fr.responsibility_id = 12345;
BEGIN
FOR i IN cur_resp
LOOP
BEGIN
fnd_user_pkg.delresp (username => 'ALI',
resp_app => i.application_short_name,
resp_key => i.responsibility_key,
security_group => i.security_group_key);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLERRM);
END;
DBMS_OUTPUT.put_line (
|| i.application_short_name
|| ' '
|| i.responsibility_key
|| ' '
|| i.security_group_key);
END LOOP;
COMMIT;
END;
No comments:
Post a Comment