Contents
Every finance team that moves to S/4HANA sooner or later runs into a single table: ACDOCA. SAP calls it the "Universal Journal," and the name is no exaggeration — the entire architecture of S/4HANA Finance was rebuilt around this table. Most consultants and users coming from ECC still think in terms of BSEG; yet the centre of gravity for reporting has shifted completely.
In this article I explain what ACDOCA is, how it replaced the old table landscape, and how to build healthy, real-time financial reports on top of it — with real code examples.
What Is ACDOCA (the Universal Journal)?
ACDOCA is the single central table in S/4HANA where all accounting entries are stored at line-item level. The core idea of the Universal Journal approach is this: Financial Accounting (FI), Management Accounting (CO), the Material Ledger (ML), Asset Accounting (AA) and more are no longer kept in separate tables but combined into a single row.
So when an accounting document is posted, that line's GL account, cost center, profit center, functional area, and the amount expressed in both company code and group currency all sit in the same ACDOCA row. This is the table-level embodiment of the "single source of truth" principle.
Why is this a game changer?
In ECC, producing a cost center report meant querying the CO tables, a GL balance meant separate totals tables, and line-item detail meant BSEG. To make sure these tables were consistent with one another, month-end reconciliation runs were required. Because FI and CO now live on the same row in ACDOCA, that reconciliation need disappears structurally.
The Old World: BSEG, FAGLFLEXA and the Totals Tables
To appreciate the simplification ACDOCA brings, you have to look at the landscape it replaced. In ECC and the classic New G/L architecture, financial data was fragmented:
- BKPF / BSEG: Classic FI document header and line items.
- FAGLFLEXA / FAGLFLEXT: New G/L line-item and totals tables.
- GLT0: Classic G/L balance (totals) table.
- COEP / COSP / COSS: CO line-item and totals tables.
- ANEP / ANLP: Asset accounting transactions.
- MLIT / MLCR: Material Ledger tables.
This architecture had two fundamental problems. First, the same economic event was written to multiple tables (one for FI, one for CO), which created a risk of duplication and inconsistency. Second, pre-aggregated totals tables were maintained for reporting — because summing millions of line items on every query was far too slow on disk-based databases.
Thanks to HANA's columnar, in-memory architecture, S/4HANA removed the need for these totals tables. Totals can now be calculated in real time over millions of rows at query time. That is why ACDOCA stores only line items; the totals tables are, for the most part, history.
ACDOCA's Structure and Key Fields
ACDOCA is a very wide table — it contains more than 350 fields. You don't need to know all of them, but recognising the fields you'll meet constantly when writing reports makes life much easier:
Document identity
RBUKRS " Company Code
RYEAR " Fiscal Year
BELNR " Accounting Document Number
DOCLN " Document Line (6 digits — replaces BUZEI from BSEG)
GJAHR " Fiscal Year (document)
BUDAT " Posting Date
BLART " Document TypeAccount assignment
RACCT " GL Account Number
RCNTR " Cost Center
PRCTR " Profit Center
RFAREA " Functional Area
SEGMENT " Segment
KOSTL " Cost Center (CO view)
AUFNR " Internal OrderAmount and currency
ACDOCA keeps multiple currencies on the same row — this is the feature reporting benefits from most:
HSL " Amount in Company Code Currency
KSL " Amount in Group Currency
WSL " Amount in Transaction Currency
OSL " Amount in a freely defined currency
RHCUR " Company Code currency key
RKCUR " Group currency key
DRCRK " Debit/Credit indicator (S = Debit, H = Credit)Note: amounts in ACDOCA are stored signed (credit postings traditionally come through as negative). When calculating balances it is critical to interpret this sign logic and the DRCRK field correctly.
What Changed for Reporting?
The practical implications of the ACDOCA architecture for financial reporting are:
- No more FI-CO reconciliation: Because FI and CO are on the same row, the question "why don't FI and CO match?" disappears structurally.
- Real-time balances: No need to read a separate totals table for a balance; HANA aggregates the line items instantly. A document posted during the day appears in the report immediately.
- One level of detail: Drilling down from a summary report to line-item detail no longer requires switching tables — everything is in the same source.
- Multi-currency in a single query: Because company, group and transaction currencies sit on the same row, you can produce multi-currency reports without performing currency conversion.
- A ready-made CDS model: SAP provides a rich layer of standard CDS Views (the Virtual Data Model) on top of ACDOCA — you can report without joining tables from scratch.
Writing a Financial Report with CDS Views
In S/4HANA, rather than selecting from ACDOCA directly, the correct approach is to use SAP's standard CDS Views as much as possible. They already set up the currency, language and authorization logic correctly for you.
Step 1 — Pick the right standard CDS View
The standard views most commonly used for line-item financial reporting:
I_JournalEntryItem— the main interpreted view of Universal Journal line items.I_GLAccountLineItem— GL account line items (reporting-oriented).I_OperationalAcctgDocItem— operational accounting document items.
Step 2 — Define your own reporting view
Say we want a periodic GL balance report by company code and cost center. We can build our own consumption view on top of the standard view:
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'GL Balance Report - By Cost Center'
@Metadata.allowExtensions: true
define view entity ZC_GLBalanceByCostCenter
as select from I_JournalEntryItem
{
key CompanyCode,
key FiscalYear,
key FiscalPeriod,
key GLAccount,
key CostCenter,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
@Aggregation.default: #SUM
AmountInCompanyCodeCurrency,
@Semantics.amount.currencyCode: 'GlobalCurrency'
@Aggregation.default: #SUM
AmountInGlobalCurrency,
CompanyCodeCurrency,
GlobalCurrency
}
where Ledger = '0L' // Leading Ledger
and FinancialAccountType = 'S' // GL accounts onlyTwo things matter here: filtering the leading ledger with Ledger = '0L' (parallel ledgers would bring duplicate entries) and declaring which currency an amount belongs to with the @Semantics.amount annotation. Without that annotation, Fiori and analytics tools cannot format the amount correctly.
Step 3 — Consuming it from ABAP
Consuming the view from a report program or an OData service is now very clean:
SELECT GLAccount,
CostCenter,
SUM( AmountInCompanyCodeCurrency ) AS Balance,
CompanyCodeCurrency
FROM ZC_GLBalanceByCostCenter
WHERE CompanyCode = @lv_bukrs
AND FiscalYear = @lv_gjahr
AND FiscalPeriod BETWEEN @lv_from AND @lv_to
GROUP BY GLAccount, CostCenter, CompanyCodeCurrency
INTO TABLE @DATA(lt_balance).Notice there is no totals table, no reconciliation, no multi-table join. HANA aggregates millions of ACDOCA rows at query time and returns the balance.
Legacy Reports and Compatibility Views
When you move to S/4HANA, you may have hundreds of custom Z reports left over from the ECC era that read tables like BSEG, FAGLFLEXA and GLT0. To avoid breaking them, SAP provides a layer called compatibility views.
How does a compatibility view work?
When your old code writes SELECT ... FROM bseg, S/4HANA redirects it not to a physical BSEG table but to a V_* view built on top of ACDOCA (and related tables). So your legacy reports keep working — but behind the scenes they source their data from ACDOCA.
As handy as this bridge is, watch out for three things:
- Performance: Because compatibility views re-derive data from ACDOCA on every query, reports that used to read old totals tables sometimes run slower than expected. Heavy reports should be migrated to the new CDS model.
- New fields: You cannot reach the new ACDOCA fields (e.g. additional currencies, segment) through the old table structure — they only appear in the new model.
- Treat it as temporary: Compatibility views exist to ease migration; in the long run, moving critical reports directly onto the CDS Virtual Data Model is the healthiest path.
Performance and Things to Watch Out For
ACDOCA is powerful but a large table; the issues I run into most often in the field, and my recommendations:
- Don't forget the ledger filter: On systems with parallel ledgers, omitting the
RLDNR(Ledger) filter will double-count amounts. It is by far the most common reporting bug. - Prefer standard CDS: Instead of selecting from ACDOCA directly, use SAP's interpreted views; they set up the currency and sign logic correctly for you.
- Push aggregation to the database: Rather than pulling line items into ABAP and summing them in an internal table, do the totalling in HANA with
SUM ... GROUP BY. This uses the full advantage of the in-memory architecture. - Select only the fields you need:
SELECT *is a disaster on a table with 350+ fields. On a columnar database, choosing only the columns you need affects performance dramatically. - Don't skip authorization checks: Financial data is sensitive; set up authorization correctly in reporting views with
@AccessControl.authorizationCheckand DCL (Data Control Language).
Conclusion
ACDOCA is the cornerstone of S/4HANA Finance. By combining FI, CO, ML and asset accounting into a single row, it removes the reconciliation burden, ends the dependence on totals tables, and makes real-time, multi-currency reporting possible. But to use that power correctly you need to understand the ledger logic, the sign/currency fields, and the standard CDS Virtual Data Model.
If you are migrating your legacy BSEG/FAGLFLEXA-based Z reports to S/4HANA, or building a modern financial reporting layer from scratch, we can plan that transition together as part of my SAP development services. A well-designed CDS reporting model makes a big long-term difference in both performance and maintainability.
Get consulting for your S/4HANA financial reporting and ACDOCA-based CDS development project.
Free Initial Assessment