06-17-2009 5:00 AM
Hi Everyone,
I have 5 radio buttons out of which 2 are grouped as one group and the other 3 are grouped seperately.
When I select a radio button in 1st group then an i/o field becomes invisible.
Also when I select a radio button from the other group then another i/o field gets invisible.
Every thing is ok but when I am selecting the radio button from 2nd group the i/o field which got invisible when the radio button from 1st group is selected is again getting visible.
So please help me to salve my problem.
Thanks in advance,
Pavan.
06-17-2009 5:20 AM
Hi Pavan,
Just Check below code,
LOOP AT SCREEN.
IF p_r1 = 'X'.
IF screen-group1 = 'B'.
screen-active = 0.
ENDIF.
ELSEIF p_r2 = 'X'.
IF screen-group1 = 'A'.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
Just Check you have given Modify Screen.
06-17-2009 5:20 AM
Hi Pavan,
Just Check below code,
LOOP AT SCREEN.
IF p_r1 = 'X'.
IF screen-group1 = 'B'.
screen-active = 0.
ENDIF.
ELSEIF p_r2 = 'X'.
IF screen-group1 = 'A'.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
Just Check you have given Modify Screen.
06-17-2009 5:51 AM
Hi Suresh,
This is my actual code. Could you suggest me the changes that I need to do in this.
CASE SY-UCOMM.
WHEN 'F_AT'.
IF R1 = 'X'.
Perform screen_opt_grp USING 'G1' '0' '1'.
ELSE.
Perform screen_opt_grp USING 'G1' '1' '0'.
ENDIF.
WHEN 'F_MOP'.
IF R3 = 'X'.
Perform screen_opt_grp2 USING 'G2' '0' '1'.
ELSEIF R5 = 'X'.
Perform Screen_opt_name1 USING 'field1' '0' '1'.
ELSEIF R4 = 'X'.
Perform Screen_opt_name2 USING 'field2' '0' '1'.
ENDIF.
ENDCASE.
Thanks,
Pavan.
06-17-2009 6:03 AM
Hi Pavan,
ASE SY-UCOMM.
WHEN 'F_AT'.
IF R1 = 'X'.
Perform screen_opt_grp USING 'G1' '0' '1'.
ELSE.----
> Try giving r2 = 'X' in the elseif condition
Perform screen_opt_grp USING 'G1' '1' '0'.
ENDIF.
WHEN 'F_MOP'.
IF R3 = 'X'.
Perform screen_opt_grp2 USING 'G2' '0' '1'.
ELSEIF R5 = 'X'.
Perform Screen_opt_name1 USING 'field1' '0' '1'.
ELSEIF R4 = 'X'.
Perform Screen_opt_name2 USING 'field2' '0' '1'.
ENDIF.
ENDCASE.
06-17-2009 6:04 AM
Hi,
I think the problem is that when you are selecting the radio button from the other group the PBO is called again and its getting refreshed.
If the code you have written in the perform is correct then write the perform statement written for F_AT
again in F_MOP. I have faced a similar problem before and got it solved. Hope it even works for you.
CASE SY-UCOMM.
WHEN 'F_AT'.
IF R1 = 'X'.
Perform screen_opt_grp USING 'G1' '0' '1'.
ELSE.
Perform screen_opt_grp USING 'G1' '1' '0'.
ENDIF.
WHEN 'F_MOP'.
IF R1 = 'X'.
Perform screen_opt_grp USING 'G1' '0' '1'.
ELSE.
Perform screen_opt_grp USING 'G1' '1' '0'.
ENDIF.
IF R3 = 'X'.
Perform screen_opt_grp2 USING 'G2' '0' '1'.
ELSEIF R5 = 'X'.
Perform Screen_opt_name1 USING 'field1' '0' '1'.
ELSEIF R4 = 'X'.
Perform Screen_opt_name2 USING 'field2' '0' '1'.
ENDIF.
ENDCASE.
Let me know in case of any problem.
Thanks,
Sri.
06-17-2009 6:21 AM
06-17-2009 5:53 AM
Hi Pavan,
Just try the below code:
loop at screen.
if p_rad2 eq 'X' and screen-group1 = 'G2'.
screen-active = 0.
screen-invisible = 1.
endif.
modify screen.
endloop.
Best of luck!!
Regards
Ravi