Skip to Content
author's profile photo Former Member
Former Member

Sales of an item exit of a bill of materials

When I sell an item defined as a bill of materials in a Order document (BOM Type of my DocumentLine= Sales), SBO automatically add to my documents lines the childs items (BOM Type=Chil Item)

When I generate the same Order via my interface (DI 6.5) there's no error but the documents lines childs are not generated and the TreeType property of Item is not defined as a BoItemTreeTypes.iSalesTree

How can I generate the same documents lines with the DI ???

Need help....

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 09:09 AM

    Hello Serge,

    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. This code should come after you add 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

    • Former Member


      We have the same problem, we have to sale bill of materials which BOM type is sales. When we add an item (BOM) to an order, only leave the Father Item. Although your solution could work if your Child Item doesn't have another Child Items. Actually the only solution we found is working directly with SQL for setting the Final Item (BOM), it seems that SDK(DI API) for SBO does not support this kind of operation, anyone knows if is possible working with BOM type sales adding a marketing documents?

      Rafael Monge.

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.