SAP Knowledge Base Article - Public

3653423 - incorrect material substitution in API_SALES_ORDER_SRV during sales order creation

Symptom

  • During Sales Order creation via API, Product ABC automatically switches to alternative DEF.
  • The material passed in the API request is substituted automatically without respecting manual selection logic.
  • This behavior is inconsistent with the UI, where manual selection works as expected with substitution reason C005 (Manual Selection).

Environment

  • Material Determination (Public Cloud)
  • SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Use the API_SALES_ORDER_SRV (OData v2) to create a sales order.
  2. Include Product ABC in the request payload.
  3. Observe that the created order substitutes Product ABC with alternative Product DEF automatically.

Cause

  • In the API channel, the first alternative material in the material determination record is automatically used, and manual selection is not possible.
  • Substitution reason C005 (Manual Selection) applies only to manual entry in the UI, not in the API scenario.

Resolution

  1. As a workaround, set the entered material as the first alternative material in the material determination record. This ensures the substitute material matches the entered value in the API channel.
  2. Note that the entered material number can be any string, even if it does not exist in the material master data, while the alternative material must exist in the material master data.

Keywords

API_SALES_ORDER_SRV, material determination, substitution, alternative material, manual selection, C005, public cloud, OData v2, sales order creation, incorrect substitution, VB13, VB11, VB12, API behavior inconsistency, workaround , KBA , SD-MD-MM-DET-2CL , Material Determination (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions