Simple XML Processing in ABAP Part V. – Processing XML Attributes

In the previous post, we finished our framework program that is able to call our previously constructed Simple Transformation to parse the content of the XML into SAP database table, ZCUSTOMER.

Today, I want to share you another challenging use case for processing XML documents, namely how to process XML attributes in the XML document using Simple Transformation. It may sound a bit difficult, but we will see that SAP makes our job really easy. We can perform all mentioned operation below via the source code editor or the visual editor. As you got familiar with the visual editor in the previous posts, now I am going to demonstrate the steps in the source code editor (Note: it doesn't matter which IDE you use, it has the same effect).

Simple XML Processing in ABAP Part III. – Create Simple Transformation to Parse XML Content

Create the Simple Transformation

As we are ready with creating ABAP Dictionary objects, let’s move on, and open the transaction, called STRANS to create the Simple Transformation that will parse the content of the XML document into the internal format of the SAP. In the Transformation Editor, first let’s give a name to our transformation like ZCUSTOMER_ST, and hit the Create button.