Wednesday, March 26, 2014

Payables Accounting Process does not create accounting entries for cancelled invoice

Payables Accounting Process does not create accounting entries for cancelled invoice


Opened code of program 'Payables Accounting Process’. Through this report at one place they are calling package AP_Accounting_Engine_Pkg.Do_Accounting. In this package, below sql is failing for cancelled invoice accounting-
 
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);

For example- for given invoice# 34202382 , accounting date in unaccounted distribution line is '31-may-2013 11:22:28' and end date passed by Payables Accounting Process was'31-may-2013 00:00:00'' . As this condition got failed, invoice did not pick for accounting.

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.

After above analysis, I have tried checking Oracle Metalink to verify similar kind of any issue has raised or not by anyone in past.

 At the end , I found one document which is pointing to issue, similar to our one.

R11i: APACCENG Does Not Account For Invoice Cancellation (Doc ID 1425403.1)
 
This document says it is bug in the system(BUG 7629187 - 11I APACCENG DOES NOT ACCOUNT FOR INVOICE CANCELLATION ).

It states that generally accounting_date is truncated while populating into ap_invoice_distributions_all table. But for invoice cancellation, the        accounting_date is not truncated. The same accounting_date is populated to ap_accounting_events_all. 
Because of this it is not picked when Payables Accounting Process is ran.

I think because of this above query is failing in 'Payables Accounting Process' and not picking invoice for accounting.
     
In solution section of this document states to apply patch# 7670236 to fix this issue
  
Workaround Solution given in this document is same one I have found:

                1. Navigate to Other > Requests > Run

                2. Run Payables Accounting Process with 'Account to date' parameter as one day behind of invoice cancellation date

Imp Note: Cancelled invoice will not be picked by Payables Accounting Process only when if we are running this program with end date parameter is day of when invoice cancelled. Client has faced this issue for this particular cancelled invoice because they cancelled on 31-MAY-2013 and same day they ran Payables Accounting Process with end date 31-MAY-2013. This has never picked and it was coming on every unaccounted report output.

Permanant Fix:
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. 

No comments:

Post a Comment