I found the below script to update and end date a responsibility for a user, using responsibility name. I would like to end date multiple responsibilities (not all) for a user, using responsibility_id instead of responsibility name. I'm only used to writing simple scripts, and have tried to hack this a bit to meet my needs, but am having no luck. How do I modify this script/create a new one that will give me the outcome I am after? Thanks in advance
FROM fnd_user_resp_groups_all ful,
WHERE fu.user_id = ful.user_id
AND frt.responsibility_id = ful.responsibility_id
AND fr.responsibility_id = frt.responsibility_id
AND fsg.security_group_id = ful.security_group_id
AND fa.application_id = ful.responsibility_application_id
AND frt.language = 'US'
AND fu.user_name = 'BIJOYJ'
AND frt.responsibility_name = 'Learning Instructor Self-Service';
FOR i IN c1
fnd_user_pkg.delresp (username => i.user_name,
resp_app => i.application_short_name,
resp_key => i.responsibility_key,
security_group => i.security_group_key);
i.responsibility_name || ' has been End Dated Successfully !!!');
'Inner Exception: '
|| ' - '
|| ' - '
DBMS_OUTPUT.put_line ('Main Exception: ' || SQLERRM);