SAP Knowledge Base Article - Public

3645936 - Simulate Updating Sales Order Fails due to "Stale If-Match“ Error - SAP S/4HANA Cloud Public Edition

Symptom

For the "Simulate Updating Sales Order" API, error occurs "State of entity CDS~A_SALESORDERITEMSIMULATION_2 with key &1 &2 was already changed (stale If-Match)" when using the PATCH method for an existing sales order. When attempting to fetch the Etag via the GET method, error occurs "The method GET is not supported".

Environment

SAP S/4HANA Cloud Public Edition

Cause

Resolution

  1. Use the Sales Order (A2X) API to perform a GET operation and retrieve the x-csrf-token and Etag. This just requires to modify the original URL by removing the "simulation" segment to facilitate the GET operation.
  2. Ensure that the communication scenario SAP_COM_0109 is correctly configured.
  3. If simulating a PATCH operation for an existing sales order, set the If-Match attribute in the request header to "*" instead of using Etag.

See Also

Keywords

simulate updating sales order, stale If-Match error, SAP S/4HANA Cloud Public Edition, sandbox system NL6, GET method not supported, Sales Order Simulation API, SAP_COM_0109, x-csrf-token, PATCH operation, If-Match attribute , KBA , SD-SLS-API-2CL , API (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions