This is a test message to test the length of the message box.
Login
ABAP Quick Transport ALV variant
Created by Software-Heroes

ABAP Quick - Transport ALV variants

2111

In this small article we show you some tips regarding ALVs, variants and the distribution in the system.



ALV or SAP List Viewer is used for all possible outputs in the system and had long been established as the new standard according to the print lists. There are now many different methods for developing an ALV, all of which have their advantages and disadvantages.

 

Methods

Today there are still different methods to create an ALV, a brief overview sorted with the oldest technology first.

  • Function module REUSE_ALV_GRID_DISPLAY
  • Class CL_GUI_ALV_GRID
  • Class CL_SALV_TABLE

 

Why there are two classes in the system, you going to ask yourself? If you look at the older class CL_GUI_ALV_GRID, you will quickly find that refactoring is urgently needed here. With around 220 methods and over 25,000 lines of code, the class is huge, not really maintainable and confusing. The new class CL_SALV_TABLE is the revision of the old class according to modern OO principles.

A disadvantage of the new class is that it cannot be used to change data in the ALV. The classes offer pure display functionality. You should definitely master both class variants if you want to use it's full power.

 

Structure

Here is a small example of how to build and display an ALV directly with little code. In the first step we read the company codes, call up the factory, activate a few more settings and display the data on the screen. A separate dynpro is not necessary and the function bar is also included.

SELECT *
 FROM t001
 INTO TABLE @DATA(lt_companies).

cl_salv_table=>factory(
 IMPORTING r_salv_table = DATA(lo_alv)
 CHANGING t_table = lt_companies ).

DATA(lo_functions) = lo_alv->get_functions( ).
lo_functions->set_all( ).

DATA(lo_layout) = lo_alv->get_layout( ).
lo_layout->set_default( abap_true ).
lo_layout->set_key( VALUE #( report = sy-repid handle = '0001' ) ).
lo_layout->set_save_restriction( ).

lo_alv->display( ).

 

By configuring the functions and the layout handling you get the standard function bar, with which you can then change and save the layout of the ALV.

 

Transport of variants

To transport a variant, you first have to configure and create your variant in the system. You can do this using the last three buttons on the toolbar. After you have created the variant and are still in the display of your data, you can go to the menu under "Settings -> Layout -> Administration".

 

You will then receive an overview of the variants for the current ALV. Here you can choose the variant to be transported and use the menu point under "Layout -> Transport" to adopt the variant in an existing transport or create a new one.

 

You need a customizing transport in the system to carry out the recording. After this step the entry in the transport looks like this.

 

Conclusion

When it comes to displaying and changing data, many other technologies have now become established that are mostly independent of the SAP GUI. Webdynpro or SAP Fiori are based on web technologies, but in terms of speed of development they are unlikely to catch up with the classic list in the system as quickly. At least for the next few years, the ALV will remain an important component for the ABAP developer.


Included topics:
QuickALVTransport variants
Comments (0)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Tuesday and Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


ABAP in Practice - Fiori Data incorrect

Category - ABAP

In this short practical example, we'll look at a Fiori error. Here, the data is displayed incorrectly in the UI, even though everything else appears to be correct. The trail leads us in a different direction through the RAP stack.

10/10/2025

ABAP Quick - Handling of Function modules

Category - ABAP

How do you actually handle function modules and error handling within ABAP? In this short tip, we'll also look at handling them within the context of RFC.

08/26/2025

ABAP Quick - Generic Data Types

Category - ABAP

What exactly distinguishes CLIKE from CSEQUENCE? Generic types can sometimes be a bit opaque, and as ABAP developers, we might choose a type that's too generic.

08/12/2025

BTP - Quick Deployment

Category - ABAP

Want to make Fiori Elements apps available even faster after RAP modeling? Quick Deployment is now possible.

07/18/2025

Recycling Heroes (Explained)

Category - ABAP

What do the Recycling Heroes have to do with modern ABAP development and ABAP Cloud? In this article, we provide insights into the idea.

07/15/2025