SAP BAPIObjectBAPI_SALESORDER_SIMULATEModuleSD_O2C

BAPI_SALESORDER_SIMULATE — Sales Order Simulation BAPI

BAPI_SALESORDER_SIMULATE runs the same pricing, availability check and credit check logic that VA01 executes when an order is entered, but never writes anything to the database. It returns the pricing conditions, schedule lines and messages a real order would generate, which makes it the standard call for quote-style price and availability previews from external channels.

This page covers what BAPI_SALESORDER_SIMULATE actually returns versus what it guarantees, the input and output structures a caller needs to populate and read, and why a clean simulate result does not promise the same outcome when the order is actually created a few seconds later. It also covers who owns a mismatch between simulated and real order behaviour.

Published 16 Sept 2026· 1,084 words

What it does

BAPI_SALESORDER_SIMULATE acts on the sales order object without creating one. It mirrors the processing that VA01 performs internally when it derives item categories, runs pricing, checks availability and evaluates the credit exposure of a proposed order, but it stops before the document is saved. Nothing is written to VBAK, VBAP or VBEP, no stock is reserved, and no credit limit is consumed. It is used wherever a caller needs to show a customer what an order would cost and when it would ship before that customer commits to placing it: web storefronts, quoting tools, CPQ front-ends, EDI pre-validation layers. Functionally it is the read-only sibling of BAPI_SALESORDER_CREATEFROMDAT2, sharing most of the same input structures so that a simulate call and a create call can be built from the same data assembly code.

Important parameters

The interface reuses most of the structures also used by the create BAPI, since both drive the same internal order processing.

  • ORDER_HEADER_IN - sales document type, sales organisation, distribution channel, division, document currency, requested delivery date, purchase order reference
  • ORDER_ITEMS_IN - material number, order quantity, unit of measure, item category override if forced
  • ORDER_PARTNERS - sold-to, ship-to and other relevant partner functions feeding pricing and shipping point determination
  • ORDER_SCHEDULES_IN - requested delivery date and quantity per item, used to drive the availability check simulation
  • ORDER_CONDITIONS_IN - manual pricing conditions passed in to override or supplement condition record pricing
  • RETURN - the message table carrying every informational, warning and error message the simulation produced
  • ORDER_ITEMS_OUT / ORDER_CONDITIONS_OUT / ORDER_SCHEDULES_OUT - the simulated result: net price, condition breakdown, confirmed quantities and dates that would apply if the order were actually saved

Commit behaviour

Nothing is committed and nothing needs to be, because the BAPI never stages a document for the update task. Calling BAPI_TRANSACTION_COMMIT afterwards is harmless but pointless, since there is no pending change to flush. The risk is not a missing commit, it is a caller who expects a document number back and finds the relevant output field blank, then either throws an unhandled exception or, worse, silently defaults to a fake or previous order number, which then corrupts logging or reconciliation downstream. Any interface built against this BAPI should be written on the explicit assumption that it never persists anything, not on the assumption that a commit step is simply missing from the call sequence.

Return handling

RETURN mixes message types in one flat table and the simulation deliberately surfaces messages that in a real create call would be hard stops, alongside messages that are only advisory. A caller who treats an empty RETURN table as the only success criterion misses warnings such as a delivery date being pushed out or a pricing condition failing to find a record, both of which change the commercial result shown to the customer even though they are type W, not E. Conversely, a caller who aborts on any non-empty RETURN table will fail on routine informational messages that carry no real problem. The correct pattern is to inspect TYPE together with the message ID and number for every line, and to treat credit-block and incompleteness messages as decision points rather than blanket failures, since the point of simulate mode is precisely to surface those conditions before the customer is told the order can go ahead. A frequent interface bug is discarding RETURN entirely and relying only on populated output tables as proof the simulation succeeded, which hides exactly the messages the caller was supposed to act on.

ECC vs S/4HANA

BAPI_SALESORDER_SIMULATE remains a valid function-module-based BAPI on S/4HANA and no released successor API specifically replaces the simulate-only use case. Some individual pieces it touches, such as availability checking, have modern equivalents through advanced ATP, but a caller wanting a single combined pricing, availability and credit preview still routes through this BAPI or through direct calls into the same core order-processing logic. There is no deprecation notice against it and no indication a Fiori-era API is intended to take over this specific function.

Common pitfalls

Most production issues with this BAPI come from treating a clean simulation as a guarantee rather than a snapshot at a point in time.

  • Simulated pricing can differ from the pricing applied at real order creation if condition records change or a pricing run executes in between, particularly with time-sensitive promotions
  • Simulated availability is not reserved stock, so two parallel simulate calls can both show the same quantity as available and the second real create call then finds insufficient stock
  • Simulated credit exposure does not lock the credit limit, so a customer near their limit can pass simulation and then be blocked on the actual create a moment later if another order posted in between
  • Incomplete or missing partner data causes silent substitution of default partner determination, producing pricing conditions that do not match what the real customer-specific agreement would give
  • User exits and pricing routines that check for an already-saved document, or that read from tables only populated after save, can behave differently in simulation than in a real create, so a simulate result is not a perfect preview of custom logic

Whose problem this is

A mismatch between what simulation shows and what the real order does is primarily a functional configuration question: pricing procedure, condition record validity, availability check group, credit management settings. Development gets involved when the input structures are populated incorrectly or when RETURN is being read incompletely. Functional needs to reproduce the exact same input combination manually in VA01 to prove the discrepancy is not simulation-specific; development needs to provide the full input structures and the complete RETURN table dump from the failing call.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-bapis/bapi-salesorder-simulateERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.