Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to fill the backgroud color in a table control of SAP GUI

Former Member
0 Kudos
167

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.

6 REPLIES 6

Former Member
0 Kudos
85

Hi,

you can check in [SCN|]

you will get the answer before posting.

Regards!

0 Kudos
85

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.

Former Member
0 Kudos
85

Hi,

I think we cannot fill color in table controls, try using the ALV grids to acheive the same.

thanks,

sarves.

0 Kudos
85

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.

Former Member
0 Kudos
85

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

0 Kudos
85

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.