Add Column Color in ALV using CL_SALV_TABLE

0
2134

[adsenseyu2]

In this tutorial we will learn how to apply colors to a column in ALV report using CL_SALV_TABLE.

To apply column color,

  • Get the list of all columns of ALV using GET_COLUMNS().
  • Choose a particular column by calling the method GET_COLUMN().
  • Apply color by using the method SET_COLOR().

Classes used : CL_SALV_TABLE, CL_SALV_COLUMNS_TABLE, CL_SALV_COLUMN_TABLE.

Create a program in SE38 and copy the below code.

https://gist.github.com/prakash13t/b2978992a222e7da19cb#file-columncolor_salv-abap

 

Output without Color:

alv1

[adsenseyu1]

Output with Color:

alv2