Skip to Content
Former Member
Apr 09, 2008 at 12:52 PM

Adding Item managed by serial no.s to Delivery Document


Hello Experts,

Can you please help me in the following?

I'll appreciate your help.

I want to add items managed by Serial Number to delivery document (using DI API).

We have a set of internal serial numbers to be used for those items.

For E.g, we have to add an item with code A0001, quantity of 2, with internal serial numbers to be used 00080,00090

to the delivery document.

(We allow the user to specify the internal serial numbers to be used).

I'm not sure how to get the system serial number for this item.

I believe OSRI has the Serial No/Internal serial no. for each item, w.r.t the marketing documents. (Is each item has its own set of system serial nos & internal serial no.s? From where we need to take it?)

Can you please post if you have any sample code?

(If possible, can you please explain me the relationship between OSRI and marketing documents, and oitem)

Thanks a lot.



Code that I'm using:

Private Function UpdateSerialNumbers(ByRef objSerialNumbers As SAPbobsCOM.SerialNumbers, ByVal strShpReqNm As String, ByVal strShpReqRw As String) As Boolean

'Get the values of Internal Serial numbers from our table, into this RS.


If objRS.RecordCount > 0 Then


Dim i As Integer

If objSerialNumbers.Count <= 0 Then SerialNumbers.Add()

For i = 0 To objRS.RecordCount - 1

Dim strTmp As String

strTmp = objRS.Fields.Item(0).Value() & ""


objSerialNumbers.InternalSerialNumber = strTmp 'e.g 00080

'Need your help in this step

objSerialNumbers.SystemSerialNumber = objCommon.GetNextKeyValue("OSRI", "SysSerial")


If Not objRS.EoF Then


End If


End If

End If

return true

End Function

Function CallingFn() as boolean


UpdateSerialNumbers(objDLDoc.Lines.SerialNumbers, objHeaderInfo.ShipReqNum, strTmp)


End Function