导航

Set web ALV color for each cell WD4A

Posted on 2010-09-06 17:09  Hahappyppy  阅读(853)  评论(0编辑  收藏  举报

As we all know, we can set the color for each cell in gui alv, it's similar in web alv. like this picture

clip_image001

How can we do that ?
there are two ways .
1. set the color directly
LOOP AT COLUMNS INTO LS_COLUMN.
lr_column->SET_CELL_DESIGN( 'CL_WD_TABLE_COLUMN=>T_CELL_DESIGN' )
"there are 19 colors: 00 - 18
ENDLOOP.
2. if the color is dynamic , we can set the cell design name to the spefic column
lr_column->SET_CELL_DESIGN_FIELDNAME( VALUE = CD_FIELDNAME ).
well, CD_FIELDNAME contains the values '00 - 18 '
well, differ cell designs may have different fonts. i ve tried to find some way to set fonts, but failed. if some one find the way, please contact me.thank you !