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 IV. – Create Framework Program to Process XML Files

Main responsibilities

We did a great job with the Simple Transformations, so from now on we are ready to call it from the framework program. To make it simpler, first I am going to introduce the main responsibilities of the framework program: first let's upload the content of the XML file, then parse this content into an SAP internal format, and at last insert the parsed data into the database. I like to write transparent codes, so we are going to use subroutines to separate these different responsibilities, and keep our code readable. We are going to construct three subroutines, namely UPLOAD_XML, PARSE_XML, and INSERT_INTO_DATABASE.

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.

Simple XML Processing in ABAP Part I. – Overview

Introduction to XML

Today, it is very common business request to exchange data between different external systems. It can be a problem that those systems usually store their data in incompatible formats. To make this exchange process much easier, it’s usual to use a plain text format such as XML. XML provides a standardized format, so a result those systems can communicate with each other in only one specified language, what everybody easily understands.

Since the XML is a well-known markup language, most of the programming languages are capable to process XML files and provide various tools to transform their content to an internal format of the given system. If you want to learn more about XML, visit the website: www.w3schools.com.

Build flexible, consistent, and centralized database in SAP via Domains and Data Elements

Learn not only the HOW, but the WHEN and the WHY also

I think all of us ever had to deal with constructing databases for business applications. As an ABAP Developer, one of our responsibility is to create flexible, consistent, and centralized databases that serves data for many application. 

There are many-many possible approaches, methods and best practices to construct good databases that can be confusing. As a beginner, it’s very frustrating, I know that feeling well. When I was newbie in ABAP, I clearly remember for that I just couldn’t choose the appropriate solution, I only could apply that I saw from senior developers in certain scenarios. As a beginner, you don’t have any other chance, so let’s do it! 

How to generate a SOAP proxy for a Web Service in Xamarin Studio

Build native iOS, Android, and Windows apps using C#

Nowadays, our team is working on projects that deal with cross-platform native mobile developments both on iOS, Android, and Windows Phone. So, over the last couple of weeks, we spent our time in Xamarin Studio, but I didn't mind that, sometimes the changes are good. :)

This week I had to finish the communication bridge between Xamarin and our SAP BW system, so I build a SOAP proxy in Xamarin Studio based on the SOAP Endpoint that I created earlier. I was really surprised by the results, it was very easy. In this demo, I want to share you my experiences. Enjoy it!

How to generate a SOAP endpoint from a simple SAP Function Group within a few minutes

Practical Guide for Developers

I am proud to announce that from now on I'm going to share my experiences, tips & tricks in this blog that I face during my work. Besides you can check my timelapse videos also that I create in my free time.

This video is the part of our recent Pluralsight course that is going to be published in July 2014. You can check our courses here:

http://pluralsight.com/training/Authors/Details/laszlo-meszaros

Enjoy it!