VBAK: Sales Document: Header Data
SDVBAK is the header table for sales documents. Inquiries, quotations, sales orders, contracts and returns are all stored here and told apart by the document category (VBTYP) and the sales document type (AUART). It holds order-level data such as the sold-to party, net value, currency, sales organization and distribution channel.
Primary key
VBELN
plus the client field
Module
SD
Fields in this reference
11
How the VBAK key works
The primary key is MANDT plus VBELN. Sales document numbers are numeric and stored with leading zeros, so apply the ALPHA conversion exit when you take them from user input.
VBAK fields
| Field | Type / data element | Length | Description |
|---|---|---|---|
| πMANDT | CLNT | 3 | Client |
| πVBELN | VBELN | 10 | Sales Document Number |
| ERDAT | DATUM | 8 | Created On |
| ERZET | UZEIT | 6 | Created At |
| ERNAM | UNAME | 12 | Created By |
| AUART | AUART | 4 | Sales Document Type |
| KUNNR | KUNNR | 10 | Sold-to Party |
| NETWR | NETWR | 15 | Net Value |
| WAERK | WAERK | 5 | Currency |
| VKORG | VKORG | 4 | Sales Organization |
| VTWEG | VTWEG | 2 | Distribution Channel |
This is a curated subset of the most commonly used fields, not the complete table definition. A real system contains more fields and can differ by release and customizing, so confirm the definition in transaction SE11 before relying on it.
Example ABAP SELECT for VBAK
" Open SQL applies the client (MANDT) automatically, so it is not part of the WHERE clause. DATA lv_vbeln TYPE vbak-vbeln. SELECT erdat, erzet, ernam FROM vbak WHERE vbeln = @lv_vbeln INTO TABLE @DATA(lt_vbak).
Modern Open SQL with host variables (ABAP 7.40 and later). Need a different field list or conditions? Build it in the ABAP SELECT Builder.
VBAK in SAP S/4HANA
Sales documents are still stored in VBAK and VBAP in SAP S/4HANA, but the status tables VBUK and VBUP were merged into them, so the status fields now live directly on the header and item. Code written for ECC that joins VBUK or VBUP needs to be adjusted.
Tables related to VBAK
Practical tips for VBAK
- VBELN is the only fully selective key. To find the orders of a customer, combine KUNNR with a date range on ERDAT.
- NETWR is stated in the document currency WAERK, so convert before summing across currencies.
- The reliable way from an order to its deliveries and invoices is the document flow table VBFA.
VBAK FAQ
What is the difference between VBAK and VBAP?
VBAK holds one row per sales document (header data) and VBAP one row per item of that document. They are linked by VBELN.
How do I tell an order from a quotation in VBAK?
Use the document category VBTYP together with the sales document type AUART. A sales order has document category C and a quotation has B.
Keep exploring
- SAP Table Field Lookup: search all 28 tables and their fields.
- SAP BAPI Explorer: find the BAPI that creates or changes this data.
- CDS View Generator: expose these tables through a CDS view.
- Creating sales orders with BAPI_SALESORDER_CREATEFROMDAT2