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
Fred
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.
Nice tip!
I didn't pay attention to this earlier. Things are gonna change now 🙂
Hi,
Very Nice TIP.
Brilliant!
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: