Display ALV List easily in ABAP using CL_SALV_TABLE Part VII. - Aggregations

Overview

In the previous post, we successfully set a title for our ALV and set the rows striped. Now, we have arrived to the final post of the series, where I'm going to show you another useful feature of the CL_SALV_TABLE class, called aggregations. Using aggregations, we are able to display the minimum, maximum, average or the total of a key figure column.

In order to set an aggregation on our ALV, we need to ask the CL_SALV_TABLE class via its GET_AGGREGATION method to get an object reference of the CL_SALV_AGGREGATIONS.

That's enough for now, let's jump into the middle, and implement our last setting!

Display ALV List easily in ABAP using CL_SALV_TABLE Part VI. - Display Settings

Overview

I think, we are getting closer to have a nice, feature-rich ALV list week by week. In the previous post, I showed you that how to enable the standard toolbar on the top of our ALV list.

Today, we are going to work on the appearance, namely I'm going to show you that how set the header of the ALV list, and how to set the rows striped. Alright, we have the requirements, but how to satisfy them? Easy, and you already know it, we have another subclass of the CL_SALV_TABLE, called CL_SALV_DISPLAY_SETTINGS that is responsible for the appearance of our ALV list.

Display ALV List easily in ABAP using CL_SALV_TABLE Part V. - Set Toolbar

Overview

In the previous post, we successfully performed some individual column settings, like hiding unnecessary fields, and changing the text of some fields. So now, we have a good-looking ALV list, but we cannot say that our ALV is strong in functionality.

So today, I going to share with you that how we can add additional functionality to our toolbar on the top of the list, beside the existing layout settings. To bring it to life, today we are going to use the class, CL_SALV_FUNCTIONS_LIST that is responsible for customizing the toolbar. Using this class, we are able to create custom functions and add it to the toolbar, or we can use standard ones, like sorting, filtering, and so on. In this demo, I am going to show you, how to enable the standard toolbar.

Display ALV List easily in ABAP using CL_SALV_TABLE Part IV. - Individual Column Settings

Overview

In the latest post, I introduced you the CL_SALV_COLUMNS_TABLE class that is responsible for customizing the columns collectively. Today, I want to show you another class, called CL_SALV_COLUMN. This class is responsible for customizing a chosen column individually. To perform some customization on a given column, we have to get an instance reference of the CL_SALV_COLUMN class by calling the method GET_COLUMN() on the CL_SALV_COLUMNS_TABLE class (we already have an instance reference of it).

Display ALV List easily in ABAP using CL_SALV_TABLE Part III. - Optimize Column Width

Overview

Today, we are going to move forward, and continue decorating our ALV list. In my previous post, I showed you how to enable the layout settings for users in the ALV, although it's a nice feature, but as you could see our ALV still looks like so crude. So let's do something! What do you think about optimizing the column width? To customize the columns of the ALV, we have to use the class, CL_SALV_COLUMNS_TABLE by getting an instance of it with the method of the CL_SALV_TABLE, called GET_COLUMNS().

Display ALV List easily in ABAP using CL_SALV_TABLE Part II. - Enable Layout Settings

Overview

In the previous post, we already prepared the main ABAP program that responsible to display a flight schedule from database table, SPFLI in an ALV list using CL_SALV_TABLE class. Today, my goal is to show you how to enable ALV layout settings for the users at the top of the ALV list.

To provide this functionality, let me introduce you our first CL_SALV setting class, called CL_SALV_LAYOUT that we can use via the CL_SALV_TABLE's instance method, named GET_LAYOUT(). This method will give us an instance of the CL_SALV_LAYOUT class that we can use to enable the layout settings feature for the users.

Display ALV List easily in ABAP using CL_SALV_TABLE Part I. - Simple List

Overview

As an ABAP Developer, we often have to develop ABAP reports that displays some data from the database. These programs usually consists of the following three parts: selection screen, database query, and ALV list. I used to get headache even if I had to implement a simple ALV list, since it's not simple as the 1x1. I mostly used the standard function modules, such as REUSE_ALV_LIST_DISPLAY and the REUSE_ALV_HIERARCHICAL_LIST_DISPLAY. Let's face it, the field catalogs are unnecessary, the settings are over-complicated.

Fortunately, in SAP Netweaver 2004, SAP introduced a new Object Oriented ALV list family class, called CL_SALV. It consists of different ALVs such as table, hierarchy, and tree.

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 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.