Skip to Content
0
Former Member
Jun 16, 2008 at 09:03 AM

Typical Problem in ALV while coloring a row in a list

63 Views

I am displaying a list in ALV. Depending on the conditions i am coloring the list. Please have a look at the below code. I am getting the desired output ... Fine.... But if you observe the below code, i have hard coded the color values.

My question is where can we find those values ?

Code is

IF v_cnt IS NOT INITIAL.

CASE v_cnt.

WHEN '1'.

wa_mara-linecolor = 'C50'. "51-DARK GREEN

WHEN '2'.

wa_mara-linecolor = 'C31'. "YELLOW

WHEN OTHERS.

wa_mara-linecolor = 'C61'. "RED

ENDCASE.

MODIFY i_mara FROM wa_mara INDEX v_indx TRANSPORTING linecolor.

ENDIF.