Continuing from my previous blog, here is the query which is responsible for retrieving users from fnd_user table for export. It might come handy for someone like me who was trying to debug issue when 0 users are being exported by the command. Make sure your where conditions are being met and this query returns you users.
[Oct 17, 2017 3:26:27 PM CEST]:1508246787584:-1:-1:ebs.oraworld.local:220.127.116.11:-1:-1:-1:-1:ANONYMOUS(-1):-1:Thread[main,5,main]:18.104.22.168:98148:1508246787589:0:STATEMENT:[fnd.oid.AppsUserExport]:total number of records exported = 0
select p.user_name,p.user_id, p.encrypted_user_password, p.email_address, p.description, nvl(cpp.raw_phone_number, p.fax) as fax, p.start_date, p.end_date, p.user_guid, p.person_first_name, p.person_last_name from (select f.person_party_id, f.user_name,f.user_id, f.encrypted_user_password, nvl(p1.email_address,f.email_address) as email_address, f.description, f.fax, f.start_date, f.end_date, f.user_guid, p1.person_first_name, nvl(p1.person_last_name, f.user_name) as person_last_name from fnd_user f, hz_parties p1 where f.person_party_id = p1.party_id(+) and f.user_id >= 100 and FND_profile.VALUE_SPECIFIC( 'APPS_SSO_LOCAL_LOGIN', user_id) <>'LOCAL' and FND_profile.VALUE_SPECIFIC( 'APPS_SSO_LDAP_SYNC', user_id) = 'Y') p, hz_contact_points cpp where cpp.primary_flag(+) = 'Y' and cpp.status(+) ='A' and cpp.owner_table_name(+) = 'HZ_PARTIES' and cpp.contact_point_type(+) = 'PHONE' and cpp.phone_line_type(+) = 'FAX' and cpp.owner_table_id(+) = p.person_party_id;