Skip to Content
0
Former Member
Oct 09, 2006 at 11:45 AM

Unable to obtain batchnumber information

32 Views

Hello,

I'm trying to read the batch numbers corresponding to an existing delivery note in SBO2005 SP1 PL11 with this code:

If vDLN.Lines.BatchNumbers.Count > 0 Then
   For linbatch As Integer = 1 To vDLN.Lines.BatchNumbers.Count()
      If linbatch > 1 Then
          vDLN.Lines.BatchNumbers.SetCurrentLine(linbatch - 1)
      End If
      wFECCAD=vDLN.Lines.BatchNumbers.ExpiryDate, "yyyyMMdd")
      LOTE=vDLN.Lines.BatchNumbers.BatchNumber
      CENV=vDLN.Lines.BatchNumbers.Quantity
      ....
   Next
end If

But my code allways return ExpiryDate = #12/30/1899#, BatchNumber='' and Quantity=0.

I also try to use this other alternative with the same result:

Dim oBatchNumbers As SAPbobsCOM.BatchNumbers = vDLN.Lines.BatchNumbers
....
wFECCAD=oBatchNumbers.ExpiryDate, "yyyyMMdd")
LOTE=oBatchNumbers.BatchNumber
CENV=oBatchNumbers.Quantity
....

Thank you