10-09-2007 1:34 AM
Hai All,
1)In screen painter I grouped 3 Radio buttons by edit-grouping-radio button group-define. When I execute using the transaction code....Only one radio button is getting enable. When I click on other button its not getting activated. Plz help me out......
2)I have given the function code the same for all the grouped buttons. How to use these radio buttons in coding......
10-09-2007 1:48 AM
10-09-2007 1:56 AM
WHEN 'RAD'.
IF 'CUSTOMER' = 'X'.
MESSAGE I000(0) WITH 'FIRST BUTTON'.
ELSEIF 'SALES' = 'X'.
MESSAGE I000(0) WITH 'SECOND BUTTON'.
ENDIF.
10-09-2007 2:04 AM
Hi!
Check in the screen painter if the 2 radio buttons are enabled , try to create the abap variables this way:
data: p_rbutton1 type xfeld value 'X',
p_rbutton2 type xfeld,
p_rbutton3 type xfeld.
The radio buttons in the screen painter need to have the same name as the variables.
To use radio buttons in coding you can use this variables, ie.:
if p_rbutton1 = 'X'.
coding....
elseif p_rbutton2 = 'X'.
coding...
elseif p_rbutton3 = 'X'.
coding...
endif.
Hope it helps.
Regards,
John.
10-09-2007 2:13 AM
Hi Lakshmi, Check this sample program from ABAPDOCU - demo_dynpro_check_radio.
This shows of how to use radiobuttons as well as checkbox.
Regards
Gopi
10-09-2007 4:13 AM
try this code
<b>PARAMETERS:
p_r1 RADIOBUTTON GROUP rb1 DEFAULT 'X',
p_r2 RADIOBUTTON GROUP rb1,
p_r3 RADIOBUTTON GROUP rb1.
IF p_r1 EQ 'X'.
MESSAGE I000(0) WITH 'FIRST BUTTON'.
ELSEIF p_r2 EQ 'X'.
MESSAGE I000(0) WITH 'SECOND BUTTON'.
ELSEIF p_r3 EQ 'X'.
MESSAGE I000(0) WITH 'THIRD BUTTON'.
ENDIF.</b>
By default first will be selected but when you select second first will be get free
Rewards if useful...............
Minal
10-10-2007 1:26 PM
Hai all,
Thanks a lot for you suggestions. I got the result in the way you said........
Lakshmi