End date oracle Responsibility from Oracle FND User:-
Being Oracle Database administrator, we are using various API scripts to do the administrative task in Oracle Database.Before executing script we should test it on test/dev instance, then migrate the solution/script to production carefully. Here we are discussing 'how to end date responsibility in oracle apps from backend' using API.
Copy below api to remove responsibility in oracle apps from backend.
-- -----------------------------------------------------------------
-- API to end date user responsibility in oracle apps
-- -----------------------------------------------------------------
DECLARE
v_user_name VARCHAR2 (100) := '&Enter_FND_LOGIN';
v_responsibility_name VARCHAR2 (100) := '&Enter_Responsibility_name';
v_application_name VARCHAR2 (100) := NULL;
v_responsibility_key VARCHAR2 (100) := NULL;
v_security_group VARCHAR2 (100) := NULL;
BEGIN
SELECT fa.application_short_name,
fr.responsibility_key,
frg.security_group_key
INTO v_application_name,
v_responsibility_key,
v_security_group
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 = USERENV ('LANG')
AND frt.responsibility_name = v_responsibility_name;
fnd_user_pkg.delresp
( username => v_user_name,
resp_app => v_application_name,
resp_key => v_responsibility_key,
security_group => v_security_group
);
COMMIT;
DBMS_OUTPUT.put_line ( 'Responsiblity '
|| v_responsibility_name
|| ' is removed from the user '
|| v_user_name
|| ' Successfully'
);
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line
( 'Error encountered while deleting responsibilty from the user and the error is '
|| SQLERRM
);
END;
/
No comments:
Post a Comment
Thanks for reading till end. I hope this will help you more to improve your knowledge.
Now it's your turn!
What do you think? Share your experience in the comments box and subscribe for more interesting post.