Application Development and Automation 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: 
Read only

Using Radio button

former_member671224
Participant
0 Likes
641

Hi gurus,

Plz explain how to use Radio buttons in Module pool programming.

I grouped the Radion buttons but the function code was becoming same for all radio buttons. Based on the selected radio button i want to go further. give some suggestions to do it..

Thanks ,

Amal.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
608

Hi,

The function code shoub be same for all the Radio buttons, you need to write the code like this

CASE SY-UCOMM.
WHEN 'RAD'    " Radio button Function code
 IF RAD1 = 'X'.   " First Radio button group selected
   Write the code Here
 ELSEIF RAD2 = 'X'.    " " Second Radio button group selected
    Write the code Here
 ELSEIF RAD3 = 'X' .   " " Thisr Radio button group selected
    Write the code Here
 ENDIF.

OTHERS
ENDCASE.

Regards

Sudheer

5 REPLIES 5
Read only

Former Member
0 Likes
608

You have to distinguish the radiobuttons based on the ir names

Say the names of them are RADIO1 , RADIO2 and RADIO3,

you have to use

if RADIO1 eq 'X'.

Read only

Former Member
0 Likes
609

Hi,

The function code shoub be same for all the Radio buttons, you need to write the code like this

CASE SY-UCOMM.
WHEN 'RAD'    " Radio button Function code
 IF RAD1 = 'X'.   " First Radio button group selected
   Write the code Here
 ELSEIF RAD2 = 'X'.    " " Second Radio button group selected
    Write the code Here
 ELSEIF RAD3 = 'X' .   " " Thisr Radio button group selected
    Write the code Here
 ENDIF.

OTHERS
ENDCASE.

Regards

Sudheer

Read only

0 Likes
608

Hi sudheer,

Do i want to declare the name of the radio button seperately in the program?

B'cuz , If i check the Radio button its showing that RAD2 is not define in DATA Statement. but i have given the radio button name in screen.

Read only

0 Likes
608

Hi amal,

Yes you have to declare them in ur program

parameters : rad1 radiobutton group rad...

Read only

0 Likes
608

Thanks Sudheer and Chandrasekar.