BAPI_SALESORDER_GETLIST — BAPI for listing sales orders by selection criteria
BAPI_SALESORDER_GETLIST returns a list of sales order numbers and basic header data that match selection criteria such as sold-to party, sales organization, material, and document date range. It mirrors the VA05 selection screen, not a single-order display. It is read-only, does not require a commit, and does not return item detail or pricing - that needs a follow-up call per order number.
This page covers BAPI_SALESORDER_GETLIST, the read-only BAPI used to retrieve a set of sales order numbers matching header-level selection criteria, equivalent to the VA05 list transaction. It focuses on the parameters that actually drive the selection, why an empty result set is often mistaken for an error, and the truncation and date-format traps that produce incomplete interface output.
Published 16 Sept 2026· 909 words
What it does
BAPI_SALESORDER_GETLIST retrieves a list of sales order document numbers and header-level fields that satisfy given selection criteria. It mirrors the selection screen behind VA05, List of Sales Orders, rather than the detail screen of VA03. It is a pure read: no lock is set on the orders it returns and no order data is changed. It is typically used to build a candidate list of orders for further processing - for example, feeding order numbers into BAPI_SALESORDER_GETDETAIL or BAPI_SALESORDER_GETSTATUS for full item and status data, since GETLIST itself does not return pricing, schedule lines, or item-level detail. It is commonly wired into custom monitoring reports, interface polling jobs, or reconciliation checks between SAP and an external system.
Important parameters
- CUSTOMER_NUMBER - restricts the result to orders for a given sold-to party
- SALES_ORGANIZATION - restricts to a specific sales organization, part of the sales area filter
- MATERIAL - restricts to orders that contain a given material in at least one item
- DOCUMENT_DATE / date range fields - restrict by document creation date, expected in internal SAP date format
- SALES_ORDERS - the export table, one row per matching order with the document number and basic header attributes
- RETURN - the standard return structure or table carrying error, warning, and information messages about the selection itself, distinct from an empty SALES_ORDERS result
Commit behaviour
GETLIST changes nothing, so it has no commit requirement. Calling BAPI_TRANSACTION_COMMIT after it is harmless but pointless. The real risk with commit sequencing is upstream: if a create or change BAPI ran earlier in the same session or in a parallel process without an explicit commit, orders just created or modified may not yet be visible to GETLIST's selection, producing a list that looks stale or incomplete even though the technical call itself succeeded cleanly.
Return handling
The instinct to check RETURN only for message type E and stop there is where interfaces break on this BAPI specifically. An empty SALES_ORDERS table with an empty RETURN is a valid, successful outcome - it means no orders matched the criteria, not that the call failed. The opposite trap is treating a non-empty RETURN as fatal: GETLIST can return warning-level messages, for instance about authorization gaps that silently excluded some sales organizations or document types from the result, without raising an error. A caller that only greps for type E gets a partial list and reports it as the complete one. Any interface built on this BAPI needs to log the full RETURN content regardless of message type, and separately validate that the selection criteria themselves were interpreted as intended - date format and combined AND-logic across fields are the usual source of a technically clean but functionally empty result.
ECC vs S/4HANA
BAPI_SALESORDER_GETLIST is still callable on S/4HANA and behaves the same way functionally, but it is not the preferred building block for new list-oriented interfaces. S/4HANA's CDS-based read access for sales orders, exposed through OData services or released communication scenarios, supports richer filtering and performs better against large order volumes than this classic BAPI's selection logic. For existing custom code it works unchanged; for new development a CDS-based read is generally the better starting point.
Common pitfalls
- Selection fields are combined with AND logic, not OR - passing customer plus material plus date range together often returns nothing because the intent was any-of, not all-of
- A maximum-hits parameter, if left at default or unset, can cap the result set without any error message, so the list looks complete but is truncated
- Date fields must be in internal YYYYMMDD format - passing a display-formatted date silently returns zero rows rather than raising an error
- Authorization restrictions on sales organization or document type reduce the result set with only a warning-level message, which is easy to miss if RETURN is filtered to errors only
- Used as a substitute for a delta or change-pointer extraction mechanism, it has no built-in watermarking, so repeated runs on the same date window reprocess the same orders downstream unless the caller tracks its own high-water mark
Whose problem this is
Functional owns the expected result: which orders should appear for a given customer, sales area, and date range, verified against VA05 with the identical selection. Development owns the call itself - parameter mapping, date format, and correct interpretation of an empty result versus a genuine error. When the count looks wrong, the first evidence needed is the VA05 output for the same criteria, not a debugger trace.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-bapis/bapi-salesorder-getlistERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.