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: 

Backgroud color for table control cell

Former Member
0 Kudos

Hi all,

I have developed module pool with table control, the requirement is to highlight some columns with background color.

I tried to use SCREEN-COLOR field but it is not usedful. Please let me know how to achieve this requirements..

Pts are assured.

regards,

mahantesh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Mahesh,

Yes , you are true.

You cannot color the columns in the table control.So Instead of table control you can create a ALV grid with ALV Function modules or with ALv oops.

So try with the Grid.

Regards,

Madhavi

6 REPLIES 6

Former Member
0 Kudos

hi

check this thread

hope it will help you.

thanks

Sachin

I355602
Advisor
Advisor
0 Kudos

Hi,

Use it this way:-

If you want the some fields for a records to be highlighted, then use the code in PBO.

Or if you want that if user performs any action and then the fields should be highlighted, then use the code in PAI under user command.

Take the group1 for all the fields as 'ABC' which needs to be highlighted.


if <condition>. "if you want to highlight on some condition
  if ( screen-group1 = 'ABC' ). "fields with group1 ABC to be highlighted
    loop at screen.
      screen-intensified = 'X'. "apply color
    endloop.
    modify screen. "modify screen
  endif.
endif.

Similarly you can remove this color using:-


if <condition>. "if you want to un-highlight on some condition
  if ( screen-group1 = 'ABC' ). "fields with group1 ABC to be un-highlighted
    loop at screen.
      screen-intensified = ' '. "remove color
    endloop.
    modify screen. "modify screen
  endif.
endif.

Hope this solves your problem.

Thanks & Regards,

Tarun Gambhir

Former Member
0 Kudos

Hi Tarun,

This intensified field is used to highlight the text in the particular column, but I want to highlight the entire column even if some of it's cell are blank.

Can it be done?

regards,

mahantesh

0 Kudos

its

screen-intensified = '1'.   // not X

Sree

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Mahesh,

Yes , you are true.

You cannot color the columns in the table control.So Instead of table control you can create a ALV grid with ALV Function modules or with ALv oops.

So try with the Grid.

Regards,

Madhavi