Skip to Content

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

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

ewmerrorimage.jpg (144.8 kB)
ewmerrorimage2.jpg (91.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 24, 2020 at 07:02 AM

    Hi Abhash,

    You can check below link for SAP portal.

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

    There is example for request and response.

    Best regards,

    Lillian

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.