on 04-12-2010 3:55 PM
Dear all,
I'm developing an automatic application to import cvs file and to create BOMs into SAP via SDK.
How can create a new product tree line?
Dim oPT As SAPbobsCOM.ProductTrees = Nothing
oPT = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductTrees)
oPT.TreeCode = "XXXXX"
Dim oPT_Line As SAPbobsCOM.ProductTrees_Lines = Nothing
Now, which SAP object should I use?
for example...
oPT_Line = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes...........)
Then... I'd use these commads to set the product tree line object:
oPT_Line.ItemCode = "YYYYYY"
oPT_Line.Warehouse = "W10"
oPT_Line.Quantity = "2"
oPT_Line.PriceList = 2
oPT_Line.Add()
Can some one help me please?
Regards
Emanuele
It works.
Thank you very much
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You don't need the product tree line object. Try this code:
Dim oPT As SAPbobsCOM.ProductTrees = Nothing
oPT = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductTrees)
oPT.TreeCode = "XXXXX"
oPT.TreeType = SAPbobsCOM.BoItemTreeTypes.iProductionTree
'1st row
oPT.Items.ItemCode = "YYYYYY"
oPT.Items.Warehouse = "W10"
oPT.Items.Quantity = "2"
oPT.Items.PriceList = 2
'2nd row
oPT.Items.Add()
oPT.Items.ItemCode = "ZZZZZZ"
oPT.Items.Warehouse = "W10"
oPT.Items.Quantity = "2"
oPT.Items.PriceList = 2
oPT.Add()
Hope it helps,
D.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.