Skip to Content
author's profile photo
Former Member

Not Generate Line Childs in Orders with Item TreeType is BoItemTreeTypes.iS

I has Generated Order in SAP Business One with items who are TreeType= BoItemTreeTypes.iSalesTree

No errors but Di don't Generate Document_Lines Childs



Dim sDocument as SAPbobsCOM.Documents = Company.GetBusinessObject(SAPbobsCOM.oOrders)


' TreeType of Item is BoItemTreeTypes.iSalesTree





Help Me, Please

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Jan 25, 2005 at 01:52 PM


    I have tested and i assume they will not be automatically filled up. It would be a good idea if you open a message to our support asking for this feature.

    For the moment try using this code. It should come after adding the main Item Code (first line of the sales order)

    I filled the BOM lines with the following:

    Dim oTree As SAPbobsCOM.ProductTrees

    Dim oTreeLines As SAPbobsCOM.ProductTrees_Lines

    Dim l_long As Long

    Dim i As Integer

    oTree = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductTrees)

    If oTree.GetByKey("C7689") Then

    oTreeLines = oTree.Items()

    l_long = oTreeLines.Count

    If l_long > 0 Then

    For i = 0 To l_long - 1



    oSalesLines.ItemCode = oTreeLines.ItemCode


    End If

    End If

    l_retcode = oSalesOrder.Add

    ... error handling ...

    I hope it helps.



    Add comment
    10|10000 characters needed characters exceeded