BKPF: Accounting Document Header
FIBKPF is the header table of FI accounting documents. Each row holds the company code, document number, fiscal year, document type, document and posting dates, currency, user and reference of one posted document. The individual lines are stored in BSEG in ECC and in the Universal Journal in S/4HANA.
Primary key
BUKRS + BELNR + GJAHR
plus the client field
Module
FI
Fields in this reference
10
How the BKPF key works
The primary key is MANDT, BUKRS, BELNR and GJAHR. The document number BELNR is only unique within a company code and fiscal year, so always filter on all three fields to identify one document.
BKPF fields
| Field | Type / data element | Length | Description |
|---|---|---|---|
| πMANDT | CLNT | 3 | Client |
| πBUKRS | BUKRS | 4 | Company Code |
| πBELNR | BELNR | 10 | Document Number |
| πGJAHR | GJAHR | 4 | Fiscal Year |
| BLART | BLART | 2 | Document Type |
| BLDAT | DATUM | 8 | Document Date |
| BUDAT | DATUM | 8 | Posting Date |
| WAERS | WAERS | 5 | Currency Key |
| USNAM | UNAME | 12 | User Name |
| XBLNR | XBLNR | 16 | Reference Document Number |
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 BKPF
" Open SQL applies the client (MANDT) automatically, so it is not part of the WHERE clause.
DATA lv_bukrs TYPE bkpf-bukrs.
DATA lv_belnr TYPE bkpf-belnr.
DATA lv_gjahr TYPE bkpf-gjahr.
SELECT blart, bldat, budat
FROM bkpf
WHERE bukrs = @lv_bukrs
AND belnr = @lv_belnr
AND gjahr = @lv_gjahr
INTO TABLE @DATA(lt_bkpf).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.
BKPF in SAP S/4HANA
In SAP S/4HANA the Universal Journal table ACDOCA is the primary source for line items, while BKPF remains the document header.
Tables related to BKPF
- BSEG (joined on BUKRS + BELNR + GJAHR): Line items of the document.
- T001 (joined on BUKRS): Company code master data.
Practical tips for BKPF
- BUDAT (posting date) determines the posting period, while BLDAT is the date on the original document. Use BUDAT for period-based reports.
- XBLNR often holds an external reference such as the vendor invoice number, which makes it useful for finding a document.
- To find the FI document created by a logistics document, use the reference fields AWTYP (reference procedure) and AWKEY (reference key) of BKPF.
BKPF FAQ
Is BELNR unique in BKPF?
No. It is unique only together with the company code (BUKRS) and the fiscal year (GJAHR). The same document number can exist in another company code or year.
Where are the line items of an FI document?
In BSEG, joined on BUKRS, BELNR and GJAHR. In SAP S/4HANA, read the Universal Journal table ACDOCA instead.
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.