Transaction Console Invoice Approval History
Hi, All
I am trying to create a report to retrieve information from the transaction console related to invoice approval history.
I'm using the tables and SQL below, however, in some cases the approval history table does not provide information for some invoices/transactions.
The purpose of the report is to provide the history of approvers through the workflow.
Has anyone ever needed to build something similar?
Tabbles:
ap_invoices_all
ap_invoice_lines_all
AP_INVOICE_DISTRIBUTIONS_ALL
hz_parties hp
HRC_TXN_HEADER
FA_FUSION_SOAINFRA.WFTASK
FA_FUSION_SOAINFRA.WFTASKHISTORY
HRC_TXN_CONSOLE_ENTRY
SQL:
SELECT distinct aia.invoice_num, aia.invoice_amount, TO_CHAR(aia.invoice_id) invoice_id, hp.party_name, to_char(dist.ACCOUNTING_DATE, 'MM/DD/YYYY') ACCOUNTING_DATE, history.UPDATEDBYDISPLAYNAME, history.UPDATEDDATE UPDATEDDATE, task.TASKID, header.TRANSACTION_ID, header.object_id, history.IDENTIFICATIONKEY, history.ASSIGNEESDISPLAYNAME, history.STATE, history.NUMBEROFTIMESMODIFIED, history.OUTCOME, history.VERSIONREASON, history.FROMUSERDISPLAYNAME, console.console_txn_status, console.status_categoryfrom ap_invoices_all aia, ap_invoice_lines_all aila, AP_INVOICE_DISTRIBUTIONS_ALL dist, hz_parties hp, HRC_TXN_HEADER header, FA_FUSION_SOAINFRA.WFTASK task, FA_FUSION_SOAINFRA.WFTASKHISTORY history, HRC_TXN_CONSOLE_ENTRY consolewhere 1 = 1 AND aia.invoice_id = dist.invoice_id and aia.Invoice_id = aila.Invoice_id and aia.party_id = hp.party_id and aia.Invoice_id = header.OBJECT_ID -- aia.Invoice_id = header.SUBJECT_ID and to_char(header.OBJECT_ID) =