Analytics Catalog/SAP S/4HANA/General Ledger/Trial Balance
Explore the catalogG/L line itemsACDOCAEnterprise modelExtraction
SAP S/4HANA · General Ledger (FI-GL)

Trial Balance

Every G/L account's opening balance, period debits and credits, and closing balance — with total debits equal to total credits, the check that the ledger is mathematically sound. Built on I_GLAccountLineItemCube.

Sample build of the Trial Balance — opening, movements, and closing by account, proving total debits equal total credits, and rendered tool-neutral so it runs in Power BI, SAC, or Tableau.

Trial Balance sample
balanced · period 01–04 / 2026
Filters
Ledger
0L · Leading
Company code
1010
Fiscal year
2026
Periods
01 – 04
312.40M
Total debits
312.40M
Total credits
0
Net · balanced
1,240
Accounts
AccountOpeningDebitsCreditsClosing
113100 · Bank8,400,000415,020,800414,961,5208,459,280
140000 · Inventory22,100,0006,300,0005,900,00022,500,000
160000 · Accruals(1,200,000)2,813,400(4,013,400)
400000 · Revenue31,001,500(31,001,500)
AI Analyst · active
reading

Each account's closing balance is its opening balance — the Period 0 carryforward — plus period debits minus credits. Total debits equal total credits, so the whole ledger ties to zero.

flag

Account 160000 (Accruals) is moving one-sided — credits only, opening already negative and growing. A clearing or accrual account that isn't clearing distorts the balance sheet until it's reversed.

root cause & next step

Opening balances come from Period 0 (the balance carryforward run), not from postings. If an opening looks wrong, check the carryforward run and fiscal config (SAP Note 2458367) before touching journals.

Illustrative data · total debits = total credits · runs on your warehouse. See it live →
ACDOCA · incl. Period 0+SKAT────▶Trial Balance

The report's query logic — it aggregates I_GLAccountLineItemCube by account, summing the carryforward and the period movements into opening and closing balances. The same SQL becomes a dbt model in your warehouse.

How it interconnects: it reads the released cube view, which includes the Period 0 carryforward — that's what makes opening and closing balances correct. It never reads the legacy FAGLFLEXT / GLT0 balance views; ACDOCA holds the movements and, as Period 0 documents, the carryforward.
SQL data set · genericized · parameterized · reads the cube incl. Period 0, never balance compat views
Show / hide SQL
WITH bal AS (
  SELECT c.RACCT          AS gl_account,
         c.FiscalPeriod   AS poper,        -- 0 = balance carryforward
         c.DebitCreditCode AS drcrk,        -- S = debit, H = credit
         c.AmountInCompanyCodeCurrency AS hsl
  FROM   I_GLAccountLineItemCube AS c
  WHERE  c.Ledger        = :P_LEDGER        -- 0L leading / local / IFRS
    AND  c.CompanyCode   = :P_COMPANY_CODE
    AND  c.FiscalYear    = :P_FISCAL_YEAR
)
SELECT gl_account,
       SUM(CASE WHEN poper = 0                                   THEN hsl ELSE 0 END) AS opening_balance,
       SUM(CASE WHEN poper BETWEEN 1 AND :P_TO_PERIOD
                 AND drcrk = 'S'                                 THEN hsl ELSE 0 END) AS period_debits,
       SUM(CASE WHEN poper BETWEEN 1 AND :P_TO_PERIOD
                 AND drcrk = 'H'                                 THEN hsl ELSE 0 END) AS period_credits,
       SUM(CASE WHEN poper <= :P_TO_PERIOD                       THEN hsl ELSE 0 END) AS closing_balance
FROM   bal
GROUP  BY gl_account
ORDER  BY gl_account;
One rule that catches people: a multi-year trial balance is built for balance-sheet accounts, whose balances carry forward. For P&L and retained-earnings accounts, keep the range inside a single fiscal year or the opening balances won't match (SAP KBA 3684919).

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 account · ledger · period.

dim_gl_accountaccount · FS hierarchy dim_cost_centerCO · profit center dim_company_codeledger · segment dim_datefiscal period fct_gl_balancefact · one row per account · periodopening · debit · credit · closing
●— fact → dimension join
ElementTypeDefinition
dim_gl_accountdimensionAccount & financial-statement hierarchy (SKA1 / SKAT)
dim_cost_centerdimensionCO assignment — cost center / profit center / segment
dim_company_codedimensionCompany code & ledger context (RLDNR)
dim_datedimensionConformed calendar — fiscal year & period
opening_balancemeasurePeriod 0 carryforward at the start of the range
period_debitsmeasureSum of debit movements in the period range
period_creditsmeasureSum of credit movements in the period range
closing_balancemeasureOpening + debits − credits, cumulative to the period
Runs on your cloud warehouse — Snowflake, BigQuery, Redshift, or Synapse on AWS, Google Cloud, or Azure. Total debits equal total credits — 0% variance by design. You own the code, the model, and the data.
How the data gets here: a SAP-compliant extract of ACDOCA — released CDS view via SLT, or Table / Table-CDC — never ODP-RFC (prohibited under SAP Note 3255746, blocked June 2026). See the extraction pattern & data flow →
See the complete model
How this report's fact and dimensions fit the full ACDOCA-centered picture, via conformed keys.
General Ledger data model → Enterprise model →

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.

ObjectRoleKey fieldsS/4HANA status
I_GLAccountLineItemCubeReleased cube over ACDOCA incl. the Period 0 carryforward — the read objectreleasedReleased CDS view
ACDOCAUniversal Journal — movements plus the Period 0 carryforward6 PK · 360+Transparent table
SKA1 / SKATG/L account master & financial-statement hierarchySAKNRTransparent table
C_TrialBalanceQ0001SAP's standard Trial Balance query (Trial Balance app, F0996) — referencereleasedReleased CDS view
FAGLFLEXT / GLT0Legacy G/L balance tables — reference only, do not extractCompat view → ACDOCA
Key fields = the primary key plus the columns this report selects; S/4HANA status = whether the object is a live transparent table, a released CDS view, or a compatibility view over ACDOCA. The compat views are referenced by legacy joins but are never the extraction source — that's the point, not a gap.
Want this built & owned?
A reconciled, customer-owned trial balance on ACDOCA, on your cloud — your team owns the code. Ten-day proof of concept.
Download the GL pack → Talk to us →
Terms on this page
Trial balance
Every account's balance for a period, where total debits must equal total credits.
Opening balance
An account's balance at the start of the range — carried forward from before.
Closing balance
Opening plus the period's debits minus its credits.
Balance carryforward
The year-end run that brings balance-sheet openings into the new year.
Period 0
How ACDOCA stores the carryforward — a special "period zero" document.
ACDOCA
SAP's single table holding every finance posting (the "Universal Journal").
CDS view
Core Data Services — an SAP-supplied, upgrade-safe view onto the data.
I_GLAccountLineItemCube
The released view that includes the carryforward, so balances come out right.
Ledger
A parallel set of books (local GAAP, IFRS, group) — 0L is the leading ledger.
FAGLFLEXT / GLT0
The old G/L balance tables — now compatibility views; don't extract them.
ODP-RFC
An older extraction route SAP now bans for non-SAP tools (Note 3255746).