To set Color for a Row the table we are going to map to the ALV must have a field of type lvc_t_scol and fill the color structure:
Declare:
DATA: lt_s_color TYPE lvc_t_scol,
ls_s_color TYPE lvc_s_scol.
Fill structure
ls_s_color-color-int = 0. "Intensive
ls_s_color-color-inv = 0."Inverse
" 1 = grey/blue, 2=light grey, 3=yellow, 4=blue/green, 5= green, 6=red, 7=orange.
ls_s_color-color-col = 3."Color
APPEND ls_s_color TO lt_s_color.
Fill the Tab to be mapped,
WA_SALVTab-ROW_COLOUR = lt_s_color.
APPEND WA_SALVTab TO T_SALVTab.
Declare:
DATA: lt_s_color TYPE lvc_t_scol,
ls_s_color TYPE lvc_s_scol.
Fill structure
ls_s_color-color-int = 0. "Intensive
ls_s_color-color-inv = 0."Inverse
" 1 = grey/blue, 2=light grey, 3=yellow, 4=blue/green, 5= green, 6=red, 7=orange.
ls_s_color-color-col = 3."Color
APPEND ls_s_color TO lt_s_color.
Fill the Tab to be mapped,
WA_SALVTab-ROW_COLOUR = lt_s_color.
APPEND WA_SALVTab TO T_SALVTab.
No hay comentarios:
Publicar un comentario