cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member275872
Discoverer

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/ConfirmWarehouseT...;'

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Lillian_Zhang
Advisor
Advisor
0 Kudos

Hi abhash,

You can check below link for SAP portal.

https://help.sap.com/viewer/c46da892efa14cea8347e9b872199d6f/2005.500/en-US/adfa1494825e45f49275c238...

There is example for request and response.

Best regards,

Lillian