ALV grid color settings are divided into three types, rows, columns, cells
0. Color
Color Field CHAR4 Type
First, the line
1. First define the Color field in the inner table of the display, type C (4), as
Color (4) Type C
2. ALV Layout type specify Color field
Data:ls_lay type Slis_layout_alv. " ALV Layout ' COLOR '.
Second, column
Set the Fieldcat on it, for example
DATA : Lth_cat type Slis_fieldcat_alv, ltd_cat type Slis_t_fieldcat_alv. Lth_cat'aufnr'. Lth_cat' order number '. Lth_cat'C610'. Lth_cat'X'. Append Lth_cat to Ltd_cat. Clear Lth_cat.
Three, cell
1, first in the display of the inner table to define the Color field, the field type is Lvc_t_scol, which is a table fields,
Colort type Slis_t_specialcol_alv,
2, Slis_t_specialcol_alv contains two fields, color (specify color), fieldname (Specify which field's cell display color)
3. Specify a color field in the ALV layout
' Colort '.
Four, the effect
is the row color, cell color
ALV GRID (2) Detailed 3 colors