| Case Number | 00031880 |
| Oracle Module | Accounts Payable (AP) |
| EBS Version | R12 |
| Functional Area | Prepayment Application / Tax Distributions |
| Related Patches | Oracle Bug 9243855 (ap_prepay_dist_id_pop_fix.sql) |
PREPAY_DISTRIBUTION_ID column is NULL on tax distributions in AP_INVOICE_DISTRIBUTIONS_ALL for prepayment application and unapplication lines.PREPAY_INVOICE_ID and PREPAY_LINE_NUMBER columns are also unpopulated on exclusive tax lines associated with prepayment application/unapplication lines.Oracle Bug 9243855: Due to a code defect, when a prepayment is applied to a standard invoice, the tax distributions created for the prepay application/unapplication lines do not have their PREPAY_DISTRIBUTION_ID, PREPAY_INVOICE_ID, and PREPAY_LINE_NUMBER columns populated. This missing linkage prevents correct accounting regeneration for the prepayment.
This fix uses the Oracle Generic Data Fix (GDF) framework via the AP_Acctg_Data_Fix_PKG package.
Run the companion selection script (ap_prepay_dist_id_pop_sel.sql) first to populate the driver table AP_TEMP_DATA_DRIVER_9243855 with the affected invoice distribution records.
Run data_fix.sql as a SYSDBA or AP schema user via SQL*Plus. The script prompts for:
Execute command:
sqlplus <user_name>/<password>@<database> @data_fix.sql
The script performs the following automatically:
AP_Acctg_Data_Fix_PKG.apps_initialize.AP_INV_LINES_9243855_BKP and AP_INV_DISTS_9243855_BKP.AP_INVOICE_DISTRIBUTIONS_ALL to populate PREPAY_DISTRIBUTION_ID on affected distributions.AP_INVOICE_LINES_ALL to populate PREPAY_INVOICE_ID and PREPAY_LINE_NUMBER on affected lines.AP_PREPAY_APP_DISTS and AP_PREPAY_HISTORY_ALL records for invoices with unaccounted prepayment events.AP_ACCTG_PREPAY_DIST_PKG.prepay_dist_appl API to recreate the prepayment accounting distributions.Review the HTML log file generated in the Oracle UTL_FILE directory. Verify all records in the driver table show process_flag = 'P' (processed successfully).
process_flag <> 'P' and an error message in the driver table. Review these individually. The driver table AP_TEMP_DATA_DRIVER_9243855 must be populated by the selection script before running this fix.
| File | Description |
|---|---|
| data_fix.sql | Oracle GDF fix script for Bug 9243855. Populates PREPAY_DISTRIBUTION_ID, PREPAY_INVOICE_ID, and PREPAY_LINE_NUMBER on AP invoice distributions and lines. Recreates prepay history and distribution records. Uses AP_Acctg_Data_Fix_PKG framework with logging and email notification. |
| Bug / Patch | Description |
|---|---|
| Bug 9243855 | PREPAY_DISTRIBUTION_ID not populated on AP_INVOICE_DISTRIBUTIONS_ALL for tax distributions created during prepayment application |
| Bug 9243854 | Related RCA bug for the root cause analysis |
| Bug 17412439 | Enhancement to initialize Apps context within the fix script |
| Table | Action |
|---|---|
| AP_TEMP_DATA_DRIVER_9243855 | Driver table — populated by selection script, updated with process_flag |
| AP_INV_LINES_9243855_BKP | Backup of AP_INVOICE_LINES_ALL (created by fix) |
| AP_INV_DISTS_9243855_BKP | Backup of AP_INVOICE_DISTRIBUTIONS_ALL (created by fix) |
| AP_INVOICE_DISTRIBUTIONS_ALL | Update PREPAY_DISTRIBUTION_ID; reset accounting_event_id for reprocessing |
| AP_INVOICE_LINES_ALL | Update PREPAY_INVOICE_ID, PREPAY_LINE_NUMBER |
| AP_PREPAY_APP_DISTS | Delete and recreate for affected invoices |
| AP_PREPAY_HISTORY_ALL | Delete and recreate for affected invoices |