Rejected Expense Report From “Expense Report Export” Concurrent Program

— Following Query gives Rejected Expense Report From “Expense Report Export” Concurrent Program
— This will help to debug issue related to Expense Report Export

SELECT *
FROM
(SELECT per.full_name,
per.employee_num,
aps.vendor_name,
aps.segment1,
aeh.invoice_num,
aeh.week_end_date,
aeh.payment_currency_code,
aeh.total,
alc.description,
aeh.org_id OU_ID,
hou.name,
aeh.default_currency_code
FROM ap_expense_report_headers_all aeh,
ap_suppliers aps,
per_employees_x per,
ap_lookup_codes alc,
hr_organization_units hou
WHERE aeh.request_id = :l_req_id and
aeh.reject_code IS NOT NULL
AND hou.organization_id(+) = aeh.org_id
AND per.employee_id = aeh.employee_id
AND aps.employee_id(+) = aeh.employee_id
AND alc.lookup_type IN (‘INVOICE IMPORT REJECTION’,’REJECT CODE’)
AND alc.lookup_code = aeh.reject_code
UNION ALL
SELECT per.full_name,
per.npw_number,
aps.vendor_name,
aps.segment1,
aeh.invoice_num,
aeh.week_end_date,
aeh.payment_currency_code,
aeh.total,
alc.description,
aeh.org_id OU_ID,
hou.name,
aeh.default_currency_code
FROM ap_expense_report_headers_all aeh,
ap_suppliers aps,
per_cont_workers_x per,
ap_lookup_codes alc,
hr_organization_units hou
WHERE aeh.request_id = :l_req_id and
aeh.reject_code IS NOT NULL
AND hou.organization_id(+) = aeh.org_id
AND per.person_id = aeh.employee_id
AND aps.vendor_id(+) = aeh.vendor_id
AND alc.lookup_type IN (‘INVOICE IMPORT REJECTION’,’REJECT CODE’)
AND alc.lookup_code = aeh.reject_code
)
ORDER BY OU_ID;

 

Thanks Yogesh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s