Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Typical Problem in ALV while coloring a row in a list

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Populate color variable with colour properties

Char 1 = C (This is a color property)

Char 2 = 3 (Color codes: 1 - 7)

Char 3 = Intensified on/off ( 1 or 0 )

Char 4 = Inverse display on/off ( 1 or 0 )

4 REPLIES 4

Former Member
0 Kudos

Hi,

use structure slis_color. pass the fields with values and pass that structure to ur field.

Rgds.,

subash

Former Member
0 Kudos

Populate color variable with colour properties

Char 1 = C (This is a color property)

Char 2 = 3 (Color codes: 1 - 7)

Char 3 = Intensified on/off ( 1 or 0 )

Char 4 = Inverse display on/off ( 1 or 0 )

0 Kudos

How can we ger the different color codes between 1-7 ?

0 Kudos

hi,

execute the program SHOWCOLO in se38.

reward points if hlpful.