cancel
Showing results for 
Search instead for 
Did you mean: 

api_warehouse_order_task_2

Glyba_Dmitrii
Discoverer
0 Kudos
404

Hello

I need to use API api_warehouse_order_task_2 for cancel task, I use request 

Glyba_1_0-1741944059807.png

In body I add this:

{
    "DirectWhseTaskConfIsAllowed": true
}
 
and have error back from SAP:
Glyba_1_1-1741944148845.png

HTTP request look like:

Glyba_1_2-1741944322520.png

What am I doing wrong?

View Entire Topic
Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Glyba_1 ,

This API is part of 3W0 (Resource Management In Warehousing)

https://me.sap.com/processnavigator/SolS/EARL_SolS-013/2502/SolP/3W0?region=US

You are trying to Cancel the task, but the user has not signed on to the resource, I guess.

This is documented in the Best Practice description and in the Help:

https://help.sap.com/docs/SAP_S4HANA_CLOUD/c46da892efa14cea8347e9b872199d6f/a4dcec7056134b2fa9b311e5...

Are you using the IF Match (see the examples in the Help)

Thank you

Jerry

Glyba_Dmitrii
Discoverer
0 Kudos

Hi @Jerry_Lowery 

My user have resource in warehouse, but the warehouse order is not assigned to my resource.

I tried to use If-Match in this request, took it from the GET request in the ETag field and copied it into the POST request and after that received this answer:

Glyba_1_0-1742315914326.png

Then I find method in Abap that check this field with value "*" and with this value it's working but I have error with resource how i wrote in first message:

Glyba_1_0-1742316927171.png

 

 

Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi, I have never used the "*" and would recommend against it - looking at the date code on your IF MATCH , it is from March 12. Usually you do the get and then immediately call the POST so it doesn't expire. According to the error, it is stale and the system did not find the match. I would recommend to call the GET and POST right after and see if it helps.
Glyba_Dmitrii
Discoverer
0 Kudos

Hi @Jerry_Lowery

Thanks for the answer.

I followed your recommendation and found a way to get the E-Tag from the Get request and use it in the POST request with parameter in body:

{
    "DirectWhseTaskConfIsAllowed": true
}

, but I got the same error:

Glyba_Dmitrii_0-1742340121518.png

 

Can i make something else with this situation?

 

Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Kudos
Could you post the full GET and POST payloads/headers? its hard to tell from the screenshot. - but your date code is from 3/14 so 5 days ago - it is difficult if you tested it recently or something else. its ok if you obscure the private info, but really its difficult without the remaining details or seeing the total flow. I checked my postman and haven't tried this Cancel operation so i would need to setup some test. Is it possible the WO is assigned to another user?