DI-API: savexml

sap-sdk

 

Save the current object as XML Data
The opposite for this command is GetBusinessObjectFromXML

 

savexml=filename

 

 

// cancel sales order 3000
setvar=ll_docentry=3000
declare d=ue_api_sbo
d.getbusinessobject=oOrders
// Load
d.getbykey=<ll_docentry>
// save to xml file
d.savexml=c:\output\document.xml
destroy=d

 

 

Example: Save and load an invoice

 

declare d=ue_api_sbo
d.GetBusinessObject=oInvoices
// Retrieve an invoice document from the database
d.GetByKey=1023
// Save the object as an xml file
d.savexml=C:\Program Files\SAP\XML\Invoice.xml
destroy d
 

// Create new instance and load the object from xmldeclare d=ue_api_sbo
d.GetBusinessObject=oInvoices
d.GetBusinessObjectFromXML=C:\Program Files\SAP\XML\Invoice.xml"=0