| Case Number | 00088818 |
| Oracle Module | Accounts Payable (AP) / Subledger Accounting (XLA) |
| EBS Version | R12 |
| Functional Area | Invoice Processing / Payment Processing / XLA Accounting Events |
| Related Oracle Bug | 8966238 |
accounting_event_id — no XLA accounting event was created for the invoice or its distributions.AP_INVOICE_PAYMENTS_ALL) and/or payment history records (AP_PAYMENT_HISTORY_ALL) have NULL accounting_event_id — payment events (PAYMENT CREATED, PAYMENT CANCELLED) were not created.cancellation_flag = 'Y' that prevents event generation.Oracle Bug 8966238 caused AP accounting events to not be created for certain invoice distributions, prepayment distributions, and checks. When the accounting event is missing, the XLA Create Accounting program has no event to process, leaving the transaction unaccounted. The fix generates the missing events using the standard AP_ACCOUNTING_EVENTS_PKG.Create_Events API and optionally creates missing payment history records via AP_RECONCILIATION_PKG.insert_payment_history.
Populate the following driver tables with the affected transactions before running the fix script:
AP_TEMP_INV_DRIVER_8966238 — affected invoice distributions (with process_flag = 'Y')AP_TEMP_CHK_DRIVER_8966238 — affected check IDs (with process_flag = 'Y')AP_TEMP_PREPAY_DRIVER_8966238 — affected prepayment distributions with incorrect cancellation flagRun data_fix.sql via SQL*Plus. The script prompts for User Name, Responsibility Name, and optionally an email address for log delivery.
Backup tables are created for key columns of affected rows in:
AP_INVOICE_DISTRIBUTIONS_ALL and AP_SELF_ASSESSED_TAX_DIST_ALLAP_INVOICE_PAYMENTS_ALLAP_PAYMENT_HISTORY_ALLFor prepayment distributions with incorrect cancellation_flag = 'Y', the script resets the flag to 'N' in both AP_INVOICE_DISTRIBUTIONS_ALL and AP_SELF_ASSESSED_TAX_DIST_ALL, then calls AP_Acctg_Data_Fix_PKG.repop_prepay_dists to repopulate prepayment events.
For each distinct invoice in the driver table, the script calls AP_ACCOUNTING_EVENTS_PKG.Create_Events:
'INVOICES' — for validated distributions with no event'INVOICE CANCELLATION' — for cancelled distributions with no eventFor each check in the driver table:
PAYMENT CREATED event if none exists, updates AP_INVOICE_PAYMENTS_ALL.accounting_event_id, and creates a AP_PAYMENT_HISTORY_ALL record if also missing.PAYMENT CANCELLED event if none exists and updates the payment history records.The script commits per invoice and per check, updates driver table records to process_flag = 'D' on success, and produces an HTML log with the corrected transactions. Run Create Accounting for the affected transactions to complete the fix.
AP_ACCTG_DATA_FIX_PKG. Driver tables must be created and populated before running. The script processes both invoice and check events. Transactions that fail to get an event generated remain with process_flag = 'Y' in the driver tables.
| File | Description |
|---|---|
| data_fix.sql | Oracle GDF fix script (Bug 8966238). Generates missing XLA accounting events for AP invoice distributions and payment checks. Fixes incorrect cancellation_flag on prepayment distributions. Creates missing payment history records. Uses AP_ACCOUNTING_EVENTS_PKG.Create_Events and AP_RECONCILIATION_PKG.insert_payment_history APIs. |
| Table | Action |
|---|---|
| AP_INVOICE_DISTRIBUTIONS_ALL | Accounting event ID populated via Create_Events; cancellation_flag reset to 'N' for prepayments |
| AP_SELF_ASSESSED_TAX_DIST_ALL | Cancellation_flag reset to 'N' for prepayments |
| AP_INVOICE_PAYMENTS_ALL | Accounting_event_id populated with PAYMENT CREATED event |
| AP_PAYMENT_HISTORY_ALL | Accounting_event_id populated; missing history records inserted |
| AP_TEMP_INV_DRIVER_8966238 | Driver — process_flag updated to 'D' on success |
| AP_TEMP_CHK_DRIVER_8966238 | Driver — process_flag updated to 'D' on success |