这里
再计划日期小于当前日期,则变红色
TYPES: CLR TYPE CHAR4,
CELLCOLOR TYPE LVC_T_SCOL, "单元格颜色
END OF TY_ZEMP.
cellcolor type lvc_t_scol, "单元格颜色
end of ty_alv.
data:ls_scol type lvc_s_scol.
if gs_alv-umdat < sy-datum and gs_alv-umdat is not initial.
ls_scol-fname = 'UMDAT'.
ls_scol-color-col = 6 .
ls_scol-color-int = 0 .
ls_scol-color-inv = 0 .
append ls_scol to gs_alv-cellcolor .
endif.
if gs_alv-zcz < 0.
ls_scol-fname = 'ZCZ'.
ls_scol-color-col = 6 .
ls_scol-color-int = 0 .
ls_scol-color-inv = 0 .
append ls_scol to gs_alv-cellcolor .
endif.
clear: ls_mdezx, gs_alv-cellcolor,ls_scol .
gs_layout-ctab_fname = 'CELLCOLOR'.