Skip to content

Dataset

SAP ERP table extract datasets for AI training

An SAP dataset is a set of table extracts from one company's SAP ERP system, ECC or S/4HANA: BKPF accounting document headers with BSEG or ACDOCA line items, EKKO and EKPO purchasing documents, VBAK and VBAP sales documents with VBFA document flow, MATDOC material movements, the LFA1 and KNA1 masters and CDHDR change documents. SourceX sources it to a buyer's spec from established businesses that run SAP, with the tables needed to decode it. Each dataset is de-identified and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
Table extracts from one SAP client: accounting, purchasing and sales documents, material movements, vendor, customer and material masters, change documents and decode tables
Typical systems
SAP S/4HANA or SAP ERP Central Component (ECC), covering FI, CO, MM and SD; HR and payroll tables out of scope
Typical history
Specified by the buyer; whole fiscal years per company code, within what data archiving has left
Modality
Structured table rows under SAP technical field names, with short header and item texts
Delivery formats
Agreed per order; CSV or Parquet per table, keyed as in SAP, with dictionary, text and configuration tables
Preparation
Vendor, customer, employee and user IDs pseudonymized, one key across tables; names, addresses, tax numbers and bank tables removed; text fields scrubbed
Licensing
Permitted use agreed per license; scoped by client, company code, table and fiscal year
Availability
Sourced to your spec from companies that run SAP; supply is not guaranteed
Structured recordsIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
document_keystringClient, company code, document number and fiscal year (MANDT, BUKRS, BELNR, GJAHR) from BKPF, remapped the same way in every table.
system_generationstringWhether the fiscal year was posted in ECC (BKPF and BSEG) or in S/4HANA (ACDOCA).
headerobjectBKPF columns: BLART document type, BLDAT, BUDAT, WAERS, TCODE, USNAM, XBLNR, STBLG, and AWTYP with AWKEY naming the origin document.
line_itemsarrayBSEG rows: BUZEI, BSCHL posting key, KOART account type, SHKZG debit or credit indicator, DMBTR, HKONT, MWSKZ, SGTXT, and AUGBL with AUGDT once cleared.
journal_linesarrayACDOCA rows in S/4HANA: RLDNR ledger, DOCLN, RACCT, signed HSL and WSL amounts, DRCRK, RCNTR and PRCTR.
purchasing_refobjectEKKO header and EKPO item behind EBELN and EBELP: BSART, MATKL, MENGE, MEINS and NETPR.
sales_flowarrayVBFA rows for VBAK and VBAP sales documents: VBELV and POSNV, VBELN and POSNN, the category of each and RFMNG.
material_movementsarrayMATDOC rows, or MKPF and MSEG in ECC: BWART movement type, MATNR, WERKS and MENGE.
master_refsobjectPseudonymized LIFNR and KUNNR keys into LFA1 and KNA1, with kept attributes such as KTOKK account group and LAND1 country.
change_documentsarrayCDHDR headers (OBJECTCLAS, OBJECTID, UDATE, TCODE) with CDPOS items: TABNAME, TABKEY, FNAME, CHNGIND, VALUE_OLD and VALUE_NEW.
custom_fieldsobjectThe company's Z and ZZ fields on standard tables, each with its DD03L and DD04T dictionary definition.
decodeobjectTexts for coded values from the delivered T001, T003T, TBSLT, SKAT and MAKT tables.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "document_key": "100-1000-5100004471-2024",
  "system_generation": "S/4HANA",
  "header": {
    "BUKRS": "1000",
    "BELNR": "5100004471",
    "GJAHR": "2024",
    "BLART": "RE",
    "BLDAT": "20240912",
    "BUDAT": "20240917",
    "WAERS": "USD",
    "TCODE": "MIRO",
    "USNAM": "usr_0412",
    "XBLNR": "ref_77f1",
    "AWTYP": "RMRP",
    "AWKEY": "51056001872024"
  },
  "line_items": [
    {
      "BUZEI": "001",
      "BSCHL": "31",
      "KOART": "K",
      "SHKZG": "H",
      "DMBTR": 4860.0,
      "LIFNR": "ven_19c4",
      "HKONT": "0000211000",
      "AUGBL": "1500002210",
      "AUGDT": "20241015"
    },
    {
      "BUZEI": "002",
      "BSCHL": "86",
      "KOART": "S",
      "SHKZG": "S",
      "DMBTR": 4500.0,
      "HKONT": "0000191100",
      "EBELN": "4500017733",
      "EBELP": "00010"
    },
    {
      "BUZEI": "003",
      "BSCHL": "40",
      "KOART": "S",
      "SHKZG": "S",
      "DMBTR": 360.0,
      "HKONT": "0000154000",
      "MWSKZ": "I1"
    }
  ],
  "journal_lines": [
    {
      "RLDNR": "0L",
      "DOCLN": "000001",
      "RACCT": "0000211000",
      "HSL": -4860.0,
      "DRCRK": "H"
    }
  ],
  "purchasing_ref": {
    "EBELN": "4500017733",
    "BSART": "NB",
    "EBELP": "00010",
    "MATKL": "M0420",
    "MENGE": 300,
    "MEINS": "ST",
    "NETPR": 15.0
  },
  "change_documents": [
    {
      "OBJECTCLAS": "EINKBELEG",
      "OBJECTID": "4500017733",
      "TCODE": "ME22N",
      "UDATE": "20240829",
      "TABNAME": "EKPO",
      "TABKEY": "100450001773300010",
      "FNAME": "NETPR",
      "CHNGIND": "U",
      "VALUE_OLD": "14.50",
      "VALUE_NEW": "15.00"
    }
  ],
  "decode": {
    "BLART": "Invoice - Gross",
    "MEINS": "PC"
  }
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Trace a posting to its source

AWTYP and AWKEY lead from a ledger line to the billing, material or invoice document behind it.

Invoice matching and clearing

Order items, goods receipts, invoice lines and AUGBL clearing entries are worked cases of three-way match.

Learning from change documents

CDPOS old and new values show which prices, dates and blocks people change after entry.

Agents on a configured system

Document types and Z fields that mean something in one company only test whether an agent reads configuration.

Queries over SAP tables

Real tables under technical names, with their text tables, ground text-to-SQL evaluations.

Use-case guides: Finance and accounting agents, Enterprise and computer-use agents, Private evaluation sets

What makes this data valuable

Generation stated per year

Each fiscal year is labeled ECC or S/4HANA, with the conversion date where there was one.

Documents balance

With SHKZG applied, every document sums to zero, per ledger in ACDOCA.

Change keys remapped

Document numbers inside CDPOS TABKEY and CDHDR OBJECTID match the remapped numbers elsewhere.

Codes resolve

Every document type, posting key and movement type has a text table entry in one language.

Custom fields defined

Z fields and Z tables arrive with dictionary labels and domain value lists.

Archived ranges declared

Years thinned by data archiving are named, not left as gaps.

System export

SAP dataset

This page covers SAP ERP table extracts.Illustrative

BKPF and BSEG in ECC, the ACDOCA universal journal in S/4HANA

In ECC an accounting document is a BKPF header, keyed by client, company code (BUKRS), document number (BELNR) and fiscal year (GJAHR), with BSEG line items numbered by BUZEI. Each item has a posting key (BSCHL), an account type (KOART, such as K for a vendor line) and an unsigned amount whose direction is in SHKZG, where S is Soll, a debit, and H is Haben, a credit. BSEG is typically a cluster table there, which the database cannot join directly, so SAP also maintains index tables of open and cleared items, such as BSIK and BSAK for vendors, and totals tables, while controlling keeps its own line items in COEP. An ECC extract therefore delivers finance and cost accounting as separate sets to reconcile.

S/4HANA writes the same posting once to ACDOCA, the universal journal. One line carries the G/L account, cost center and profit center, with signed amounts such as HSL in company code currency. The old index and totals tables survive only as compatibility views computed from it. BSEG is still written for the entry view, but ACDOCA holds lines BSEG never sees, such as controlling postings, and it holds one set of lines per ledger in RLDNR, so a sum without a ledger filter multiplies amounts. Its line number, DOCLN, is not the BSEG item number.

Links run through reference fields. The header's AWTYP and AWKEY name the object that caused the posting: VBRK for a billing document, MKPF for a material document, RMRP for a logistics invoice. In sales, VBFA holds one row per pair of preceding and subsequent items, with a category code for each side in VBTYP_V and VBTYP_N, such as C for an order, J for a delivery and M for an invoice. Some history is overwritten. Clearing writes the clearing document (AUGBL) and date (AUGDT) into the original open items, and order tables such as EKPO and VBAP hold current values only. Amounts and accounts on a posted document cannot be edited, so a correction is a reversal, linked by STBLG.

Change documents, the client key and codes that need text tables

SAP logs field changes to master data and documents as change documents. CDHDR is the header: an object class (EINKBELEG for purchasing documents, KRED for vendors, DEBI for customers), the object ID, user, date and transaction code. CDPOS holds one row per changed field: TABNAME, FNAME, a change indicator, such as U for an update or I for an insert, and VALUE_OLD and VALUE_NEW as character strings. Its TABKEY is the changed row's key concatenated into one string, client first. A pipeline that remaps EBELN in EKKO but not inside TABKEY and OBJECTID cuts every join to the change history.

Almost every application table starts with the client, MANDT (RCLNT in ACDOCA), and one system can hold several clients, so an extract must come from one. Field names abbreviate German: BUKRS is Buchungskreis, GJAHR is Geschäftsjahr. Values are codes: document type RE, posting key 31, movement type 101, unit ST, which English screens typically show as PC. The meanings sit in text tables keyed by language (SPRAS), such as T003T for document types, TBSLT for posting keys and SKAT for G/L account names, and field labels sit in the dictionary tables DD03L and DD04T. Dates are eight-character strings, with 00000000 for an empty date.

What arrives depends on the route. A table browser download returns what the user's authorizations allow, formatted as the screen shows it, so a negative amount can carry its minus sign at the end. Extractors deliver pre-joined structures and S/4HANA CDS views rename fields, so BUKRS becomes CompanyCode, and neither is the stored rows. Data archiving moves old documents out of the database, so early years can be thin. To test a sample, apply SHKZG and check that each document sums to zero, resolve every BLART, BSCHL and BWART against the delivered text tables, join CDPOS rows to EKPO through TABKEY after pseudonymization, and count documents per fiscal year.

What to check before licensing

  • Have the buyer, the data owner and counsel review the SAP license agreement on extracting data to a third party, including any indirect or digital access terms, and confirm the route used is allowed.
  • Confirm on the table list that HR and payroll tables and the LFBK and KNBK bank detail tables are excluded, along with their old and new values in CDPOS, and ask how one-time account names were handled.
  • Check that customer, vendor and employee identifiers typed into SGTXT, BKTXT, XBLNR and ZUONR are scrubbed, and ask how employees held as vendors in LFA1 were treated.
  • Ask which system generation each fiscal year was posted in, which ledgers the ACDOCA rows cover, and whether BSEG was extracted too.
  • Verify on a sample that CDPOS rows join to their documents after pseudonymization, and ask which change document object classes are included.
  • Require the text and configuration tables for every coded field, in one stated language, plus dictionary definitions of all Z fields and tables.
  • Ask how each table was extracted, under which authorizations and from which client, and which years data archiving had removed.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

Does it matter whether an SAP dataset comes from ECC or S/4HANA?

Yes, because the finance tables differ. ECC stores accounting documents as BKPF headers and BSEG items, with separate index, totals and controlling tables. S/4HANA writes each posting to the ACDOCA universal journal, once per ledger, with cost and profit center on the line. A converted system holds both shapes, so ask which generation each fiscal year came from.

Can a model read SAP field names and codes without SAP knowledge?

Not without the lookup tables. Field names abbreviate German terms, such as BUKRS for company code and BELNR for document number, and values are codes such as document type RE or movement type 101. The delivery should include dictionary labels and text tables for each coded field in one language, including the company's own Z document types.

Does an SAP dataset include the history of changes?

Yes, where SAP wrote change documents. CDHDR records who changed which object, when and through which transaction, and CDPOS records the table, field, old value and new value. Only fields flagged for change documents are logged, and posted accounting amounts cannot be changed, only reversed. Check that document numbers inside the CDPOS key were remapped.

How are orders, deliveries, invoices and ledger postings linked?

Through document flow and reference keys. VBFA holds one row per pair of preceding and subsequent sales document items, with the category of each and the quantity carried. An accounting document header names its origin in AWTYP and AWKEY, such as a billing or material document. These joins need document numbers pseudonymized the same way in every table.

Are HR, payroll and bank details part of an SAP dataset?

No, a finance and logistics extract should leave them out, and the delivered table list is where to confirm it. Personnel infotype tables, payroll results and the LFBK and KNBK bank detail tables should be absent. Personal data can still appear elsewhere: employees reimbursed as vendors sit in the vendor master, one-time vendor names are stored beside the line item, and clerks type names into item text. Ask how each was handled.

Is SourceX affiliated with SAP?

SAP ERP is named to identify the system the records come from. That does not imply a partnership with or endorsement by SAP. The records belong to the business that runs SAP ERP, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 26 November 2026. Own data like this? See how companies license it to AI developers.

See if your company qualifies