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