The B040 table in SAP ERP or S/4HANA stores Document Type/Document Status data. There are total 6 fields in B040 table. The Document Type/Document Status table is available in all major SAP S/4HANA versions, is implemented as a Column Store table within the SAP HANA database. Additionally we provide an overview of the structure and fields of B040 table. It is in Application development output control (VN) ABAP package and is part of the Output Determination (SD-BF-OC) module.
SAP B040 Table Fields
Following is the list of fields that are available in SAP B040 table. The primary key fields of the table are MANDT (Client), KAPPL (Application), KSCHL (Output Type), DOKAR (Document Type), DOKST (Document Status).
| Field | Description | Data Element | Check Table | Data Type |
|---|---|---|---|---|
| MANDT | Client | MANDT | T000 | CLNT (3) |
| KAPPL | Application | KAPPL | T681A | CHAR (2) |
| KSCHL | Output Type | NA_KSCHL | T685 | CHAR (4) |
| DOKAR | Document Type | DOKAR | TDWA | CHAR (3) |
| DOKST | Document Status | DOKST | TDWS | CHAR (2) |
| KNUMH | Number of output condition record | NNUMH | CHAR (10) |


