| Case Number | 00030515 |
| Oracle Module | Accounts Payable (AP) |
| EBS Version | R12 |
| Functional Area | Invoice Cancellation / Accounting Events |
| Related Patches | None |
AP_INVOICES_ALL (cancelled_date is populated) but the corresponding INVOICE CANCELLATION accounting event is absent from AP_ACCOUNTING_EVENTS_ALL.accounting_event_id or accounting_date linked to the cancellation.During invoice cancellation processing, the INVOICE CANCELLATION event was not inserted into AP_ACCOUNTING_EVENTS_ALL. As a result the corresponding invoice distribution was not linked to a cancellation event and the accounting date/period was not set. This is typically caused by an interruption or error during the cancellation concurrent request.
Run data_fix.sql. The script first backs up the affected rows:
rsi_ap_inv_<case> — snapshot of AP_INVOICES_ALLrsi_ap_inv__dist_<case> — snapshot of the affected AP_INVOICE_DISTRIBUTIONS_ALL recordStamp the cancelled_date, cancelled_amount, and clear temp_cancelled_amount on AP_INVOICES_ALL to reflect the correct cancellation state. Issue COMMIT.
Insert a new row into AP_ACCOUNTING_EVENTS_ALL with:
event_type_code = 'INVOICE CANCELLATION'event_status_code = 'CREATED'accounting_date and org_idIssue COMMIT. Validate with:
SELECT accounting_event_id FROM ap_accounting_events_all WHERE event_type_code = 'INVOICE CANCELLATION' AND source_table = 'AP_INVOICES' AND source_id = <invoice_id>; -- Should return exactly one (1) record
Update AP_INVOICE_DISTRIBUTIONS_ALL to set the new accounting_event_id, accounting_date, and period_name for the affected distribution. Issue COMMIT.
| File | Description |
|---|---|
| data_fix.sql | Backs up invoice and distribution rows, updates AP_INVOICES_ALL cancellation columns, inserts the missing INVOICE CANCELLATION event into AP_ACCOUNTING_EVENTS_ALL, and links the distribution to the new event. |
| Table | Action |
|---|---|
| AP_INVOICES_ALL | Update cancelled_date, cancelled_amount, temp_cancelled_amount |
| AP_ACCOUNTING_EVENTS_ALL | Insert missing INVOICE CANCELLATION event |
| AP_INVOICE_DISTRIBUTIONS_ALL | Update accounting_event_id, accounting_date, period_name |