Symptom
consume warehouse stock api error: invalid property
Error message: "Property 'EWMAccountAssignmentCategory' is invalid"
Error code: "/IWCOR/CX_OD_EP_PROPERTY_ERROR/005056A509B11ED1BF822D2D09171A04"
Environment
-
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Activate the warehouse stock API and follow the documentation from the provided link.
- Execute the post call to the URL: https://my414223-api.s4hana.cloud.sap/sap/opu/odata4/sap/api_whse_physstockprod/srvd_a2x/sap/whsephysicalstockproducts/0001/WarehousePhysicalStockProducts?(ParentHandlingUnitUUID='fa163e6b-2121-1fd0-94b6-50cdea24d3c0',StockItemUUID='fa163e6b-2121-1fd0-94b6-50cdea24f3c0')/SAP__self.ConsumeStockWith
- Use the following body in the post call:
{
"EWMAccountAssignmentCategory": "11",
"WarehouseMovementsText": "TESTMK",
"WarehouseMovementsReason": "SRRS",
"EWMAccountAssignmentObject": "1000679",
"EWMGoodsMovementEntryUnit": "KG",
"EWMGoodsMovementEntryQuantity": 1375,
"_PhysStockProdSerialNumber": []
}
- Observe the error message indicating invalid properties.
Cause
The issue occurs because the batch request is mandatory in the API call.
Resolution
- Refer to the documentation for the correct API request format: Consume Warehouse Physical Stock by Product.
- Use the batch request format as shown in the example below:
-batch_01869434-0006
Content-Type: multipart/mixed; boundary=changeset_id-1660905366757-4138
-changeset_id-1660905366757-4138
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID: 0.0
POST WarehousePhysicalStockProducts(ParentHandlingUnitUUID={{ConsumeStock.ParentHandlingUnitUUID}},StockItemUUID={{ConsumeStock.StockItemUUID}})/SAP__self.ConsumeStock HTTP/1.1
Content-Type:application/json
Content-Length: 2000
{
"WarehouseMovementsReason": "",
"EWMAccountAssignmentCategory": "",
"EWMAccountAssignmentObject": "",
"EWMGoodsMovementEntryUnit": "EA",
"EWMGoodsMovementEntryQuantity": 1,
"_PhysStockProdSerialNumber": []
}
-changeset_id-1660905366757-4138--
-batch_01869434-0006--
See Also
Keywords
consume warehouse stock, api error, invalid property, EWMAccountAssignmentCategory, EWMGoodsMovementEntryUnit, batch request, SAP S/4HANA Cloud Public Edition, warehouse management, SCM-EWM-API , KBA , SCM-EWM-API-2CL , Remote APIs (Public Cloud) , Problem
SAP Knowledge Base Article - Public