Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Adding multiple serial numbers to a Delivery note: B1 9.0

So I've successfully added a delivery with non-serialized items, and single serialized items but I'm looking for guidance on multiple serialized items per line..

In other words: ItemCode 'XYZ' is serialized and I need to create a delivery from a SalesOrder for (3)  XYZ's.

                  SAPbobsCOM.Documents odeliveries = (SAPbobsCOM.Documents)Vcmp.GetBusinessObject(BoObjectTypes.oDeliveryNotes);

                        odeliveries.Lines.BaseEntry = 123456;

                        odeliveries.Lines.BaseType = 17;

                        odeliveries.Lines.BaseLine = 0;

                        odeliveries.Lines.WarehouseCode = "WHS1";

                        odeliveries.Lines.Quantity =3;

                        odeliveries.Lines.ItemCode = "XYZ";

                        if (CommitItem.Serial_Flag == "Y")

                        {

                            odeliveries.Lines.SerialNumbers.SetCurrentLine(0);                  

                            oeliveries.Lines.SerialNumbers.SystemSerialNumber = 6;

                            odeliveries.Lines.SerialNumbers.Add();

                            //odeliveries.Lines.SerialNumbers.SetCurrentLine(1);

                            odeliveries.Lines.SerialNumbers.SystemSerialNumber = 7;

                            odeliveries.Lines.SerialNumbers.Add();

                            //odeliveries.Lines.SerialNumbers.SetCurrentLine(2);

                            odeliveries.Lines.SerialNumbers.SystemSerialNumber = 8;

                            odeliveries.Lines.SerialNumbers.Add();

                      

                        odeliveries.Lines.Add();

                    }

                    retval = odeliveries.Add();

How do I syntactically apply those serial numbers to the Delivery?

Thanks in advance Guys!!

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question