‎2008 Mar 16 3:07 PM
hi,
i have 4 radio buttons in my selection screen.
ex 1,2,3,4.
i want to click if 1 , then 3 should automatically active state,
same when i click radiobutton 2, 4 will come.
how to do this ....???
please help,
yours regards
subhasis
‎2008 Mar 16 3:44 PM
Hi Subhashis,
If your radio buttons is in the same group then u cant do this. Because in one group u can select only one radio button at any time.
If first 2 are in group1 and last 2 are in group2 then U can do like this. Copy paste this code in ur system and check the functionality.
SELECTION-SCREEN: BEGIN OF BLOCK BLK1 WITH FRAME.
PARAMETER: P_RADIO1 RADIOBUTTON GROUP GRP1 USER-COMMAND ucomm DEFAULT 'X',
P_RADIO2 RADIOBUTTON GROUP GRP1.
SELECTION-SCREEN: END OF BLOCK BLK1.
SELECTION-SCREEN: BEGIN OF BLOCK BLK2 WITH FRAME.
PARAMETER: P_RADIO3 RADIOBUTTON GROUP GRP2 USER-COMMAND ucomm,
P_RADIO4 RADIOBUTTON GROUP GRP2.
SELECTION-SCREEN: END OF BLOCK BLK2.
AT SELECTION-SCREEN OUTPUT.
IF p_radio1 EQ 'X'.
CLEAR: p_radio4.
p_radio3 = 'X'.
ELSEIF p_radio2 EQ 'X'.
CLEAR: p_radio3.
p_radio4 = 'X'.
ENDIF.
thanks,
Vinod.
‎2008 Mar 17 5:31 AM
hi,
Try this code.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER: p_radio1 RADIOBUTTON GROUP grp1 USER-COMMAND ucomm1 DEFAULT
'X',
p_radio2 RADIOBUTTON GROUP grp1 .
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.
PARAMETER: p_radio3 RADIOBUTTON GROUP grp2 ,
p_radio4 RADIOBUTTON GROUP grp2.
SELECTION-SCREEN: END OF BLOCK b2.
AT SELECTION-SCREEN.
IF p_radio1 = 'X'.
CLEAR p_radio4.
p_radio3 = 'X'.
ELSE.
IF p_radio2 = 'X'.
CLEAR p_radio3.
p_radio4 = 'X'.
ENDIF.
ENDIF.
‎2008 Mar 17 5:40 AM
Hi,
Radio buttons can work under group.
if all the four radio buttons are created in one group then we can't achieve your reqirement.
see when we go for radio button?
if we want to select a particular branch or particular area like suppose you are book one flight ticket.
now you have two radio buttions.
one is one way trip
and another one is round trip.
if you select round trip then you will not get this one way trip.
that will gray out.
like this the radio buttions will work under one group.
regards,
swami.
‎2008 Mar 17 6:47 AM
hi
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER: p_radio1 RADIOBUTTON GROUP grp1 USER-COMMAND ucomm1 DEFAULT
'X',
p_radio2 RADIOBUTTON GROUP grp1 .
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.
PARAMETER: p_radio3 RADIOBUTTON GROUP grp2 ,
p_radio4 RADIOBUTTON GROUP grp2.
SELECTION-SCREEN: END OF BLOCK b2.
AT SELECTION-SCREEN.
IF p_radio1 = 'X'.
CLEAR p_radio4.
p_radio3 = 'X'.
ELSE.
IF p_radio2 = 'X'.
CLEAR p_radio3.
p_radio4 = 'X'.
ENDIF.
ENDIF.
reward if useful
‎2011 Apr 28 9:11 PM