Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Radio Buttons in screen painter

Former Member
0 Kudos

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......

6 REPLIES 6

Former Member
0 Kudos

Hi Lakshmi,

Can you paste your code.

Regards,

Atish

0 Kudos

WHEN 'RAD'.

IF 'CUSTOMER' = 'X'.

MESSAGE I000(0) WITH 'FIRST BUTTON'.

ELSEIF 'SALES' = 'X'.

MESSAGE I000(0) WITH 'SECOND BUTTON'.

ENDIF.

Former Member
0 Kudos

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.

gopi_narendra
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hai all,

Thanks a lot for you suggestions. I got the result in the way you said........

Lakshmi