XML documents have proven to be invaluable in the world of data documents, though it is not used within SAP itself. In interfacing solutions, the XML format is a more and more commonly used/requested format. If you want to create an XML file, you should learn about
CALL TRANSFORMATION, this is an invaluable bit of tooling that is not actually part of the Easy XML suite, though make sure you check the article below. Transformations can also be used to interpret XML files, though I found it has limitations for XML files that have a bit of "depth" (thus nearly all XML files). The Easy XML local class that is made available here is aimed at reading/interpreting the content of an XML file. Thus: create with
CALL TRANSFORMATION, retrieve with
|The EASY XML wrapper class can be made available in your coding as
With a little help of the Easy ALV wrapper class, coding looks cleaner and complexity of ALV development is reduced quite a bit. The local
Download your copy here. The coding for your own
lcl_EASY_XML class can be downloaded and made available as an include. This way with a single download it is available for the whole system (as is a global class). You can of course also copy the class definition and implementation into your own report and use it from there.
The suggested name of the include is
ZABAPCADABRA_EASY_XML, which is applied to the examples on the article series on Easy XML.
XML has proven to be valuable in many automation quests, which did not go unnoticed with SAP folk. Hence the
CALL TRANSFORMATION statement was introduced. And this is more than just a statement, it's a simple and effective way to compose AND/OR interpret XML content.
There is quite some functionality available on XML processing, especially in the form of the
TRANSFORMATION. If you are not familiar with transformations, this is a must-see when handling XML files. The missing link with the transformation is interpreting the XML data. For this too, a lot of functionality is available, which takes a lot of effort to implement. Too much effort, to my opinion, so I developed a wrapper class
lcl_Easy_ALV, with a set of examples for you to use.
Since XML is such a happening topic, the
CL_XML_DOCUMENT class should be in the picture. I've tried using this class a few times and it has proven to be a difficult task. The
iXML setup is newer, more effective and has working examples on the system.