Application Development and Automation 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: 
Read only

Color in Table control

Former Member
0 Likes
2,609

Hi All,

I have a table control with 6 fields.Based on 5th and 6th field on some condition i need to give the color for 3rd column (say Blue)

Ex: The following are the records in Table control

1 A B C D E

2 A1 B1 C1 D1 E1

for 1st record 5th and 6th field satisfied the condition so B shud be displayed in Blue color whereas

for 2nd record 5th and 6th field doesnt satisfy the condition so B1 shud be displayed as normal.

How can i acheive this functionality.?

Hi All,

I have a table control with 6 fields.Based on 5th and 6th field on some condition i need to give the color for 3rd column (say Blue)

Ex: The following are the records in Table control

1 A B C D E

2 A1 B1 C1 D1 E1

for 1st record 5th and 6th field satisfied the condition so B shud be displayed in Blue color whereas

for 2nd record 5th and 6th field doesnt satisfy the condition so B1 shud be displayed as normal.

How can i acheive this functionality.?

4 REPLIES 4
Read only

Former Member
0 Likes
1,090

hi

check this thread

hope it helps

regards

Aakash Banga

Read only

Former Member
0 Likes
1,090

in pbo.

within the loop and endloop..create a module modify.

in driver program

module modify.

loop at screen.

if screen-group1 = ' '.

screen-intensified = 'X'.

modify screen.

endloop.

endmodule.

Read only

Former Member
0 Likes
1,090

Hi Madan,

You only can get red colour in table controls.

in PBO.

if some_condition.

loop at screen.

if screen-name = 'THIRD_COLUMN'.

screen-intensified = 1.

modify screen.

endif.

endloop.

endif.

Regards

Ramc

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,090

Hi Madan Mohan,

To change the colour of any column in a table control on screen, use code:-

In the PAI of the screen, inside


loop with control <tab_ctrl_name>.
 module modify_tab.
endloop.

Say for a column, you take group1 as 'ABC'.

In this module you can use the group for the input/output fields and intensify them as per your requirements.


module modify_tab.
  if <condition>.
   loop at screen.
    if screen-group1 = 'ABC'. "say textbox (column for a table) has group1 as ABC
      screen-intensified = 'X'. "change the colour
    endif.
    modify screen.
  elseif <condition>.
   loop at screen.
    if screen-group1 = 'ABC'. "say textbox (column for a table) has group1 as ABC
     screen-intensified = ' '. "change the colour
    endif.
    modify screen.
  endif.
endmodule.

Similarly, you can use this code for other columns also.

Hope this solves your prolem.

Thanks & Regards

Tarun Gambhir