Skip to Content
0
Former Member
Oct 19, 2006 at 02:22 PM

ALV

25 Views

hello,

Is this code right for coloring a row...

READ TABLE GT_BPSTAB ASSIGNING <GT_BPSTAB> INDEX LV_COUNTER.

IF LV_COUNTER = 12.

*FORMAT COLOR COL_KEY INTENSIFIED ON.

WA_BPSTAB-EMPHASIZE = 'C610'.

APPEND WA_BPSTAB TO GT_BPSTAB.

ENDIF.

IF LV_COUNTER = 13.

*FORMAT COLOR COL_KEY INTENSIFIED ON.

WA_BPSTAB-EMPHASIZE = 'C910'.

APPEND WA_BPSTAB TO GT_BPSTAB.

ENDIF.

LS_LAYOUT-INFO_FNAME = 'COLOR_LINE'.

*append GT_FIELDCATALOG to LT_FIELDCATALOG.

CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

I_STRUCTURE_NAME = 'GT_STRUCT'

I_SAVE = X_SAVE

I_DEFAULT = LV_DEF

IS_LAYOUT = LS_LAYOUT

CHANGING

IT_OUTTAB = GT_BPSTAB[]

IT_FIELDCATALOG = GT_FIELDCATALOG[]

EXCEPTIONS

INVALID_PARAMETER_COMBINATION = 1

PROGRAM_ERROR = 2

TOO_MANY_LINES = 3

OTHERS = 4