Skip to content
SAP Reference

BSEG

transaction S/4HANA status: Active

Accounting Document Segment

Identity
What the badges mean
S/4HANA status: Active
Active and unchanged in S/4HANA.
S/4HANA status: Deprecated
Still readable today, but no longer SAP's strategic path — plan around it.
S/4HANA status: Replaced
Replaced by a new persistence in S/4HANA; the classic name may still answer reads (see read mechanism).
S/4HANA status: Migrating to IBP
Planning scope is moving from APO toward IBP.
S/4HANA status: Active (StRM) · Replaced (EWM)
Path-dependent: active with SAP Stock Room Management, replaced where EWM is the warehouse path.
S/4HANA status: Replaced · Compat View
Compatibility view: the classic table name is redirected to a view over the new persistence — see how the physical model moved.
S/4HANA status: Active · Proxy View
Proxy view: reads route through NSDM proxy/CDS views — see how the physical model moved.
master
Data class: what the table holds — master data, transaction documents, org structure, config, or texts (one row per language — see the quirks guide).
Linked type codes

CLNT the client key; filter it explicitly and carry it through every join.

NUMC fixed-width numeric text; keep it a string and keep the leading zeros.

DATS, TIMS character date (YYYYMMDD) and time (HHMMSS), zero-filled when initial.

CURR, CUKY, QUAN, UNIT amounts and quantities, meaningful only beside the currency key or unit that qualifies them.

LANG a language key in a text table — one row per language.

In field listings, K marks a primary-key field, and linked type codes in the Type column jump to the matching quirks-guide section.

Fields

10 fields · 5 key

The join key is all 5 key fields together — matching on any single one fans out. See composite keys in the quirks guide.

10 fields.

Table fields: key flag, field name, description, data type (linked to the data quirks guide where the type carries a known trap), length, and check-table references. 10 fields.
KeyFieldDescriptionTypeLengthReferences
Primary keyMANDTClientCLNT3
Primary keyBUKRSCompany CodeCHAR4T001
Primary keyBELNRAccounting Document NumberCHAR10
Primary keyGJAHRFiscal YearNUMC4
Primary keyBUZEINumber of Line Item Within Accounting DocumentNUMC3
BSCHLPosting KeyCHAR2
KOARTAccount TypeCHAR1
HKONTGeneral Ledger AccountCHAR10SKA1
DMBTRAmount in Local CurrencyCURR13,2
WRBTRAmount in Document CurrencyCURR13,2

Linked type codes in the Type column jump to the matching section of the SAP data quirks guide.

Field provenance: hand-curated.

Boilerplate SQL

Starting point for reading BSEG on Databricks. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.

Query parameters

5 parameters not filled: <catalog>, <schema>, <MANDT>, <BUKRS>, <GJAHR>

-- ============================================================
-- Table  : BSEG Accounting Document Segment
-- Purpose: Column-selected read of BSEG — auto-generated from field metadata
-- Grain  : One row per BUKRS + BELNR + GJAHR + BUZEI
-- Notes  : Auto-generated skeleton. For multi-table transaction query patterns, see the linked t-codes on this page. Set catalog/schema to your Unity Catalog location; fill remaining placeholders (<...>) for your tenant.
-- ============================================================
SELECT
  l.MANDT AS "Client",
  l.BUKRS AS "Company Code",
  l.BELNR AS "Accounting Document Number",
  l.GJAHR AS "Fiscal Year",
  l.BUZEI AS "Number of Line Item Within Accounting Document",
  l.BSCHL AS "Posting Key",
  l.KOART AS "Account Type",
  l.HKONT AS "General Ledger Account",
  l.DMBTR AS "Amount in Local Currency",
  l.WRBTR AS "Amount in Document Currency"
FROM <catalog>.<schema>.bseg l
WHERE
  l.MANDT = '<MANDT>'
  -- AND l.BUKRS = '<BUKRS>'
  -- AND l.GJAHR = <GJAHR>
ORDER BY l.BUKRS;

Verified August 2026

More query patterns: F-28 F-53 FB01

Released CDS views over this table

Released SAP standard VDM views that read over BSEG. Prefer these over classic-table reads on S/4HANA where available.

Relationships

Diagram of 1-hop neighbors — join details below.

Join details

  • BKPFBSEGheader item · 1:N
    ON bkpf.BELNR = bseg.BELNR

Transaction Codes That Use This Table

More Financial Accounting tables