Skip to Content
Personal Insights

focus on the right data in an ALV

Dear community, I recently saw a picture about information and knowledge on Twitter. I’ve reproduced the picture for demonstration.


information knowledge figure

It reminded me of something in particular. However, it took some time before I figured it out … lists!

Lists per SAP List Viewer (ALV) are part of my daily work. Lists usually contain a large number of columns and a large amount of information in the associated cells. As an example, check database table EKKO (purchasing document header). It contains 159 columns. I have to know or find the connections (the knowledge) myself. Every time I call transaction SE16, I keep that in mind 🙂 Good to know some business processes and the relevant data.

As soon as you understand certain connections, you use them skillfully to answer questions. For example: Which purchase orders of a certain document type were created for purchasing organization 1000?

This brings up the topic “focusing” – that’s important to me. Sometimes I spend a lot of time looking for a particular column and its contents. Many times I’m just confused by the sheer number of columns (scrolling to the right … a little bit more scrolling … and finally missed) or I look in the wrong column 🙁

In such a situation, I find it useful to reduce information. Hide the unnecessary information (columns) and focus on the important information. Handy if everything fits on the screen.

You can do this by setting a layout. You can define the order of the columns, you can hide columns, define filter and more. Really useful. Even more, you can define layouts only for yourself or for all users of the ALV.

function keys to work with layouts

Here’s a very simple example. Database table T006 (units of measurement) has 23 columns. Therefore my screenshot is very wide and cannot show any details.

T006 view in transaction SE16 with all columns

If you reduce the columns to the required columns, the screenshot becomes clear (just an example that’s ok for me)

T006 view in transaction SE16 with defined columns

This possibility exists for a long time. I’m therefore surprised how many users don’t know it or don’t use it. Incidentally, I know the same situation from selection screen variants. Both are very helpful. Especially if you combine them in your own written applications 🙂

If you can choose a layout with the selection criteria on the selection screen, you can save it in a variant for later use. That’s a good combination: You can define what you want to see by selection criteria and how to you want to see it by layout.

This allows you to quickly develop different views on a list. Views that allow quick answers to certain questions. That’s it – I just wanted to remind of this possibility.

How can you do that in your own code? Fortunately, there are standard examples. For lists based on class CL_SALV_TABLE, check report SALV_DEMO_TABLE_LAYOUT. If you work with lists based on ALV with Integradted Data Access (ALV with IDA), please check report SALV_IDA_LAYOUT_LISTBOX_FS.

So far so old-school so good 😉 Have fun and use the standard to keep things simple.


Best regards, thanks for reading and please stay healthy



P.S.: Interested in a hand-picked round-up of the best ABAP development links every week? Check ABAP Weekly.

P.S.S.: Not tired of reading blogs? Check this blog by Jan Braendgaard Petersen.

You must be Logged on to comment or reply to a post.
  • hi Michael, always interesting and thought provoking. I never thought about knowledge as joined up information, but I do now.



  • Just had a talk with a colleague about the intention of using a report. It is good and helpful to provide all possible data in reach, because you don‘t know about the intention with what the user will start the report. On the other hand it means that the user needs to focus on her/ his intention and know about the facts (select the right values, filter specific columns and maybe use different sortimg, totals and sub totals).

    example: there are often reports like „open orders“. They are usedul if you want to know about open orders. But why not provide a list for all orders? The user could restrict the data by selecting the right status.

    a good way of reminding the user about which intentions he might have, is – as described – using the built-in layout functionality. I described a solution for an even more obvious way on my blog (in german):

    All saved layouts are displayed as a button with sub-menu. This is more natural for a user as she/ he can take action instead of selecting a layout. A small but meaningful difference IMHO.

    • Hi Enno. “A small but meaningful difference” … there is a company that makes a lot of money with it. They pay a lot of attention to the “small difference”. What’s the name of the company … ah, got it … Apple 🙂

      Your contribution is a nice addition to my blog. By the way, I’ve already written a lot of “open orders reportings” 😉

        • Actually Enno, there is another massive idea lurking in your comment, which you are already aware of but I have only just realized: ALV reports are very static and only allow the user to look at the data in a very fixed way (even with different layouts). But if you could give the user the ability to look at the extracted data set in several different ways, this would be very useful: after all, this is why people extract the data to Excel. I know you could probably program it and the idea is being introduced in Fiori but it would be nice to have it in ALV out of the box. Maybe I am asking for magic, I don’t know… 🙂

          • Hmm. I’ve just been trying to back up what I was saying. The only Fiori app I’m in any way familiar with at the moment is Custom Code Migration Project and this takes all the custom code checks generated in ATC against the S/4 Simplification List. It’s a huge amount of data, but the Fiori app lets you look at it in many different (predefined) ways.

            Wouldn’t it be great if you could do the same with ALV? Do the data extract once and look in it several ways ?(more than just filtering and sorting)

          • I don’t know what these “many different ways” are… sorry. What else is possible in the app apart from sorting and filtering? As you say: If there are “predefined” views than these might be programmed. Can you provide an example?

          • For the first time in years I went back to look at the ALV layout functionality and I have to say it is pretty good and gives me 75% of what I was thinking of. What I really had in mind is performing different logic on the extraction set and displaying the resulting data in possibly different ways. You can do this in a custom program using different ALV containers. For example, I remember reading this book which describes such a method: and building a prototype which allowed different ALV views in split containers. This for example allowed me to display ALV lists for sales orders from different sales organisations side-by-side. This was useful but hard to program. I think it’s asking too much to build that level of sophistication into a standard framework.

          • ok. now I think I know what you mean… There are some enhancements that could be implemented in every grid. Like auto sum where you can mark number cells and get displayed the sum of the cell values (Version 1 and Version 2). And there are some enhancements still need to be programmed because they need to behave different in different grids.

            I do not know where I read this, but there was a blog/ programming (??) where you could drill down the data defined by the foreign key. I don’t remember exactly. A similar functionality is programmed in transaction SE16H where you cann drill down “total lines”.

            Functions like “open detail in new window” requires a general framework that allows you to close one container or switch sides for example. this is not restricted on grids.

            A try to simplifying the container management is my project guiDrasil. It’s prorgamming but it shows how container management could be provided by a framework.

    • A good idea.


      In one of our solutions we’ve also extended the standard menu of ALV layout with:

      Recently used