BAPI_SALESORDER_GETSTATUS — BAPI_SALESORDER_GETSTATUS: reading sales order status
BAPI_SALESORDER_GETSTATUS returns the overall and item-level processing status of a sales order, mirroring the status overview shown on the order in VA03 or VA02: delivery status, billing status, rejection status and credit status. It is a read-only call, does not create or change data, and needs no commit. The RETURN table must still be checked because a valid order number can come back with no status data if the item selection is wrong.
This page covers BAPI_SALESORDER_GETSTATUS, the read-only BAPI that reports header and item status for a sales order, equivalent to the status tab in the order transaction. It focuses on what the parameters actually carry, why the RETURN table is often misread as empty when it is not, and the integration mistakes that follow from treating this call like a full order read.
Published 16 Sept 2026· 1,004 words
What it does
BAPI_SALESORDER_GETSTATUS acts on an existing sales order (VBAK/VBAP) and returns the same status information a user sees on the status overview tab of VA02 or VA03: overall delivery status, overall billing status, rejection status, and where relevant credit and rejection flags at item level. It does not return pricing, partners, schedule lines or texts, and it makes no change to the order. It is typically called from an interface or monitoring job that needs to know whether an order still requires delivery or billing processing, without pulling the full order detail through BAPI_SALESORDER_GETDETAIL. Because it is read-only, it carries none of the update-task risk associated with the create and change BAPIs in the same family.
Important parameters
- SALESDOCUMENT - the sales order number being queried, required, ten characters padded with leading zeros the same way the order lives in VBAK.
- ORDER_HEADER_STATUS - export structure carrying the header-level overall status, including delivery and billing completion at header level.
- ORDER_ITEMS_STATUS - export table carrying item-level status, one row per item with its own delivery, billing and rejection indicators.
- RETURN - standard BAPI return table; empty does not always mean success if the item table is also empty, which is the trap covered below.
Commit behaviour
The BAPI performs no database update at all, so there is nothing to commit. It is a pure select against the order tables and returns whatever status is currently persisted. Calling BAPI_TRANSACTION_COMMIT after it has no effect and is unnecessary, though harmless if a generic wrapper always calls it. The only sequencing issue that matters is timing relative to another process: if a delivery or billing document was just created in the same logical unit of work and not yet committed, the status read may still reflect the pre-update state, which looks like a stale-status bug but is actually a commit-ordering issue in the calling program, not in this BAPI.
Return handling
RETURN on this BAPI is often nearly empty on a technically successful call, which is exactly what makes it dangerous to skip. A wrong or non-existent order number typically comes back with a single error-type message and empty status tables, which is the case interfaces usually handle correctly. The case they miss is a valid order number where the item status table comes back empty because the order has no relevant items for the selection criteria implied by the order type, or because authorization restricts visibility of certain items. In that situation RETURN may carry only a warning, or nothing at all, and a caller that only checks for TYPE equal to E will treat the call as fully successful and report the order as having no open status, which is not the same as having a completed status. Any consuming program needs to distinguish an empty ORDER_ITEMS_STATUS caused by a genuine error from one caused by a legitimate absence of items, and should log the message text even for W and I type entries rather than discarding everything below E.
ECC vs S/4HANA
BAPI_SALESORDER_GETSTATUS still works unchanged on S/4HANA and remains a reasonable choice for a simple status check, since it is lighter than pulling the full order through GETDETAIL or GETLIST just to inspect delivery and billing flags. New integrations built for S/4HANA more often go through the released OData or API Business Hub services for sales order read access, which expose status alongside the rest of the order in one call and fit better with Fiori-based monitoring, but there is no announced replacement or deprecation of this BAPI specifically for status-only reads.
Common pitfalls
- Interfaces polling this BAPI in a tight loop against a large order volume, when a change pointer or output-based trigger on the status change would produce the same result with far less load.
- Treating a delivery status of not-yet-delivered as a hard block, without checking whether the item is a text item, a value item, or otherwise not relevant for delivery, which never carries a delivery status at all.
- Comparing status codes returned here directly against hardcoded single-character values without accounting for the fact that partial and fully processed states use different codes at header versus item level.
- Calling this BAPI immediately after a create or change BAPI in the same program without an intervening commit, and getting the pre-change status back.
- Assuming rejection status at item level rolls up cleanly to header level for split-item orders with mixed rejection reasons; the header field summarizes but does not explain which items are rejected.
Whose problem this is
A wrong or missing status is almost always functional: order type customizing, item category, or a completion rule that never sets the flag the interface expects. Development involvement is warranted only when RETURN is being misread, when the call is timed wrong relative to a commit in the same transaction, or when volume from repeated polling is the actual complaint. Functional teams should bring the order number and the exact status field expected versus returned.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-bapis/bapi-salesorder-getstatusERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.