2004 Nov 03 11:19 AM
<i>Hi Friens.,
I need small help ie.,
Let us assume we have table control like this.,
col1 | col2 | group |
-
a1 | b1 | 1
a2 | b2 | 1
a3 | b3 | 2
a4 | b4 | 2
a5 | b5 | 3
a6 | b6 | 3
1) User need differentiation between groups to look and feel.,thats why I want to change the Line colors based on Group.,
2) I am getting this one .,but I made case on Sy-stepl., while scrolling it is not showing correct .,
3) Is there any good way to do this., like in ME21 CONDITIONS TAB at Item level</i>
If any body have Idea., share with me.,
<b>Thanks.,</b>
<i><b>Surendher Reddy.Baddam</b></i>
<i>Hi Friens.,
I need small help ie.,
Let us assume we have table control like this.,
col1 | col2 | group |
-
a1 | b1 | 1
a2 | b2 | 1
a3 | b3 | 2
a4 | b4 | 2
a5 | b5 | 3
a6 | b6 | 3
1) User need differentiation between groups to look and feel.,thats why I want to change the Line colors based on Group.,
2) I am getting this one .,but I made case on Sy-stepl., while scrolling it is not showing correct .,
3) Is there any good way to do this., like in ME21 CONDITIONS TAB at Item level</i>
If any body have Idea., share with me.,
<b>Thanks.,</b>
<i><b>Surendher Reddy.Baddam</b></i>
2004 Nov 03 2:44 PM
2004 Nov 03 6:26 PM
As what Rich has said, you can dynamically intensified the line based on changed group id. This is my recommendation.
1. On field attributes of the loop fields of table control, define a group id 1 for field COL1, COL2, and GROUP.
2. In PBO of you screen, call a module pool while looping at the table control.
3. In this module pool, check the value of Group. If it has been changed from the previous line, do LOOP at SCREEN and change the INTENSIFIED value of the screen field where group1 is the one you defined in 1)
2004 Nov 05 9:18 AM
Than Q..,
I made condition Same what u said.,
But PBO LOOp AT tableccontrol
ENDLOOP.
is processing only 7 times.,
In my case table control contains 20-30 lines.,
It is modifying only in first two cases.,
2004 Nov 05 9:49 AM
Hi Surendher,
Could you please post the coding you use between LOOP and ENDLOOP so we can have a look at your problem?
Regards,
John.
2004 Nov 05 11:47 AM
LOOP AT itab WITH CONTROL tc4_400 CURSOR tc4_400-current_line.
MODULE check_rej_hld_400.
MODULE radio_checkbox_400.
ENDLOOP.
DATA : l_stf TYPE i.
DATA : l_hyd TYPE i,l_knr TYPE i.
l_hyd = 1.
LOOP AT SCREEN.
IF screen-name = 'ITAB-BATCHNO'.
IF itab-group = l_hyd. " this is group
screen-intensified = 1.
MODIFY SCREEN.
ELSEIF l_knr = l_stf.
screen-intensified = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
ADD 2 TO l_hyd.
2004 Nov 05 12:08 PM
Re: TABLE CONTROL LINES COLOR CHANGE
Posted: Nov 5, 2004 6:47 AM Reply E-mail this post
PBO >>>like thise.,
LOOP AT itab WITH CONTROL tc4_400 CURSOR tc4_400-current_line.
MODULE check_rej_hld_400.
MODULE radio_checkbox_400.
ENDLOOP.
>>>
MODULE radio_checkbox_400.
DATA : l_stf TYPE i.
DATA : l_hyd TYPE i,l_knr TYPE i.
l_hyd = 1.
LOOP AT SCREEN.
IF screen-name = 'ITAB-BATCHNO'.
IF itab-group = l_hyd. " this is group
screen-intensified = 1.
MODIFY SCREEN.
ELSEIF
screen-intensified = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
ADD 2 TO l_hyd
ENDMODULE.
I made logic like this.,
Thanks.,
Surendher Reddy.Baddam
2004 Nov 05 12:40 PM
Hi Surendher,
Could you set a breakpoint on the line:
IF itab-group = l_hyd. " this is group
I suspect this condition is only valid once and thus the intensified attribute will be set onlu once.
Regards,
John.
2004 Nov 05 3:08 PM
All fields you defined in module pool will be considered as global variables. So field l_hyd is a global variable. However, I see that you initialize l_hyd as 1 everytime module radio_checkbox_400 is called. So the IF statement always check for '1'.
Since you are checking for ITAB-GROUP in that module pool, you probably need to read table ITAB with index tc4_400-current_line in module radio_checkbox_400.
Do like this,
READ TABLE ITAB index tc4_400-current_line.
before LOOP AT SCREEN.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |