In this tutorial, we will learn how to color a particular cell in ALV using the factory class CL_SALV_TABLE.In earlier tutorial we have added colors to row in ALV, click here to know how. This is similar to coloring row. Lets see how we can do it.
To apply cell color,
Create a new column of Type LVC_T_SCOL in your output internal table.
Set the above column as Color Column in ALV by using the method SET_COLUMN_COLOR( ).
Add the color data to the color column based on your requirement.
Create a program in SE38-ABAP编辑器 and copy the below code.
2.Output after adding color to cells: