SAP Knowledge Base Article - Public

3625793 - How to apply batch FEFO logic for internal warehouse tasks using APIs in SAP S/4HANA Cloud Public Edition

Symptom

  • Internal warehouse tasks created via API do not automatically apply batch splitting based on FEFO (First Expired, First Out) logic when the required quantity exceeds the available stock in the earliest expiry batch.
  • The system proposes the nearest expiry batch but does not split the quantity across multiple batches, resulting in negative stock.

Environment

SAP S/4HANA Cloud Public Edition

Resolution

  1. Configure the source storage type with the stock removal rule set to FEFO and that is set as  set to "Don't Allow negative stock" in the "Maintain Storage Types" configuration.
  2. Attempt to create a warehouse task using the Warehouse Order and Task (A2X) API with a quantity that exceeds the available stock in the earliest expiry batch.

The system will propose the nearest expiry batch and split the quantity across multiple batches.

See Also

Keywords

batch FEFO, warehouse task, SAP S/4HANA Cloud, API, internal movement, stock removal rule, negative stock, batch split, Warehouse Available Stock, Warehouse Order and Task, A2X API, FEFO logic, stock determination, SAP Public Cloud. , KBA , SCM-EWM-API-2CL , Remote APIs (Public Cloud) , SCM-EWM-WOP-2CL , Warehouse Order Processing (Public Cloud) , How To

Product

SAP S/4HANA Cloud Public Edition all versions