Copyright 2024 - BV TallVision IT

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 LCL_EASY_XML

The EASY XML wrapper class can be made available in your coding as lcl_Easy_ALV and there is a series of articles that demonstrate how the class can be used to implement a series of options / tackle real-life issues.

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 lcl_Easy_ALV class can of course be upgraded to an actual ZCL_EASY_ALV class, to give it even more bandwidth on your system. However I've chosen the INCLUDE option because I implement the setup over and over again with different customers. Creating an include is much more straightforward than creating a class (and yes: I know there is a great upload/download tool available for classes using XML).

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. 

The simple XML transformation can be used to process a table in a table, but to do this, a little preparation in the definitions of these tables is required. No big deal, fantastic effect.

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.

Where the TRANSFORMATION delivers such great results in so little steps, the CL_XML_DOCUMENT and CL_IXML classes could not satisfy my simple requirements to read/interpret an XML file. So I created my own. 

A simple example where an XML file is read from a file and it's contents is made available in the Abap report. 

To get the XML output into good readable shape, hand it to the pretty printer method. 

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.