G/L Account Line Items
Every posting to a G/L account for a period — document, date, amount, and account assignment — straight from ACDOCA, reconciled and traceable to the source journal entry.
Sample build of the G/L Account Line Items report — reconciled to the trial-balance control total, and rendered tool-neutral so it runs in Power BI, SAC, or Tableau.
| Account | Debits | Credits | Net | Manual % |
|---|---|---|---|---|
| 400000 · Revenue | — | 31,001,500 | (31,001,500) | 4% |
| 500000 · COGS | 18,400,000 | — | 18,400,000 | 6% |
| 113100 · Bank | 415,020,800 | 414,961,520 | 59,280 | 1% |
| 160000 · Accruals | 2,813,400 | — | 2,813,400 | 62% |
The report sums every ACDOCA line for the period by account and ledger, splits debits and credits, and ties each line to its BKPF document header.
Account 160000 (Accruals) is 62% manual postings — far above the 3.1% book average. Manual concentration on accruals at close is the classic restatement risk.
Route the manual accrual postings to a controller before period lock; a single reversing-entry error here flows straight into the financial statements.
The report's query logic — generic SQL on ACDOCA, the Universal Journal. The same SQL becomes a dbt model in your warehouse, so one definition drives both the report and the analytics layer.
Show / hide SQL
WITH gl_lines AS (
SELECT a.rldnr, a.rbukrs, a.gjahr, a.belnr, a.docln,
a.racct, a.rcntr, a.prctr, a.budat, a.drcrk, a.hsl
FROM acdoca a
WHERE a.rldnr = :P_LEDGER -- 0L leading / local / IFRS
AND a.rbukrs = :P_COMPANY_CODE
AND a.gjahr = :P_FISCAL_YEAR
AND a.budat BETWEEN :P_FROM_DATE AND :P_TO_DATE
)
SELECT l.rbukrs AS company_code,
l.racct AS gl_account,
t.txt50 AS account_name,
l.belnr AS document_no,
l.budat AS posting_date,
h.blart AS document_type,
l.rcntr AS cost_center,
l.prctr AS profit_center,
SUM(CASE WHEN l.drcrk = 'S' THEN l.hsl ELSE 0 END) AS debit_lc,
SUM(CASE WHEN l.drcrk = 'H' THEN l.hsl ELSE 0 END) AS credit_lc,
SUM(l.hsl) AS net_lc
FROM gl_lines l
JOIN bkpf h ON h.rbukrs = l.rbukrs AND h.belnr = l.belnr AND h.gjahr = l.gjahr
LEFT JOIN skat t ON t.ktopl = :P_CHART_OF_ACCOUNTS AND t.saknr = l.racct AND t.spras = 'E'
GROUP BY l.rbukrs, l.racct, t.txt50, l.belnr, l.budat, h.blart, l.rcntr, l.prctr
ORDER BY l.racct, l.budat;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 G/L line item (ledger · document · line).
| Element | Type | Definition |
|---|---|---|
| dim_gl_account | dimension | Account & financial-statement hierarchy (SKA1 / SKAT) |
| dim_cost_center | dimension | CO assignment — cost center / profit center / segment |
| dim_company_code | dimension | Company code & ledger context (RLDNR) |
| dim_date | dimension | Conformed calendar (posting & document date) |
| amount_local | measure | HSL — company-code (local) currency |
| amount_group | measure | KSL — group currency, for consolidation |
| drcr | measure | Debit / credit signed amount (from DRCRK) |
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 |
|---|---|---|---|
| ACDOCA | Universal Journal line items — the source of truth | 6 PK · 360+ | Transparent table |
| BKPF | Accounting document header — type, dates, posting user | 4 PK | Transparent table |
| SKA1 / SKAT | G/L account master & description text | SAKNR | Transparent table |
| I_GLAccountLineItem | Released basic CDS view over ACDOCA; extract via its raw-data view | released | Released CDS view |
| BSIS / BSAS | Legacy G/L open/cleared index — joined for reference, do not extract | — | Compat view → ACDOCA |