on 11-04-2009 4:19 AM
Hello experts.
i have a problem. When I want import inventory entries with sdk.(the sample code here). this code function when import one or two lines for document realy function, but when i agree more that this("comment code"). the document not created
Thank You.
Dim Doc_H As SAPbobsCOM.Documents
Dim Doc_Lines As SAPbobsCOM.Document_Lines
Set Doc_H = sboCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
Set Doc_Lines = Doc_H.Lines
Doc_H.Reference2 = "1"
Doc_H.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items
Doc_Lines.SetCurrentLine (0)
Doc_Lines.WarehouseCode = "01"
Doc_Lines.ItemCode = "a1"
Doc_Lines.Quantity = 5
Doc_Lines.UnitPrice = 100
Doc_Lines.Add
Doc_Lines.SetCurrentLine (1)
Doc_Lines.WarehouseCode = "02"
Doc_Lines.ItemCode = "a3"
Doc_Lines.Quantity = 10
Doc_Lines.UnitPrice = 102
' Doc_Lines.Add
' Doc_Lines.SetCurrentLine (2)
' Doc_Lines.WarehouseCode = "03"
' Doc_Lines.ItemCode = "a2"
' Doc_Lines.Quantity = 2
' Doc_Lines.UnitPrice = 105
Dim Error As Long
Error = Doc_H.Add
Hello,
Warehouse and itemcodes are exists in the database?
Please provide your error message for understanding the problem
Regards,
J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the actual error?
And check that the values you entered in the commented code is not existing in the company.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.