Thursday, June 13, 2019
Assigning Responsibility using FND_USER_PKG
BEGIN
fnd_user_pkg.addresp
(username => UPPER
('MUQTHIYAR.PASHA'),
resp_app => 'FND',
resp_key => 'APPLICATION_DEVELOPER',
security_group => 'STANDARD',
description => NULL,
start_date => SYSDATE,
end_date => NULL
);
COMMIT;
DBMS_OUTPUT.put_line ('Responsibility Added Successfully');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Responsibility is not added due to'|| SQLCODE|| SUBSTR (SQLERRM, 1, 100));
ROLLBACK;
END;
/
/* Assign Rest to user0) */
BEGIN
FOR r
IN (SELECT distinct fu.user_name,
fa.application_short_name,
fr.responsibility_key,
furg.start_date,
furg.end_date
FROM fnd_user_resp_groups_direct furg,
applsys.fnd_user fu,
applsys.fnd_responsibility_tl frt,
applsys.fnd_responsibility fr,
applsys.fnd_application_tl fat,
applsys.fnd_application fa
WHERE furg.user_id = fu.user_id
AND furg.responsibility_id = frt.responsibility_id
AND fr.responsibility_id = frt.responsibility_id
AND fa.application_id = fat.application_id
AND fr.application_id = fat.application_id
AND frt.language = USERENV('LANG')
AND FU.USER_NAME IN ('USER1',
'USER2',
'DEVUSER1',
'DEVUSER2',
'FUNCUSER1',
'FUNUSR2')
AND frt.RESPONSIBILITY_NAME in ('Application Developer',
'Workflow Administrator',
'Functional Developer',
'Functional Administrator',
'XML Publisher Administrator',
'General Ledger KSA Ledger IT',
'General Ledger UAE Ledger IT',
'General Ledger FZE Ledger IT' ))
LOOP
BEGIN
fnd_user_pkg.addresp (username => UPPER (r.USER_NAME),
resp_app => r.APPLICATION_SHORT_NAME,
resp_key => r.RESPONSIBILITY_KEY,
security_group => 'STANDARD',
description => NULL,
start_date => SYSDATE,
end_date => NULL);
COMMIT;
DBMS_OUTPUT.put_line ('Responsibility Added Successfully');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (
'Responsibility is not added due to'
|| SQLCODE
|| SUBSTR (SQLERRM, 1, 100));
ROLLBACK;
END;
END LOOP;
END;
/
--
SELECT distinct fu.user_name,
fa.application_short_name,
fr.responsibility_key,
furg.start_date,
furg.end_date
FROM fnd_user_resp_groups_direct furg,
applsys.fnd_user fu,
applsys.fnd_responsibility_tl frt,
applsys.fnd_responsibility fr,
applsys.fnd_application_tl fat,
applsys.fnd_application fa
WHERE furg.user_id = fu.user_id
AND furg.responsibility_id = frt.responsibility_id
AND fr.responsibility_id = frt.responsibility_id
AND fa.application_id = fat.application_id
AND fr.application_id = fat.application_id
AND frt.language = USERENV('LANG')
AND FU.USER_NAME IN ('USER1',
'USER2',
'DEVUSER1',
'DEVUSER2',
'FUNCUSER1',
'FUNUSR2')
AND frt.RESPONSIBILITY_NAME in ('Application Developer',
'Workflow Administrator',
'Functional Developer',
'Functional Administrator',
'XML Publisher Administrator',
'General Ledger KSA Ledger IT',
'General Ledger UAE Ledger IT',
'General Ledger FZE Ledger IT')
--AND UPPER(fu.user_name) = UPPER('USER1') -- <change it>
--AND (furg.end_date IS NULL OR furg.end_date >= TRUNC(SYSDATE))
--ORDER BY frt.responsibility_name;
Subscribe to:
Post Comments (Atom)
Some Tips About FNDLOAD
Data Synchronization Data Synchronization is a process in which some setup data would be synchronized, and this would be more important w...
-
How to customize Java Virtual Machine Settings in Oracle WebLogic Server To achieve the best performance of the application and avoid perfor...
-
Error: Checking for existing adop sessions. Continuing with existing session [Session ID: 13]. [UNEXPECTED]Master node for the curre...
-
This test will verify Oracle Workflow Java Mailer connection with IMAP Server. $AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Ddbcfile=...
No comments:
Post a Comment