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

Radio buttons in module pool program

Former Member
0 Likes
2,945

Hi,

I have created a screen where i have two radio buttons. When i execute the screen, both the radio buttons are checked. My requirement is, by default both radio buttons should not be checked, and later user has to check one. I am new very much new to module pool program. Please suggest me how to do this..

Thanks in advance,

Shyam.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,377

Hi

In screen painter

First select 2 radion buttons then

Go to

Editgrouping-radiobutton grouping---define

Regards

Ramchander Rao.K

Edited by: ramchander krishnamraju on Dec 23, 2008 10:43 AM

9 REPLIES 9
Read only

Former Member
0 Likes
2,377

Hi Shyam,

SAP recommends to add a new radiobutton, say "none", that is checked by default. Then the user has to check one of the other two radiobuttons.

Also remember to group these 3 radiobuttons together, so that the user only checks one of them.

I hope it helps. Kind regards,

Alvaro

Read only

Former Member
0 Likes
2,377

Hi,

Do not place both the radio button not in the group.

Regards,

Naresh

Read only

Former Member
0 Likes
2,378

Hi

In screen painter

First select 2 radion buttons then

Go to

Editgrouping-radiobutton grouping---define

Regards

Ramchander Rao.K

Edited by: ramchander krishnamraju on Dec 23, 2008 10:43 AM

Read only

Former Member
0 Likes
2,377

Hi shyam ,

Do as I say

Now u have 2 Radiobuttons on ur screen say R1 and R2

on the screen layout give the description to both of them .

Now select both R1 and R2 with their descriptions .

and right click on the selected area now at the end of the window which has come out of the right click just click on the option called define radio button group or something like that .

Now u have radiobutton group defined now when u execute the t-code u wont find both the buttons selected .

Thanks

Sahil

Read only

0 Likes
2,377

Hi Sahil,

Thanks for your answer. I did as said by you. Now screen came with first radio button checked. But my requirement is nothing should be cheked.user should select one of them.Also, while coming back from the screen, it throwing an error message saying as 'invalid field format(screen error)'. Could you pls explian me what wrong i did. PLs suggest me..

Thanks,

Shyam.

Read only

0 Likes
2,377

Dear Shyam,

To the best of my knowledge,

As per the SAP architecture at least one radio button is selected even you clear the value in PBO.

This is not possible to have all the radio buttons deselected ( one radio button is selected by default).

This is the same in any programing languages that support radio buttons (This is to the best of my knowldge)

if your problem is solved please close this thread

Best Regards

Ramchander Rao.K

Read only

0 Likes
2,377

Any ideas about the error message "invalid field format(screen error)" on the screen with the radio buttons?

Read only

Former Member
0 Likes
2,377

Hi shyam ,

try this

SELECTION-SCREEN COMMENT 2(6) TEXT_001.

parameter : r_pa type c radiobutton group gr1 user-command mode default 'X',

r_pa1 type c radiobutton group gr1 default 'X'.

Read only

Former Member
0 Likes
2,377

Hello,

Radio buttons are generally used to select only one option of a list. so by default one and only one of the radio button will be selected, then user can select any other radio button which will unselect any other radio button which is selected.

Now your problem is that both the radio buttons are selected, to avoid that you have to group both the radio buttons together.

Select the radio buttons and right click and select group. this group the radio buttons. and only one will be selected at time.