on 06-22-2004 12:42 PM
Hi I am using the function XMLRead...
When I create a business Partner with this method I don't have any problem, This function reads the XMl and then I add it to SBO.
The problem comes when I try to Read An XML of an Order.
Private Function XMLRead(oCompany As SAPbobsCOM.Company, vBP As SAPbobsCOM.Documents)
Dim ret As Long
Dim FileName As String
Dim Ecount As Long
Dim ii As Long
Dim i As Long
Set vBP = oCompany.GetBusinessObject(oOrders)
FileName = "C:\Archivos de programa\SAP Manage\XML\13.xml"
Ecount = oCompany.GetXMLelementCount(FileName)
For ii = 0 To Ecount - 1
If oCompany.GetXMLobjectType(FileName, ii) = oOrders Then
'Read the Business object data
Set vBP = oCompany.GetBusinessObjectFromXML(FileName, ii)
Exit For
End If
Next ii
ret = vBP.Add
*****
I recieve an error telling me that the XML is not valid, but I am sure that I have creates de XML Correctly.
has any one used this method to create an order.
Thanks
If it says the XML is invalid then there is probably something wrong with it. (whatever it is)
You can always check out if it has syntax problems by starting the xml document with Internet Exploder. It will tell you if there is an error in the XML.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Buenas,
Where does exactly give the error?
Which is the xml format? Did you create it using SaveXML method?
Give us some more information. I don´t see any mistake in the code.
Regards,
Ibai Peñ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Ibai:
The error gives me exactly at the line....
Ecount = oCompany.GetXMLelementCount(FileName)
And I generate the XML file with SaveXML
Call vDoc.SaveXML("C:\Archivos de programa\SAP Manage\XML\" + Str(vDoc.DocNum) + ".xml")
I U want I can send u The XML file if u give my ur email.
Thank's for Ur reply.
see u
User | Count |
---|---|
105 | |
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.