2009 Feb 09 9:33 AM
Hi,
I have a problem in my development.
How can I fill one cell's or one row's backgroud color in a table control in my screen
of SAP GUI dialog program.
Thanks in advance.
2009 Feb 09 9:37 AM
2009 Feb 09 9:48 AM
many thanks for your reply,it really save my time.
Can I ask you another question?
actually, I have used the ALV grid to display some color cells, but you know, the ALV grid will
always set default cursor on the first cell. and then the color of the first cell will be orange not
my color any more. is there a way to solve the problem? I just want ALV grid not to cover my
own color.
2009 Feb 09 9:47 AM
Hi,
I think we cannot fill color in table controls, try using the ALV grids to acheive the same.
thanks,
sarves.
2009 Feb 09 9:51 AM
many thanks for your reply,it really save my time.
Can I ask you another question?
actually, I have used the ALV grid to display some color cells, but you know, the ALV grid will
always set default cursor on the first cell. and then the color of the first cell will be orange not
my color any more. is there a way to solve the problem? I just want ALV grid not to cover my
own color.
2009 Feb 09 9:51 AM
Hi,
Add one more variable at the end of your final output internal table
cellcolor type lvc_t_scol,
data: gd_layout type slis_layout_alv.
gd_layout-coltab_fieldname = 'CELLCOLOR'.
data: wa_cellcolor type lvc_s_scol.
loop at it_output into wa_output,
wa_cellcolor-fname = 'TEXT'. "Field name of output ITAB
wa_cellcolor-color-col = 7. "color code 1-7, if outside rage defaults to 7
wa_cellcolor-color-int = '1'. "1 = Intensified on, 0 = Intensified off
wa_cellcolor-color-inv = '0'. "1 = text colour, 0 = background colour
append wa_cellcolor to wa_output-cellcolor.
modify it_output from wa_output .
endloop.
and pass these in FM REUSE_ALV_GRID_DISPLAY.
Hope it will be helpful.
Regards,
Sunil
2009 Feb 09 9:57 AM
Thanks for you reply.
Actually, I have used the ALV grid to display some color cells, but you know, the ALV grid will
always set default cursor on the first cell. and then the color of the first cell will be orange not
my color any more. is there a way to solve the problem? I just want ALV grid not to cover my
own color.