Removing items from warehouses

Emanuele Croci

Dear all,

I have thousands of articles into SAP B1 company.

In the item master data of all items, all the warehouses are visible.

Now I need to remove hundreds of items from specific warehouses.


How can I automatically remove items from warehouses (or warehouses for items) via SAP PI SDK?

Is it possible?

I didn't find any REMOVE method in the SAPBobscom Items library.


Please, can someone help me?


Best regards




Emanuele Croci

Dear all,

I found the solution:


Dim oItem As SAPbobsCOM.Items =  ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)


For each itemCode in oitm then

        If oItem.GetByKey(sidItem) Then

           For i= 0 to oItem.WhsInfo.Count -1 do

                  oItem.WhsInfo .SetCurrentLine(i)

                  if oItem oItem.WhsInfo.WarehouseCode ="yourspecificwarehouse" then


                  end if

            Next i


        End if

End If




Please sign in to leave a comment.

Didn't find what you were looking for?

New post