Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.