SELECT distinct fue.user_id,
fue.user_name, fue.employee_id ,paaf.assignment_number, paaf.supervisor_id
FROM FND_MENU_ENTRIES FME,
FND_RESPONSIBILITY_VL fr,
fnd_user_resp_groups_direct
fd,
fnd_user fue,
per_all_assignments_f paaf
WHERE EXISTS (SELECT 'FUNCTION_ID'
FROM FND_FORM FF,
FND_FORM_FUNCTIONS F3
WHERE FF.FORM_NAME = 'FORM_NAME'
AND F3.FORM_ID = FF.FORM_ID
AND F3.APPLICATION_ID =
FF.APPLICATION_ID
AND FME.FUNCTION_ID =
F3.FUNCTION_ID)
and fr.MENU_ID = fme.menu_id
and fd.RESPONSIBILITY_ID =
fr.RESPONSIBILITY_ID
and fd.user_id = fue.user_id
and sysdate between fue.start_date and nvl(fue.end_date, sysdate)
and fue.employee_id is not null
and sysdate between
paaf.effective_start_date and nvl(paaf.effective_end_date, sysdate)
and
fue.employee_id = paaf.person_id
No comments:
Post a Comment