| Case Number | 00031801 |
| Oracle Module | Accounts Payable (AP) |
| EBS Version | 11i |
| Functional Area | AP Accounting / Liability Balance / Trial Balance / AE Lines |
| Related Patches | None |
AP_LIABILITY_BALANCE table does not contain an entry corresponding to a LIABILITY-type AP_AE_LINES_ALL row for a specific ae_header_id.AP_AE_LINES_ALL rows, AP_LIABILITY_BALANCE rows, and AP_TRIAL_BAL rows reference an incorrect code_combination_id (CCID), causing postings to the wrong GL account.In Oracle 11i, AP_LIABILITY_BALANCE is populated from AP_AE_LINES_ALL LIABILITY-type rows during the GL Transfer process. For this case, a LIABILITY line in AP_AE_LINES_ALL (for ae_header_id = 15843039) has no corresponding row in AP_LIABILITY_BALANCE, and the CCID recorded across AP_AE_LINES_ALL, AP_LIABILITY_BALANCE, and AP_TRIAL_BAL is incorrect. The fix is executed in two phases: Phase A inserts the missing liability balance row and refreshes the trial balance flag; Phase B corrects the CCID across all three tables after backing up the original values.
Run 01_data_fix_phase_a.sql. This script:
AP_LIABILITY_BALANCE from AP_AE_LINES_ALL for ae_header_id = 15843039, selecting rows where ae_line_type_code = 'LIABILITY' and no matching row already exists in AP_LIABILITY_BALANCE (NOT EXISTS check on ae_header_id and ae_line_num).AP_TRIAL_BALANCE_PKG.Update_Trial_Balance_Flag(l_gl_transfer_run_id) to refresh the trial balance flag for the affected transfer run, ensuring the newly inserted row is reflected in trial balance reporting.Run 02_data_fix_phase_b.sql. This script:
RSI_AP_AE_LINES_31801 — backup of AP_AE_LINES_ALL rows for the affected ae_line_id and ae_header_idRSI_AP_LIABILITY_BAL_31801 — backup of AP_LIABILITY_BALANCE rows for the affected ae_header_idRSI_AP_TRIAL_BAL_31801 — backup of AP_TRIAL_BAL rows for the affected invoice IDAP_AE_LINES_ALL: sets code_combination_id = 68855 (correct CCID) where it was incorrectly set to 68985, for the specific ae_line_id and ae_header_id.AP_LIABILITY_BALANCE: sets code_combination_id = 68855 where it was 68985, for the same ae_header_id.AP_TRIAL_BAL: sets code_combination_id = 68855 where it was 68985, for the affected invoice ID.AP_TRIAL_BALANCE_PKG.Update_Trial_Balance_Flag call in Phase A requires the gl_transfer_run_id value used when the affected accounting entries were originally transferred to GL.
| File | Description |
|---|---|
| 01_data_fix_phase_a.sql | Inserts missing AP_LIABILITY_BALANCE row for ae_header_id 15843039 from AP_AE_LINES_ALL (LIABILITY type, NOT EXISTS check). Calls AP_TRIAL_BALANCE_PKG.Update_Trial_Balance_Flag to refresh the trial balance flag. |
| 02_data_fix_phase_b.sql | Creates backup tables RSI_AP_AE_LINES_31801, RSI_AP_LIABILITY_BAL_31801, RSI_AP_TRIAL_BAL_31801. Updates code_combination_id from 68985 to 68855 in AP_AE_LINES_ALL, AP_LIABILITY_BALANCE, and AP_TRIAL_BAL for the affected rows. |
| Table | Action |
|---|---|
| AP_LIABILITY_BALANCE | Insert missing LIABILITY row from AP_AE_LINES_ALL; update code_combination_id to correct value |
| AP_AE_LINES_ALL | Update code_combination_id from incorrect to correct CCID for affected ae_line_id |
| AP_TRIAL_BAL | Update code_combination_id from incorrect to correct CCID for affected invoice ID |
| AP_AE_LINES_ALL | Read only in Phase A — source for LIABILITY line insert into AP_LIABILITY_BALANCE |