cancel
Showing results for 
Search instead for 
Did you mean: 

ALV: How to have different cell colors in same row

Former Member
0 Kudos

Hi Guys,

I need to have an ALV whereby there must be different cell background colors in the same row depending on conditions..

I have been able to color a cell(s) in a row by adding a CELLDESIGN field. This is not my problem. What seems to not be possible is to have more than 1 CELLDESIGN field in a row for each color you want.

How can I go about having a green and red and yellow cell background color in the SAME row, for example?

Kind Regards,

Christiaan

Accepted Solutions (0)

Answers (1)

Answers (1)

gill367
Active Contributor
0 Kudos

if your requirment is to change the color of the whole row based on some condition. that you can achieve by adding

one attirbute to the node which is externally mapped to data node of the ALV used comp.

and this attribute should be of type WDUI_TABLE_CELL_DESIGN.

get the cell editor for all the columns in the ALV one by one and change their cell_design property by assigning it to

this extra field you have added.

If you are asking for a row with different cells of different color, then that you can achieve by adding more than attribute to the node

which you are sending to the data node of the ALV used comp. and proceed as above and set different columns to different cell_design attribute.

then in the init method fill the cell_design attribute with the required value to make it green red or whatever is required.

and one more thing get the column created in the ALV due to this extra attribute and make in invisible.

thanks

sarbjeet singh