Skip to Content
0
Former Member
Nov 04, 2004 at 06:42 AM

DI: Import XML

72 Views

Hi All, I have tried to import various business objects via XML without success. I have read all the related postings on this site and none seems to work for me. I am new to the SDK so the problem is most probably quite simple. My other big problem is that I'm also new to VB as Delphi doesn't always work with the SDK. My code is as follows in VB.Net 2002

Dim aSO As SAPbobsCOM.Documents

oCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ValidNodesOnly

aSO = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)

aSO.GetByKey("1")

aSO.SaveXML("c:\SO1.xml")

aSO = Nothing

aSO = oCompany.GetBusinessObjectFromXML("c:\SO1.xml", 0)

In the last line I get an error "An unhandled exception of type System.Runtime.InteropServices.COMException occurred. Additional Information: <ErrorList><Error>System Id = 9317472, Line Number = 1, Column Number = 108, Description = Unknown Element 'DocEntry'

<ErrorList><Error>System Id = 9319936, Line Number = 1, Column Number = 168, Description = Unknown Element 'CANCELED'...

The list goes on and on. Your advise is appreciated.

Thanks in advance,

Adele