Oracle EBS GL Unposted Journals and Period Status SQL Generator
During month end, the GL close often stalls on the same few things: a subledger period still open, unposted journals, a Journal Import that never finished, or subledger entries not transferred. These queries find each one.
Fill in
From GL_LEDGERS.LEDGER_ID
As defined in your accounting calendar
200 Payables, 222 Receivables, 140 Fixed Assets, 201 Purchasing
1. Period status by application
SELECT fa.application_short_name,
ps.period_name,
ps.closing_status,
DECODE(ps.closing_status,
'O', 'Open',
'C', 'Closed',
'F', 'Future entry',
'N', 'Never opened',
'P', 'Permanently closed',
ps.closing_status) AS status_text
FROM gl_period_statuses ps,
fnd_application fa
WHERE ps.application_id = fa.application_id
AND ps.ledger_id = 1001
AND ps.period_name = 'OCT-26'
AND ps.application_id IN (101, 200, 222, 140, 201)
ORDER BY fa.application_short_name;2. Unposted journals in the period
SELECT jh.je_header_id,
jh.name,
jh.je_source,
jh.je_category,
jh.status,
jh.running_total_dr,
jh.running_total_cr,
jh.created_by,
jh.creation_date
FROM gl_je_headers jh
WHERE jh.ledger_id = 1001
AND jh.period_name = 'OCT-26'
AND jh.actual_flag = 'A'
AND jh.status <> 'P'
ORDER BY jh.je_source, jh.name;3. Rows stuck in GL_INTERFACE
SELECT gi.status,
gi.user_je_source_name,
gi.group_id,
COUNT(*) AS row_count,
SUM(NVL(gi.entered_dr, 0)) AS total_dr,
SUM(NVL(gi.entered_cr, 0)) AS total_cr
FROM gl_interface gi
WHERE gi.ledger_id = 1001
AND gi.status <> 'PROCESSED'
GROUP BY gi.status, gi.user_je_source_name, gi.group_id
ORDER BY gi.user_je_source_name;4. Subledger entries not transferred to GL
SELECT xah.application_id,
xah.period_name,
xah.accounting_entry_status_code,
xah.gl_transfer_status_code,
COUNT(*) AS entries
FROM xla_ae_headers xah
WHERE xah.ledger_id = 1001
AND xah.application_id = 200
AND xah.period_name = 'OCT-26'
AND xah.gl_transfer_status_code <> 'Y'
GROUP BY xah.application_id, xah.period_name,
xah.accounting_entry_status_code, xah.gl_transfer_status_code;5. Trial balance check for the period
SELECT gcc.segment1,
gcc.segment2,
gcc.segment3,
SUM(NVL(gb.period_net_dr, 0)) AS period_dr,
SUM(NVL(gb.period_net_cr, 0)) AS period_cr
FROM gl_balances gb,
gl_code_combinations gcc
WHERE gb.code_combination_id = gcc.code_combination_id
AND gb.ledger_id = 1001
AND gb.period_name = 'OCT-26'
AND gb.actual_flag = 'A'
AND gb.currency_code = (SELECT currency_code FROM gl_ledgers WHERE ledger_id = 1001)
GROUP BY gcc.segment1, gcc.segment2, gcc.segment3
ORDER BY gcc.segment1, gcc.segment2, gcc.segment3;Queries read only. Application IDs 101 (GL), 200 (Payables), 222 (Receivables), 140 (Fixed Assets) and 201 (Purchasing) are the standard seeded values. Segment meanings in query 5 depend on your chart of accounts, so adjust the segment columns. Status values should be verified for your release. GL_BALANCES also holds translated and converted balances, so check the currency and translated flags if you report in several currencies.
Close status in plain language
See how a read-only assistant can report what is blocking your EBS period close.
Optional. The tool and every export work without this. No spam.
How to use the generator
Enter the ledger ID and period name exactly as they appear in your calendar. Run query 1 first to see which applications are still open, then queries 2 to 4 to find the blockers. Query 5 gives a quick debit and credit view per account segment for a reasonableness check. Export each result to Excel for the close log.
- Find the ledger ID in GL_LEDGERS
- Period names are case sensitive in the query
- Re-run after each fix to watch the counts drop
What the status codes mean
In GL_PERIOD_STATUSES, CLOSING_STATUS values are O for open, C for closed, F for future entry, N for never opened and P for permanently closed. A GL period normally cannot be closed cleanly while a subledger that feeds it is still open for the same period. In GL_JE_HEADERS, STATUS P means posted, while U means unposted and other values may indicate a journal in error or in process.
Reading each query
Query 2 lists journals that would not be included in balances until posted, filtered to actuals. Query 3 shows interface rows that are not PROCESSED, grouped by source and group, which points to failed or never-run Journal Import. Query 4 compares to the SLA status, where a transfer status other than Y means the entry has not reached the GL interface. Resolve in that order: transfer, import, then post.
Common mistakes
Filtering on period name without the ledger returns rows from other ledgers in a shared calendar. Posting journals before subledgers are closed produces late adjustments, and deleting rows from GL_INTERFACE by hand instead of using the Correct Journal Import Data form leaves control tables inconsistent.
Frequently Asked Questions
How do I find unposted journals in Oracle EBS?
Query GL_JE_HEADERS for the ledger and period with a status that is not P, filtered to actual journals. The result lists each unposted journal with source, category and creator so you can post or correct it before close.
What does CLOSING_STATUS mean in GL_PERIOD_STATUSES?
O is open, C closed, F future entry, N never opened and P permanently closed. Rows exist per application and ledger, so the GL and each subledger have their own status for the same period.
Why are subledger entries not in the GL?
The Transfer Journal Entries to GL program may not have run, the accounting may still be draft, or Journal Import may have failed. Check GL_TRANSFER_STATUS_CODE in XLA_AE_HEADERS and the interface rows in GL_INTERFACE.
Can I use these queries across several ledgers?
Run them once per ledger ID, or remove the ledger filter and add LEDGER_ID to the select list and group by. Keep the ledger in the output so you can tell the results apart.
Netray can run these close checks for you on a schedule and answer questions like 'what is blocking the October close' in plain language, with the SQL shown and read-only access.
Related Tools
Oracle EBS Finance Tables Reference (GL, AP, AR, FA)
Lookup of the base tables behind General Ledger, Payables, Receivables, Fixed Assets, Subledger Accounting and Purchasing, with the columns you join on.
OracleOracle EBS Instance Health Assessment
A 10-question self-assessment that scores how well your EBS instance is run and points to the first areas to fix.
OracleOracle EBS Concurrent Managers and Settings Reference
What each standard concurrent manager and service does, and what the main tuning settings mean, in one searchable table.
OracleOracle EBS User and Responsibility Audit SQL Generator
Fill in a user and responsibility pattern and get ready-to-run queries for active user access, administrator access and duplicate access reviews.
More Oracle tools
See all- Oracle EBS Inventory Tables Reference
- Oracle EBS WIP Tables Reference
- Oracle EBS Cycle Count Workload Calculator
- Oracle EBS Discrete Manufacturing Go-Live Checklist
- Oracle EBS Inventory Accuracy Readiness Assessment
- Oracle EBS Concurrent Request Phase and Status Reference
- Oracle EBS Responsibility Design Worksheet
- Oracle EBS GL Period Close Checklist
- Oracle EBS AP Invoice Interface Template