------header---
select air.Reject_lookup_code, rejection_message,aii.*
from
AP_INTERFACE_REJECTIONS air,
AP_INVOICES_INTERFACE aii
where air.PARENT_ID = aii.INVOICE_ID
and air.PARENT_TABLE = 'AP_INVOICES_INTERFACE'
and air.created_by =fnd_global.user_name
and air.LOAD_REQUEST_ID IN (:P_LOAD_REQUEST_ID)
--------------
----Lines
select air.Reject_lookup_code, rejection_message,aii.*
from
AP_INTERFACE_REJECTIONS air,
AP_INVOICE_LINES_INTERFACE aii
where air.PARENT_ID = aii.INVOICE_LINE_ID
and air.PARENT_TABLE = 'AP_INVOICE_LINES_INTERFACE'
and air.created_by =fnd_global.user_name
and air.LOAD_REQUEST_ID IN (:P_LOAD_REQUEST_ID)