Each time Delivery is created or processed, the Order Delivery Status is updated at Item level.
You will find in this article an overview of Delivery status then a deep technical dive into sales document delivery status with list of important tables and BAPI to retrieve these status for both header and Items .
Table of Contents
SAP Order Delivery Status Overview
If you want to get the big picture of SAP Order ABAP development check this book: ABAP Development for Sales and Distribution in SAP: Exits, BAdIs, and Enhancements
Order Delivery Status in VA02/VA03 Tcode
SAP Order Delivery Status can be checked in VA02/03 transaction.
For header, it can be found in Status Tap and should be will the following:
![Order Delivery Status SAP Order Delivery Status Header](https://sap4tech.net/wp-content/uploads/cwv-webp-images/2015/09/Order_Delivery_Status_Header-e1442825551973.png.webp)
It is the same for Items level. Under the Status tap, check for Delivery Status
![Order Delivery Status Item Order Delivery Status Item](https://sap4tech.net/wp-content/uploads/cwv-webp-images/2015/09/Order_Delivery_Status_Item-e1442825644961.png.webp)
SAP Order Delivery Status Technical
Tables for SAP Order Delivery Status
The main tables for Order Delivery Status are:
- VBUK: Sales Document: Header Status and Administrative Data
- The field is LFSTK
- VBUP: Sales Document: Item Status
- the field is LFSTA
The keys for these tables are VBELN for Header and VBELN/POSNR for Items .
These tables save not only Delivery Status but also ( among others )
- BESTK- Confirmation status
- LFSTK- Delivery status
- LFGSK- Overall delivery status for all items
- WBSTK- Total goods movement status
- FKSAK- Billing status (order-related billing document)
- BUCHK- Posting Status of Billing Document
- ABSTK- Overall rejection status of all document items
- GBSTK- Overall processing status of a document
- KOSTK-Overall picking/putaway status
Difference between LFSTK – Delivery Status and LFGSK – Overall Delivery Status
LFSTK( Delivery Status ) is the header Delivery status of sales document. It indicated if all theitems in this documentare Delivered, partially delivered or not delivered.
Meanwhile,LFGSK( Overall delivery status ) represents the Delivery status ofonly items which should be delivered
List of Values for Order Delivery Status
The Delivery Status can have the following values:
Delivery Status | Description |
---|---|
Not Relevant for delivery | |
A | Not delivered |
B | Partially delivered |
C | Fully delivered |
Customize Delivery Status Value
you can add a custom Delivery Status.
Actually, the list of values is piloted by the table TVBST (SD Documents: Processing Status: Texts).
The key for Delivery Status is:
- For header
- Status table name (TBNAM ) = VBUK
- Field name of the status table (FDNAM) = LFSTK
- For item:
- Status table name ( TBNAM ) = VBUP
- Field name of the status table (FDNAM) = LFSTA
You can manage this value or change the texts associated to a status on the maintain view V_TVBST.
Retrieve Delivery Status
BAPI BAPI_SALESORDER_GETSTATUS
The standard BAPI BAPI_SALESORDER_GETSTATUS (Sales Order: Display Status) retrieves the item’s status of SAP SD Orders. The header Status can be calculated from the items Delivery status
The SD ( Sales and Distribution ) Document Number is the input.
The result of the BAPI gives more information on Item line and Status of Items.
It contains for example:
- DOC_DATE: Document Date (Date Received/Sent)
- PURCH_NO: Customer purchase order number
- PRC_STAT_H: Overall processing status of document
- DLV_STAT_H: Overall delivery status for all items
- REQ_DATE_H: Requested delivery date
- DLV_BLOCK: Delivery block (document header)
- ITM_NUMBER: Sales Document Item
- MATERIAL: Material Number
- DLV_STAT_I: Overall delivery status of the item
- DLV_STAT_I: Overall delivery status of the item
- DELIV_NUMB: Delivery
- DELIV_ITEM: Delivery Item
- DELIV_DATE: Delivery date
- DLV_QTY: Actual quantity delivered (in sales units)