2008 Dec 16 6:21 AM
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.?
2008 Dec 16 6:25 AM
2008 Dec 16 6:27 AM
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.
2008 Dec 16 6:28 AM
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
2008 Dec 17 5:12 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |