How to save IDOC as an XML.pdf
How to save IDOC as an XML.pdf
The transfer between SAP systems is done through SAP's Application Link
Enabling (ALE) system, while the transfer from an SAP system to an
external system happens through electronic data interchange (EDI). This
allows data to be exchanged between the different systems without
converting data from one format to another.
What is an XML?
Extensible Markup Language (XML) lets you define and store data in a
shareable manner. XML supports information exchange between computer
systems such as websites, databases, and third-party applications. Predefined
rules make it easy to transmit data as XML files over any network because the
recipient can use those rules to read the data accurately and efficiently.
No matter which application scenario, you will often encounter the issue
where you will need a specific IDoc as an XML file on your local hard drive.
Repeatedly exporting files through a partner profile configured in
transaction WE20 is ill advised due to uncontrolled side effects, e.g.
repeating DESADV dispatches to clients.
The XML file is thus the best way forward, as it has many advantages and
can for example be used to debug incorrect behaviour in software
downstream from SAP. There are various functions available for exporting
IDoc data in SAP. In a previous article we explained how to export IDoc
data in Excel format. SAP also offers functions for exporting an IDoc as an
XML file however.
Pressing ctrl+A, ctrl+C or ctrl+V will allow you to view the XML content with
any editor.
As shown in the screenshot, the generated XML file has a small flaw: the
opening angle brackets (< und </) of the elements are followed by spaces,
and the closing angle brackets (>) have spaces before them. This means
that this XML is not formatted properly.
Summary
By using the method, you will be able to quickly and easily export IDoc data
as XML files from an SAP system. The only disadvantage is that the
resulting XML file is not valid and needs to be corrected with an editor,
before it can be transmitted to further applications.