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

Orders Documents

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

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Jun 22, 2004 at 03:52 PM

    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ñ

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Jul 13, 2004 at 10:24 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded