| Case Number | 00168793 |
| Oracle Module | Purchasing (PO) / India Localization (JAI) |
| EBS Version | R12 |
| Functional Area | India Localization / Receiving / GL Transfer |
| Related Patches | None |
GL_INTERFACE rows for the affected receipt numbers with USER_JE_CATEGORY_NAME = 'Receiving India' and USER_JE_SOURCE_NAME = 'Purchasing India' have a NULL ACCOUNTED_CR (debit-only rows with no matching credit).JAI_RCV_JOURNAL_ENTRIES rows for the same receipt numbers have a NULL ENTERED_CR, causing the entered amounts to be unbalanced.During India localization receiving journal entry generation, the credit-side amounts (ACCOUNTED_CR in GL_INTERFACE and ENTERED_CR in JAI_RCV_JOURNAL_ENTRIES) were not populated for certain receipt transactions. The debit-side amounts (ACCOUNTED_DR / ENTERED_DR) are correct. The net effect is unbalanced journal entries that cannot be imported to GL. The fix sets the missing credit amounts equal to the existing debit amounts for the affected rows, restoring balance.
Use the following queries to identify unbalanced rows:
-- GL Interface unbalanced rows
SELECT reference25, USER_JE_CATEGORY_NAME, USER_JE_SOURCE_NAME, JE_HEADER_ID, JE_LINE_NUM,
SUM(NVL(ACCOUNTED_DR,0)) ACCOUNTED_DR,
SUM(NVL(ACCOUNTED_CR,0)) ACCOUNTED_CR
FROM gl_interface
WHERE USER_JE_CATEGORY_NAME = 'Receiving India'
AND USER_JE_SOURCE_NAME = 'Purchasing India'
GROUP BY reference25, USER_JE_CATEGORY_NAME, USER_JE_SOURCE_NAME, JE_HEADER_ID, JE_LINE_NUM
HAVING SUM(NVL(ACCOUNTED_DR,0)) <> SUM(NVL(ACCOUNTED_CR,0));
-- JAI journal entries unbalanced rows
SELECT transaction_id, RECEIPT_NUM, CATEGORY_NAME, SOURCE_NAME,
SUM(NVL(ENTERED_DR,0)) ENTERED_DR,
SUM(NVL(ENTERED_CR,0)) ENTERED_CR
FROM jai_rcv_journal_entries
WHERE category_name = 'Receiving India'
AND source_name = 'Purchasing India'
GROUP BY transaction_id, RECEIPT_NUM, CATEGORY_NAME, SOURCE_NAME
HAVING SUM(NVL(ENTERED_DR,0)) <> SUM(NVL(ENTERED_CR,0));
Run data_fix.sql. For each unbalanced row group in GL_INTERFACE (where ACCOUNTED_DR <> ACCOUNTED_CR), update ACCOUNTED_CR = ACCOUNTED_DR on the rows where ACCOUNTED_DR IS NULL (i.e., the credit-only side that is missing its debit, or debit-only rows needing a credit). The cursor groups rows by receipt reference, journal header, line number, category, and source, then updates the NULL credit amount to match the debit.
For each unbalanced row group in JAI_RCV_JOURNAL_ENTRIES (where ENTERED_DR <> ENTERED_CR), update ENTERED_CR = ENTERED_DR on the rows where ENTERED_DR IS NULL (the rows missing the credit amount). The cursor groups by transaction ID, receipt number, category, and source.
Commit the changes. Re-run the GL Journal Import for the Purchasing India source to import the now-balanced receiving journals to GL.
JAI_RCV_JOURNAL_ENTRIES table is populated by the India localization receiving accounting process; this table is not present in non-JAI installations. Verify the receipt numbers and journal header/line identifiers before applying. The script does not create backup tables — verify the affected row counts before committing.
| File | Description |
|---|---|
| data_fix.sql | PL/SQL anonymous block with two cursors. Cursor 1 identifies unbalanced GL_INTERFACE rows for Receiving India/Purchasing India and updates ACCOUNTED_CR = ACCOUNTED_DR where ACCOUNTED_DR IS NULL. Cursor 2 identifies unbalanced JAI_RCV_JOURNAL_ENTRIES rows and updates ENTERED_CR = ENTERED_DR where ENTERED_DR IS NULL. |
| Table | Action |
|---|---|
| GL_INTERFACE | Update ACCOUNTED_CR to equal ACCOUNTED_DR for unbalanced Receiving India rows |
| JAI_RCV_JOURNAL_ENTRIES | Update ENTERED_CR to equal ENTERED_DR for unbalanced India localization receiving rows |