Skip to Content
Author's profile photo Former Member

ALV grids: texts on subtotal lines

Hi all,

this is a small tip for subtotals in ALV grids.Many times I saw reports in which, for example, material code and material Long text are displayed in the ALV grid, but on the material subtotal line, the material Long text is missing. This is annoying especially if you only display subtotal lines in your report.

There is a easy way to display the texts on ALV subtotal lines:

In the field catalog, put in TXT_FIELD the name from the field catalog field containing the Long text to display.

For example, if in your field catalog you have the fields MATNR and MAKTX, for the field MATNR put in TXT_FIELD ‘MAKTX’. The Content of MAKTX will be displayed on MATNR subtotals lines too.

I hope this will be helpful


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Useful tip.

      A small addition: If you are using CL_SALV_TABLE you should use the equivalent CL_SALV_COLUMN_TABLE->SET_TEXT_COLUMN method.

      Author's profile photo Nikolay Evstigneev
      Nikolay Evstigneev

      Nice tip!

      I didn't pay attention to this earlier. Things are gonna change now 🙂

      Author's profile photo swadhin ghatuary
      swadhin ghatuary


      Very Nice TIP.

      Author's profile photo Gabriele Nosatti
      Gabriele Nosatti


      Author's profile photo Former Member
      Former Member

      I had fixed this earlier through layout.

      In the layout, click on the subtotal button again. Include your MAKTX in the list, but uncheck the subtotal checkbox  Just as below: