Skip to Content
1
Jun 24, 2020 at 07:31 AM

EWM 'ConfirmWarehouseTaskProduct' post call Error - "Status Code: 428 Precondition Required"

216 Views Last edit Jun 24, 2020 at 07:42 AM 3 rev

Hi,

We are fetching warehouse orders and resources using following api -
"https://{host}:{port}/sap/opu/odata/sap/API_WAREHOUSE_ORDER_TASK". The scenario is to scan the destination handling unit of a product and validate it against the new location. For this, we are triggering a post call to the url: 'https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_WAREHOUSE_ORDER_TASK/ConfirmWarehouseTaskProduct?Warehouse=string&WarehouseTask=string&WarehouseTaskItem=string"'

The function import 'ConfirmWarehouseTaskProduct' gives the following error message: "Precondition required for action in entity CDS~A_WAREHOUSETASK - use \"If-Match\" header".

This error is related to ETag handling. However, a get call does not return the Etag in the response header. We tried fetching ETag using the endpoint: '/WarehouseOrder?$format=atom'. We are getting multiple entries and Etags for each entry. However, when we pass the Etag value in If-Match header, we get the same error. We tried jQuery.ajax as well as oDataModel callFunction metthod but still getting the same error. We are passing the Etag value in If-Match header as shown in the attached image. PFA images of network calls.

Please help me in resolving this issue.

Regards,

Abhash

Attachments

ewmerrorimage.jpg (144.8 kB)
ewmerrorimage2.jpg (91.0 kB)