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

regarding radio button in module pool

Former Member
0 Likes
928

Hi

Im using a radio button group in my program.I need to get the name of the radio button checked .How can I do this.

Hi

Im using a radio button group in my program.I need to get the name of the radio button checked .How can I do this.

6 REPLIES 6
Read only

Former Member
0 Likes
897

Hi,

try this:


PARAMETERS:       x_RD1 RADIOBUTTON GROUP PRI1 default 'X'.
PARAMETERS:       x_RD2 RADIOBUTTON GROUP PRI1.
PARAMETERS:       x_RD3 RADIOBUTTON GROUP PRI1.
PARAMETERS:       x_RD4 RADIOBUTTON GROUP PRI1.
PARAMETERS:       x_RD5 RADIOBUTTON GROUP PRI1.
*
start-of-selection.
if x_RD1 = 'X'. write: / 'RD_1'. endif.
if x_RD2 = 'X'. write: / 'RD_2'. endif.
if x_RD3 = 'X'. write: / 'RD_3'. endif.
if x_RD4 = 'X'. write: / 'RD_4'. endif.
if x_RD5 = 'X'. write: / 'RD_5'. endif.
end-of-selection.

regards, Dieter

Read only

0 Likes
897

Hi

I have declared those radiobuttons as a group.Can I do it with a single statement .

Read only

0 Likes
897

hi,

what do you mean by single statement?

the if-clause?

Regards, Dieter

Read only

0 Likes
897

Hi

Can I do it by using single IF statement.

Read only

0 Likes
897

Hi,

try this:


  IF      X_RD1 = 'X'. WRITE: / 'RD_1'. 
  elseif  X_RD2 = 'X'. WRITE: / 'RD_2'.
  elseif  X_RD3 = 'X'. WRITE: / 'RD_3'.
  elseif  X_RD4 = 'X'. WRITE: / 'RD_4'.
  elseif  X_RD5 = 'X'. WRITE: / 'RD_5'.
  endif.

regards, Dieter

Read only

0 Likes
897

Hi,

problem solved?

regards, Dieter