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

the Bill Of Material issues

just as I asked ,I want to add data into matrix ,but because the speed ,so I add the data into the database first,and then to load them

but ,I can't add the data into OITT and ITT1

this is my codes

Dim vItem As SAPbobsCOM.Items

Set vItem = SBO_Company_DI.GetBusinessObject(oItems)

Dim vProdTree As SAPbobsCOM.ProductTrees

Set vProdTree = SBO_Company_DI.GetBusinessObject(oProductTrees)

RetVal = vItem.GetByKey("TJB02")

vProdTree.TreeCode = "TJB02"

'first line

vProdTree.Items.ItemCode = "A031111"

vProdTree.Items.Price = 200

vProdTree.Items.Quantity = 1

vProdTree.Items.Currency = "Eur"

vProdTree.Items.Add

vProdTree.Items.ItemCode = "A0342324"

vProdTree.Items.Price = 200

vProdTree.Items.Quantity = 1

vProdTree.Items.Currency = "Eur"

vProdTree.Items.Add

SBO_Company_DI.GetLastError ErrCode, ErrMsg

SBO_Application.MessageBox (ErrMsg)

and I can't get any error message ,it's show nothing

who can help me ?

Message was edited by: Dave

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 06, 2005 at 10:11 AM

    Dim vItem As SAPbobsCOM.Items

    Set vItem = SBO_Company_DI.GetBusinessObject(oItems)

    Dim vProdTree As SAPbobsCOM.ProductTrees

    Set vProdTree = SBO_Company_DI.GetBusinessObject(oProductTrees)

    RetVal = vItem.GetByKey("TJB02")

    vProdTree.TreeCode = "TJB02"

    'first line

    vProdTree.Items.ItemCode = "A031111"

    vProdTree.Items.Price = 200

    vProdTree.Items.Quantity = 1

    vProdTree.Items.Currency = "Eur"

    'vProdTree.Items.Add -> Take this out*

    vProdTree.Items.ItemCode = "A0342324"

    vProdTree.Items.Price = 200

    vProdTree.Items.Quantity = 1

    vProdTree.Items.Currency = "Eur"

    vProdTree.Items.Add

    vProdTree.Add 'Add this **

    SBO_Company_DI.GetLastError ErrCode, ErrMsg

    SBO_Application.MessageBox (ErrMsg)

    *By default the 1st item line is always there - you just need to add extra items.

      • You need to add the production tree as well (not just its item lines)

      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.