R12 After Validated Invoices are Deleted, Orphan Accounting Events are Created

(Doc ID 456619.1)

Last updated on JULY 15, 2013

Applies to:

Oracle Payables - Version 12.0.0 and later
Information in this document applies to any platform.
apxinwkb


***Checked for relevance on 15-Jul-2013***

Symptoms

Validated invoices can be deleted from the Invoice Workbench (APXINWKB) if any action is taken to change the Status = Validated  i.e.  Adjust the invoice or hold is created for invoice, Status = Needs Revalidation or Cancel the invoice, Status = Canceled. When invoices that were once validated are deleted, the accounting events created during validation for those deleted invoices become orphan accounting events that will prevent the period the event was created in from being closed.

1.  Run the following query to verify if you have orphans events created by this bug:

select xe.*
from xla.xla_events xe, xla.xla_transaction_entities xla
where xe.application_id = 200
and xla.application_id = xe.application_id
and xla.entity_code = 'AP_INVOICES'
and xla.entity_id = xe.entity_id
and not exists (select 'No Distributions exist for the event_id'
from ap_invoice_distributions_all aid
where aid.accounting_event_id = xe.event_id)
and not exists (select 'No Distributions exist for the bc_event_id'
from ap_invoice_distributions_all aid
where aid.bc_event_id = xe.event_id)
and not exists (select 'No invoice exists for the entity'
from ap_invoices_all ai
where ai.invoice_id = xla.source_id_int_1);

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms