Skip to Content

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

Fred

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Shai Sinai

    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.

    (0) 
  2. Chinmay Kulkarni

    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:

    (0) 

Leave a Reply