Skip to Content

DI: GetBusinessObjectFromXML()

Hello,

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

vCmp.Disconnect

Set vCmp = Nothing

end sub

Add a comment
10|10000 characters needed characters exceeded

Related questions

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.

    Regards,

    Frank

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.