Skip to Content

DI: GetBusinessObjectFromXML()


I would like to create a Businesspartner-Object from a XML file. Unfortunately always appear the error -1114. What´s wrong?

Thanks, Stephan

here my VB6 Testprogram:

Sub TestXML()

Dim vCmp As SAPbobsCOM.Company

Dim nResult As Long

Dim strErrString As String

Set vCmp = New SAPbobsCOM.Company

'Initialize the Company Object for the Connect method

vCmp.Server = "(local)"

vCmp.CompanyDB = "SBODemo_DE"

vCmp.UserName = "manager"

vCmp.Password = "manager"

'Connect to the database

nResult = vCmp.Connect

If nResult = 0 Then

Dim vBP As SAPbobsCOM.BusinessPartners

Set vBP = vCmp.GetBusinessObject(oBusinessPartners)

nResult = vBP.GetByKey("C00001")

If nResult <> 0 Then

vBP.SaveXML "C:Test.XML"

Set vBP = vCmp.GetBusinessObjectFromXML("C:TEST.XML", 0)

End If

Set vBP = Nothing

End If


Set vCmp = Nothing

end sub

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Mar 10, 2004 at 06:22 AM

    Hi Stephan,

    first of all: Please use a prefix for the topic of your posts.

    About your question:

    - What's the error text when you request it using GetLastError?

    - Set the XmlExportType property of the company object to xet_ValidNodesOnly, if you want to reimport the data e.g. somewhere else.



    Add comment
    10|10000 characters needed characters exceeded