Payables Accounting Process(APACCENG) and Unaccounted Transactions Report (APXTRSWP)
This is bug found in Oracle Applications 11i version.
More details of this bug mentioned on document (BUG 7629187 - 11I APACCENG DOES NOT ACCOUNT FOR INVOICE CANCELLATION ) and they have provided patch also to fix this.
More Technical Details:
Generally accounting_date is truncated while populating line into ap_invoice_distributions_all table.But for invoice cancellation, the accounting_date is not truncating. The same accounting_date will get populated to ap_accounting_events_all as well.
Suppose you are cancelling one invoice on 31-Mar-2013 at 11:22:28 AM, then accouting_date of cancelled invoice distribution line will populate as 31-May-2013 11:22:28 not like truncated date i.e. 31-May-2013 00:00:00 happening in other cases.
Because of this if you are running Payables Accounting Process program or Unaccounted Transactions Report with date from/to paramters like 1-MAY-2013 as from date and 31-May-2013 as end date , this cancelled invoice will not get selected for accounting or reporting.
Payables Accounting Process program can submit with next day of cancelled invoice to get selected for accounting. In this case 1-Jun-2013.
Unaccounted Transactions Report, you can use same above solution or instead of from/to date , you can pass period name to get selected for reprting. In this case, MAY-13.
You can check with oracle for appropriate patch to fix this issue.
We have face this problem in our Oracle apps 11i env, not sure this issue is there or not in R12 env.
More Technical Analysis:
UPDATE AP_ACCOUNTING_EVENTS AAE
SET request_id = P_request_id
WHERE AAE.source_table = 'AP_INVOICES'
AND AAE.event_status_code = 'CREATED'
AND (AAE.accounting_date >= G_start_date OR G_start_date IS NULL)
AND (AAE.accounting_date <= G_end_date OR G_end_date IS NULL);
It means if we created invoice 30-MAY-2013 and then cancelled it on 31-MAY-2013. Then ran Payables Accounting Process to create accounting for cancelled invoice with end date parameter 31-MAY-2013. Program will not pick this invoice for accounting. But if run with end date next day of day when cancelled that is 1-JUN-2013, it will get picked.