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: 

Can a table control cell be made Red ?

Former Member
0 Kudos

I have a query that can we change the coloue of a table control cell ?

Thanks

5 REPLIES 5

bastinvinoth
Contributor
0 Kudos

Former Member

you want to change color of any particular field value ?

i think BLUE you will get it

write the code in PBO , try the below code snippet

LOOP AT SCREEN.

IF WA_ITEM-MATNR = '101' . "Highlight Particular values in Table Control

  IF SCREEN-NAME = 'WA_ITEM-MATNR'.

  SCREEN-intensified = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

Regards,

Bastin.G

former_member184569
Active Contributor
0 Kudos

You cannot set color of cell in table control. (Unless you are fine with highlighting the field with intensified attribute of screen field.)

To color the cell, you will have to use ALV.

Former Member
0 Kudos

Hi Nidhi,

Is this question answered?could you please update if your issue is resolved.

Thanks

RK

Former Member
0 Kudos

There is no option to make table control more colorful . We can only go with SCREEN-INTENSIFIED = 1 (blue of course)  inside the loop of PBO module.



Former Member
0 Kudos

Hi,

In the PBO module of that screen write this code..,

LOOP AT <TC>

module Color_dispaly.

ENDLOOP.

In that color_display module write following code...

  loop at screen.

   if <tc-field name> = 'value'.

    SCREEN-INTENSIFIED = '1'.

      modify screen.

    else.

    SCREEN-INTENSIFIED = '0'.

      modify screen.

  endif

endloop.

you can get color for the row which is having field name with entry VALUE.

check demo programs

DEMO_LIST_FORMAT_COLOR_1

DEMO_LIST_FORMAT_COLOR_2.