Andy upgrade access user test
Description
select fu.user_name, fu.description, papf.full_name employee_name, fu.email_address fnd_user_email, papf.email_address hr_person_email, nvl(fu.email_address,papf.email_address) download_email from fnd_user fu, (select papf.* from per_all_people_f papf where sysdate between papf.effective_start_date and papf.effective_end_date) papf where fu.user_id in ( select fpov.level_value from fnd_profile_options fpo, fnd_profile_option_values fpov where fpov.level_id=10004 and fpov.profile_option_value='S' and fpo.profile_option_name='XXEN_REPORT_ACCESS' and fpo.application_id=fpov.application_id and fpo.profile_option_id=fpov.profile_option_id ) and nvl(fu.end_date,sysdate)>=sysdate and fu.employee_id=papf.person_id(+) order by fu.user_name |