cancel
Showing results for 
Search instead for 
Did you mean: 

APIs for Warehousing - OData v4. Count Physical Inventory issue.

mkerschb
Explorer
0 Kudos
118

Hi, 

I am using the Physical Inventory API in my BTP Application and want to perform the COUNT as described in the link. Unfortunately, I am having some troubles with it, therefore I want to understand how it is supposed to work.

To be able to perform an Inventory COUNT I have to have a Inventory Document, which I created in my SAP EWM System as we can see below.

mkerschb_0-1736924449849.png

I notice that there exists a Physical Inventory Item ( Header Item ) for this document, but no Count Item ( since I did not perform the count yet ).

To perform the COUNT I implemented the BATCH call as mentioned in the Dokumentation and when I am executing it, I get following error:

"This physical inventory item doesn't exist."

mkerschb_1-1736924812470.png

This lead to my question: 

Since the BATCH call requires this two PUT calls in it.

mkerschb_2-1736924940772.png

How can the BATCH call require a PUT request of the Physical Inventory Count Item, if the Item does not exists yet? 

Accepted Solutions (0)

Answers (1)

Answers (1)

HammadSharif1
Explorer
0 Kudos

First, ensure the Physical Inventory Item is created successfully by performing a GET request for the WhsePhysicalInventoryItem entity:

/sap/opu/odata/sap/API_PHYS_INV_DOCUMENT_SRV/WhsePhysicalInventoryItem

Verify its existence using filters (e.g., PhysicalInventoryDocument and Item).

After confirming its existence, proceed with the PUT request for the WhsePhysicalInventoryCountItem.

Split the batch process into two steps:

Step 1: Send a batch with the PUT request for WhsePhysicalInventoryItem.

Step 2: After confirming creation, send a batch with the PUT request for WhsePhysicalInventoryCountItem.

 

 

 

 

mkerschb
Explorer
0 Kudos

Thanks for your prompt answer.

But the documentation says that it have to be in one batch call and not splitted into two batch calls.

mkerschb_0-1736928486497.png

Or am I understanding this wrong?