biuan SAP® BUSINESS ONE SDK
API Customer Equipment Cards / Save XML
Save XML Method

Description

Saves the object data to XML formatted data.

Syntax

Visual Basic
Public Sub SaveXML( _
   ByRef FileName As String _
) 

Parameters

FileName

Specifies the path and file name of the XML data.

Specifies the path and file name of the XML data.

Remarks

You can use this method to save a business object to an XML file. Then, call the GetBusinessObjectFromXML method to load this object into memory again, for example, to copy customers from one database to another. To enable this operation, set the XmlExportType property of the Company object to xet_ValidNodesOnly.

To use ReadXML method, set the XmlExportType to xet_ExportImportMode (3).

For more information, see Exchanging Data Using the DI API XML Capabilities.

Example

The following sample shows how to save data of an object to an XML file. Use this sample as a basis to all business objects (both document and master data types).
Invoice Document - SaveXML Method Sample (Visual Basic)
Dim vInvoice As SAPbobsCOM.Documents Set vInvoice = vCmp.GetBusinessObject(oInvoices) 'Retrieve an invoice document from the database RetVal = vInvoice.GetByKey("1023") If RetVal <> 0 Then vCmp.GetLastError ErrCode, ErrMsg MsgBox "Failed to Retrieve the record " & ErrCode & " " & ErrMsg Exit Sub End If 'Save the object as an xml file vInvoice.SaveXML ("C:\Program Files\SAP\XML\Invoice.xml") 'Retrieve the object back from the XML file Set vInvoice = vCmp.GetBusinessObjectFromXML("C:\Program Files\SAP\XML\Invoice.xml", 0)

See Also

Related information


Bo Serial Number Status BoSerialNumberStatus Enumeration
Specifies the location of the equipment.
   Parent: Customer Equipment Cards CustomerEquipmentCards Object· Table: OINS


SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates