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

radiobutton and checkboxes in modulepool

Former Member
0 Likes
894

Hi all,

I have drag and dropped 3 radiobuttons and 3 checkboxes in the layout.

My requirement is if i selected the first radio button first checkbox should be checked likewise the rest.

When i tried to execute it is displaying all the radiobuttons checked..im unable to select any radiobutton..how to set the properties in layout so that only one radiobutton can be selected at a time..pls help me out.

regards

swapna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
849

Hi,

IN the layout of that screen,

select the three radio button and go to menu options

Edit -> Grouping -> radio buttons -> define.

Now these radio buttons will work properly.

Regards,

Venkatesh

Hi,

IN the layout of that screen,

select the three radio button and go to menu options

Edit -> Grouping -> radio buttons -> define.

Now these radio buttons will work properly.

Regards,

Venkatesh

6 REPLIES 6
Read only

Former Member
0 Likes
850

Hi,

IN the layout of that screen,

select the three radio button and go to menu options

Edit -> Grouping -> radio buttons -> define.

Now these radio buttons will work properly.

Regards,

Venkatesh

Read only

0 Likes
849

Hi Swapna,

Select all your Radio buttons & right click and

assign them to a grouping-> radiobuttons -> define.

Thanks & Regards,

Dileep .C

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
849

Hi,

select all the radiobuttons --> right click --> define --> group.

Take the function group of all radiobuttons as CS and function type as S .

And use code in PAI:-


module user_command_8001.
  if rad1 = 'X'
    chk1 = 'X'.
    chk2 = ' '.
    chk3 = ' '.
  elseif rad2 = 'X'
    chk1 = ' '.
    chk2 = 'X'.
    chk3 = ' '.
  elseif rad3 = 'X'
    chk1 = ' '.
    chk2 = ' '.
    chk3 = 'X'.
  endif.
endmodule.

Hope this helps you.

Regards,

Tarun

Edited by: Tarun Gambhir on Feb 27, 2009 11:33 AM

Read only

Former Member
0 Likes
849

Hi Swapna,

Group all 3 buttons together and set one of the button as default.

Then to tick checkbox, write code in PAI.

Let me know if you want more details.

Regards,

Anil

Read only

Former Member
0 Likes
849

hi Swapna,

If selected the first radio button first checkbox should be checked likewise the rest.

Following code may be useful for the same:

if Rad1 ='X'.

LOOP AT SCREEN.

IF( screen-name = 'chk-box-2' "name ur giving in screen

or screen-name = 'chk-box-3' )

screen-active = '0'.

screen-input = 0.

screen-output = 0.

screen-invisible = 1. " It will make chk box invisible

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endif.

Thanks

Shrila

Read only

RaymondGiuseppi
Active Contributor
0 Likes
849

The radiobutton must be grouped, in each group one and only one radiobutton is on, call screen painter, select every radiobutton and right-click, there is an option to group the radiobuttons. ([Graphical Layout Editor|http://help.sap.com/saphelp_nw70/helpdata/EN/d1/801b77454211d189710000e8322d00/frameset.htm])

Regards