Skip to Content

Issue while Submitting delivery against Pick list from DI-API for Non-Track Item

Dim rs As SAPbobsCOM.Recordset = DirectCast(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset),
SAPbobsCOM.Recordset)


            Dim delivery As Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)


            Dim oOrder As SAPbobsCOM.Documents = DirectCast(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders),
SAPbobsCOM.Documents)


            Dim picking As SAPbobsCOM.PickLists = DirectCast(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPickLists),
SAPbobsCOM.PickLists)


            Dim oItem As SAPbobsCOM.Items = DirectCast(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems),
SAPbobsCOM.Items)


            picking.GetByKey(Int32.Parse(370))


            Dim cadena As Boolean = oOrder.GetByKey(Int32.Parse(939))


            If cadena Then


                delivery.CardCode = "ABCD"


                delivery.CardName = ""


                delivery.DocDate = DateTime.Now


                delivery.DocDueDate = DateTime.Now


                Dim val As Integer = 0


                Dim lineas As Integer = 1


                For r As Integer = 0 To picking.Lines.Count - 1


                    If r > 0 Then


                        delivery.Lines.Add()


                    End If


 


                   
picking.Lines.SetCurrentLine(r)


                    If
picking.Lines.OrderEntry.Equals(Int32.Parse(939)) Then


 


                        delivery.Lines.BaseType
= CInt(SAPbobsCOM.BoObjectTypes.oOrders)


                       
delivery.Lines.BaseEntry = picking.Lines.OrderEntry


                        delivery.Lines.BaseLine
= picking.Lines.OrderRowID


                        delivery.Lines.ItemCode = "AA-N"


                        delivery.Lines.Quantity
= 1


                       
delivery.Lines.BinAllocations.BinAbsEntry =
picking.Lines.BinAllocations.BinAbsEntry


                       
delivery.Lines.BinAllocations.Quantity = 1


                       
delivery.Lines.BinAllocations.SerialAndBatchNumbersBaseLine =
delivery.Lines.BaseLine


 


                    End If


                    val = delivery.Add()


 


                    lineas += 1


                Next


                If val <> 0 Then


                    ''Error


                Else


                    ''Delivery Created Successfully.


 


                End If


            End If
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 15, 2017 at 06:31 AM

    Thanks Ankit for immediate response.

    I will post my requirement on SAP B1 Customer Influence site. Well if SAP has plan to add this into DI-API Please let us know.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 15, 2017 at 05:33 AM

    Hi,

    This is the current system behavior. DI API has the same behavior as SAP Business One Application. If you manually copy Sales Order to Delivery in SAP Business One Client partially, it also closes all pick lists relates to this line.

    In Business One Client, user creates Delivery in Pick list form, in this way, application only closes this pick list itself because system knows the delivery is from this pick list. However in current DI API, we don't have functionality of creating delivery based on pick list.

    According to SAP Note 1028874 we would like to ask you to post your this requirement in our SAP Business One Customer Influence site https://influence.sap.com/sap/ino/#/campaign/887

    Kind regards,

    ANKIT CHAUHAN

    SAP SME Support

    Add comment
    10|10000 characters needed characters exceeded