Every financial posting in SAP creates a document, and three tables sit at the center of it all: BKPF (the document header), BSEG (the line items), and — in SAP S/4HANA — ACDOCA (the universal journal). Understanding these tables, their key fields, and how they link together is fundamental for FI consultants, ABAP developers writing reports, and anyone preparing for SAP FICO interviews.
BKPF: The Document Header Table
BKPF stores one record per FI document — the header information that applies to the whole document. Think of it as the cover page: who posted it, when, in which company code, and in which currency.
| Field | Description |
|---|---|
| BUKRS | Company code the document was posted in |
| BELNR | Document number (together with BUKRS and GJAHR, the unique key) |
| GJAHR | Fiscal year of the document |
| BLART | Document type (for example, SA for GL documents, KR for vendor invoices, DR for customer invoices) |
| BLDAT | Document date (the date on the source document) |
| BUDAT | Posting date (the date the document hits the ledger — determines the period) |
| XBLNR | Reference document number (for example, the vendor’s invoice number) |
| BKTXT | Document header text |
| WAERS | Document currency |
| KURSF | Exchange rate used for translation |
| USNAM | User name who posted the document |
| TCODE | Transaction code used to post it |
| CPUDT / CPUTM | Date and time of entry into the system |
The golden rule: one BKPF record per document, identified by the combination of company code (BUKRS), document number (BELNR), and fiscal year (GJAHR).
BSEG: The Document Line Items Table
BSEG stores the individual line items of each FI document — every debit and credit line. A single BKPF header can have many BSEG lines.
| Field | Description |
|---|---|
| BUZEI | Line item number within the document |
| BSCHL | Posting key (for example, 40 = debit GL, 50 = credit GL, 31 = credit vendor, 01 = debit customer) |
| KOART | Account type (D = customer, K = vendor, S = GL account, A = asset) |
| SHKZG | Debit/credit indicator (S = debit, H = credit) |
| HKONT | GL account number (for S account types) |
| DMBTR | Amount in document currency |
| WRBTR | Amount in document currency (line item level, mirrors DMBTR) |
| MWSKZ | Tax code for the line item |
| KOSTL | Cost center assigned to the line |
| PRCTR | Profit center assigned to the line — for profit center master data, see our guide to the profit center table in SAP |
| ZFBDT | Baseline date for payment terms |
| ZTERM | Payment terms key |
| SGTXT | Line item text |
| ZUONR | Assignment number (often used for clearing references) |
BSEG is a cluster table in classic SAP, which means direct SELECTs on it in ABAP can be slow — one reason reporting best practices favor the secondary index tables or, in S/4HANA, ACDOCA.
How BKPF and BSEG Relate
The relationship is a classic header–item pattern. Join them on the shared key fields:
- BKPF to BSEG: MANDT + BUKRS + BELNR + GJAHR
Conceptually:
SELECT bkpf~belnr, bkpf~budat, bseg~buzei, bseg~hkont, bseg~dmbtr, bseg~shkzg
FROM bkpf
JOIN bseg ON bseg~bukrs = bkpf~bukrs
AND bseg~belnr = bkpf~belnr
AND bseg~gjahr = bkpf~gjahr
WHERE bkpf~bukrs = '1000'
AND bkpf~gjahr = '2026'.
Every BSEG line belongs to exactly one BKPF header. The header carries the document-level context (dates, currency, user); the lines carry the postings (accounts, amounts, cost objects). Debits must equal credits across the lines of a balanced document.
ACDOCA: The Universal Journal in S/4HANA
ACDOCA is the single most important table change in SAP S/4HANA Finance. It merges the FI line items (BSEG) and the CO line items (COEP) — plus many other components — into one universal journal table. Each row is a journal line carrying financial and controlling dimensions together: company code, GL account, cost center (RCNTR), profit center (PRCTR), and more.
| Field | Description |
|---|---|
| RLDNR | Ledger (for example, 0L for the leading ledger) |
| RBUKRS | Company code |
| GJAHR | Fiscal year |
| BELNR | Document number |
| DOCLN | Journal entry line number |
| RACCT | GL account number |
| RANL | Asset number (for asset postings) |
| RCNTR | Cost center |
| PRCTR | Profit center |
| KOKRS | Controlling area |
| DMBTR | Amount in document currency |
| WSL | Amount in transaction currency |
| HSL | Amount in company code currency |
| KSL | Amount in controlling area currency |
| OSL | Amount in object currency |
| BUDAT / BLDAT | Posting date / document date |
| BLART | Document type |
| POPER | Posting period |
| RMVCT | Transaction type |
| AWTYP / AWREF | Reference transaction and reference document number |
Because every currency type is stored on the line itself, multi-currency reporting no longer needs translation at report runtime.
How ACDOCA Changes the Classic Model
In classic SAP ECC, FI and CO lived in separate tables (BKPF/BSEG for FI, COBK/COEP for CO) and had to be reconciled. In S/4HANA:
- ACDOCA is the single source of truth for actuals — FI and CO postings are the same rows.
- BKPF and BSEG still exist and are populated for compatibility, but they are no longer the leading tables for reporting.
- Secondary index tables BSIS/BSAS (GL open and cleared items), BSID/BSAD (customer), and BSIK/BSAK (vendor) are effectively replaced by ACDOCA views, since open-item information is available directly on the journal.
- New GL totals tables FAGLFLEXA/FAGLFLEXT remain for classic New GL reporting, but most new analytics read ACDOCA.
The practical takeaway: in S/4HANA, write reports against ACDOCA, not BSEG.
Related Tables Worth Knowing
| Table | Description |
|---|---|
| SKA1 | GL accounts at chart-of-accounts level — the central account definition |
| SKB1 | GL accounts at company code level — company-specific settings per account |
| SKAT | GL account texts (names in each language) |
| BSIS / BSAS | Classic secondary index: GL open items / cleared items |
| BSID / BSAD | Classic secondary index: customer open items / cleared items |
| BSIK / BSAK | Classic secondary index: vendor open items / cleared items |
| FAGLFLEXA | New GL actual line items (classic New GL) |
Frequently Asked Questions
What is the difference between BKPF and BSEG?
Answer: BKPF is the document header table — one record per FI document with company code, document number, fiscal year, dates, currency, and user. BSEG is the line item table — one record per debit/credit line, with account, amount, posting key, and cost objects. They join on BUKRS + BELNR + GJAHR.
Is BSEG still used in SAP S/4HANA?
Answer: Yes, BSEG still exists and is populated when documents post, but it is no longer the leading table. In S/4HANA, ACDOCA (the universal journal) is the primary table for reporting and analytics because it combines FI and CO line items with all dimensions in one place. BSEG is also a cluster table, so direct reads on it are slower than reads on the transparent ACDOCA table — another reason new reports should target ACDOCA.
How do I join BKPF and BSEG?
Answer: Join on the shared key: BUKRS (company code), BELNR (document number), and GJAHR (fiscal year) — plus MANDT (client) in multi-client queries. Every BSEG line matches exactly one BKPF header through these fields.
What replaces BSIS and BSAS in S/4HANA?
Answer: The open-item and cleared-item information from BSIS/BSAS (and the customer/vendor equivalents BSID/BSAD/BSIK/BSAK) is available directly in ACDOCA, so these classic secondary index tables are no longer needed for reporting in S/4HANA.
Which table should I use for financial reporting in S/4HANA?
Answer: ACDOCA. It holds every journal line with FI and CO dimensions together — GL account, cost center, profit center, all currency types — making it the single source of truth. Use BKPF/BSEG only when you specifically need the classic document view or compatibility logic.
Conclusion
BKPF gives you the document header, BSEG gives you the lines, and ACDOCA gives you everything in one universal journal. Learn the key fields of each, how the header–item join works, and why S/4HANA reporting starts with ACDOCA. The next time a report needs document data, you will know exactly which table to query — and in S/4HANA, the answer is almost always ACDOCA.