Skip to Content
Former Member
Oct 16, 2009 at 08:22 AM

Error adding a inventory transfer with batchs



I am trying to add an inventory transfer. This transfer consists on only one document row which quantity is 111 and item code is GUELV90. This item is batch managed and so, we have to tell SAP about the batchs involved in the transfer. The batch num is given in 3 times (though the batch num is the same, but it must be done this way, because the data will be load separately). First time: 1 unit, second time, 10 units and finally 100 units.

The transfer is added and when looking at it at SAP we have a strange situation: the transfer has 1 document row with quantity 111 (this is OK), but when looking the batch report of the transfer, only 11 units have been transfered!!!

I have made a lot of examples and I think that SAP only adds 2 batch quantity and the followings are ignored!!! I mean, for the same batch number the third and followings add() are ignored... This could be an DI-API error... ¿?

I wonder if any of you have dealed with this problem before,.... or if you can advise me someway...

Thank you in advance for any comment 😊

(I use: SAP 2007A PL42)


traspaso = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTransfer)

traspaso.DocDate = Today().ToShortDateString()

traspaso.FromWarehouse = "01"

traspaso.Comments = "........"

traspaso.Lines.ItemCode = "GUELV90"

traspaso.Lines.Quantity = 111

traspaso.Lines.WarehouseCode = "FG01"


traspaso.Lines.BatchNumbers.BatchNumber = "V90004"

traspaso.Lines.BatchNumbers.Quantity = 1


traspaso.Lines.BatchNumbers.BatchNumber = "V90004"

traspaso.Lines.BatchNumbers.Quantity = 10

traspaso.Lines.BatchNumbers.Add() 'This one is ignored!!! Why?

traspaso.Lines.BatchNumbers.BatchNumber = "V90004"

traspaso.Lines.BatchNumbers.Quantity = 100