Symptom
- Need an API to perform mass Unplanned Goods Issue.
- Typical business requirements include uploading the following information: Plant, Storage Location, Warehouse, Storage Bin, Handling Unit, Product, Batch, Quantity, Base Unit of Measure, Stock Type, Additional Text.
- When attempted to use API_MATERIAL_DOCUMENT_SRV to execute the goods movement, one or more of the following issues are faced:
• The API does not provide input fields for Storage Bin, Handling Unit, or Additional Text.
• Error message: "You can't perform this action, synchronous goods movement is not active."
• Error message: "Insufficient stock of product &1 in bin &2."
• Error message: "Could not determine EWM stock data for: Availability Group &1."
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Attempt to post Unplanned Goods Issue in mass via API_MATERIAL_DOCUMENT_SRV using a payload that includes Storage Bin, Handling Unit, and Additional Text.
- Notice these EWM-specific attributes are not available as input fields in the API model.
- In some calls, observe the error message: "You can't perform this action, synchronous goods movement is not active."
Cause
- API_MATERIAL_DOCUMENT_SRV is designed for Inventory Management and does not expose several EWM-specific attributes required for Warehouse-level processing, including: Storage Bin, Handling Unit and Additional Text.
- Currently, the Warehouse Document Business Object is not released as a public API in SAP S/4HANA Cloud Public Edition.
- For Unplanned Goods Issue scenarios, the API therefore cannot provide a complete end-to-end EWM process.
- Movement types 551 and 555 remain subject to the standard EWM stock determination logic:
• Movement type 551 determines unrestricted-use stock only.
• Movement type 555 determines blocked stock only. - Depending on the available EWM stock type, stock determination may fail with messages such as:
• "Insufficient stock of product..."
• "Could not determine EWM stock data..."
These are expected standard system behavior and are not caused by missing fields in the payload, nor do they indicate a product defect.
Additional Text entered during Scrap or Consume postings is stored in the Warehouse Goods Movement document and is not persisted in the physical stock data model (I_EWM_PhysStockProd).
Resolution
- This API supports warehouse-specific information, including Storage Bin, Handling Unit, Product, Batch, Quantity, and Stock Type.
- If Additional Text is required, execute the Scrap or Consume operation using the A2X API and retrieve the text afterwards through CDS view I_EWM_WhseDocumentItem.
- If API_MATERIAL_DOCUMENT_SRV must be used together with EWM, include the field CtrlPostgForExtWhseMgmtSyst in the payload with one of the following values:
- Value 1 – Create a delivery document instead of a material document.
- Value 2 – Execute the stock change in SAP S/4HANA.
- Value 3 – Post the goods movement synchronously to EWM.
- Setting this field resolves the message "You can't perform this action, synchronous goods movement is not active." However, it does not bypass the standard EWM stock determination logic.
- For customer-specific business requirements, such as CSV upload processing, additional validations, or orchestration of multiple warehouse operations, implement a custom RAP Business Object (wrapper) together with custom ABAP classes that consume the standard Warehouse Physical Stock by Product – Read/Update (A2X) API.
See Also
- KBA 3662257 - Post unplanned goods issue denied due to deficit of stock for scrapping in sap s/4hana cloud public edition
- KBA 2963059 - How to Submit Feature Requests for SAP S/4HANA Cloud Public Edition - SAP for Me
- KBA 3669552 - The delivery document number is not returned when posting goods movements using API API_MATERIAL_DOCUMENT_SRV
Keywords
unplanned goods issue, mass upload, csv, api_material_document_srv, warehouse physical stock by product, a2x, storage bin, handling unit, additional text, ewm, synchronous goods movement not active, ctrlpostgforextwhsemgmtsyst, i_ewm_whsedocumentitem, stock type, batch, You can't perform this action, synchronous goods movement is not active, you can't perform this action, synchronous goods movement is not active , KBA , SCM-EWM-API-2CL , Remote APIs (Public Cloud) , Problem
Product
SAP S/4HANA Cloud Public Edition all versions
SAP Knowledge Base Article - Public