GL Document Journal
Every document posted in a period — header and lines together, each one balanced — the document-centric audit listing (the old S_ALR_87012287). Built on the BKPF header and its ACDOCA lines.
Sample build of the GL Document Journal report — every document with its lines, each balanced, reconciled to the trial-balance control total, and rendered tool-neutral so it runs in Power BI, SAC, or Tableau.
| Document | Type | Date | Account | Debit | Credit |
|---|---|---|---|---|---|
| 4900012088 | SA | 28 Apr | 800000 · Revenue | — | 250,000 |
| 4900012088 | SA | 28 Apr | 113100 · Bank | 250,000 | — |
| 1900045123 | KR | 12 Apr | 211000 · Payables | — | 420,000 |
| 1900045123 | KR | 12 Apr | 500000 · COGS | 420,000 | — |
Every document posted in the period, header and lines together — each one balanced, debits equal credits. The document-centric view that auditors and statutory journals need.
Document 4900012088 is a manual SA journal crediting Revenue 250K, posted by a user with no source document, on 28 Apr — three days before close. Manual postings straight to P&L at period-end are the first place auditors look.
Isolate manual journals: document type SA with no AWTYP source link. Route the large or late ones to a controller before the period locks.
The report's query logic — generic SQL joining each document header to its lines, so every document prints with both sides. The same SQL becomes a dbt model in your warehouse.
Show / hide SQL
SELECT h.rbukrs AS company_code,
h.belnr AS document_no,
h.blart AS document_type,
h.budat AS posting_date,
h.usnam AS posted_by,
h.awtyp AS source_type, -- blank = manual
l.docln AS line_no,
l.racct AS gl_account,
CASE WHEN l.drcrk = 'S' THEN l.hsl END AS debit_lc,
CASE WHEN l.drcrk = 'H' THEN l.hsl END AS credit_lc
FROM bkpf h
JOIN acdoca l ON l.rbukrs = h.rbukrs
AND l.belnr = h.belnr
AND l.gjahr = h.gjahr
WHERE h.rbukrs = :P_COMPANY_CODE
AND h.gjahr = :P_FISCAL_YEAR
AND h.budat BETWEEN :P_FROM_DATE AND :P_TO_DATE
ORDER BY h.belnr, l.docln;The data-warehouse model — one fact surrounded by conformed dimensions (what you slice by) and measures (what you aggregate), expressed as dbt so it migrates with you. Grain: one row per document line (document · line).
| Element | Type | Definition |
|---|---|---|
| dim_gl_account | dimension | Account & financial-statement hierarchy (SKA1 / SKAT) |
| dim_document | dimension | Document type, posting user, and source link (AWTYP) |
| dim_company_code | dimension | Company code & ledger context (RLDNR) |
| dim_date | dimension | Conformed calendar (posting & document date) |
| debit | measure | HSL where DRCRK = S — the debit side |
| credit | measure | HSL where DRCRK = H — the credit side |
| is_manual | measure | Flag — document has no AWTYP source link |
Every source object behind this report. Each linked object has its own page — with its fields and its real S/4HANA status, so you build on the right thing.
| Object | Role | Key fields | S/4HANA status |
|---|---|---|---|
| I_JournalEntry | Released header view over BKPF — document type, dates, user | released | Released CDS view |
| I_GLAccountLineItem | Released line view over ACDOCA — the debit / credit lines | released | Released CDS view |
| BKPF | Accounting document header — one header per document | 4 PK | Transparent table |
| ACDOCA | Universal Journal line items — the document's lines | 6 PK · 360+ | Transparent table |
| Manage Journal Entries | The S/4HANA app (F0717) — the document journal's successor — reference | app | Reconcile target |