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: 

regading radiobuttons

Former Member
0 Kudos
83

hai guys,

if i want two blocks in selection-screen and in 1st block i need two radio buttons and in 2nd block one radio button.then if i take different radio button groups it is giving syntax error as 2nd radio button group has only one parameter.can anybody give solution for this.of course if i take only one radio button group then it is giving syntax error as alresdy 1st block has delared with the radio buttons.

if u want plz check my code also.

SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME.

SELECTION-SCREEN BEGIN OF BLOCK blk3 WITH FRAME TITLE text-006.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 1.

PARAMETERS: p_rad1 TYPE c RADIOBUTTON GROUP grp1 USER-COMMAND urad.

SELECTION-SCREEN COMMENT 5(15) text-008 FOR FIELD p_lofile.

SELECTION-SCREEN POSITION 15.

PARAMETERS: p_lofile LIKE filename-fileintern.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 1.

PARAMETERS: p_rad2 TYPE c RADIOBUTTON GROUP grp1 DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(15) text-009 FOR FIELD p_infile.

SELECTION-SCREEN POSITION 15.

PARAMETERS : p_infile LIKE rlgrap-filename default

'ZS_SESAM_SEND_EDI'.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK blk3.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF BLOCK blk4 WITH FRAME TITLE text-007.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 1.

PARAMETERS: p_rad3 type c RADIOBUTTON GROUP grp1 default 'X'.

SELECTION-SCREEN COMMENT 5(15) text-011 FOR FIELD p_lfile.

SELECTION-SCREEN POSITION 15.

PARAMETERS : p_pfile LIKE rlgrap-filename.

PARAMETERS: p_lfile LIKE filename-fileintern.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK blk4.

SELECTION-SCREEN END OF BLOCK blk2.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
50

Hi,

What's the point in having the second radio-button group if it only has one radio button? You can't turn it on or off so there is no point it being no the selection screen.

If you want to turn it on or off use a checkbox instead.

Gareth.

6 REPLIES 6

Former Member
0 Kudos
51

Hi,

What's the point in having the second radio-button group if it only has one radio button? You can't turn it on or off so there is no point it being no the selection screen.

If you want to turn it on or off use a checkbox instead.

Gareth.

Former Member
0 Kudos
50

declare 2 radio buttons in the second radio button group also

and disable one radio button ...

at selection-screen output.

loop at screen.

if screen-name = 'P_RAD4'. <-- disable a radio button

screen-active = 0.

endif.

modify screen.

endloop.

0 Kudos
50

>

> declare 2 radio buttons in the second radio button group also

> and disable one radio button ...

>

>

>

> at selection-screen output.

>

> loop at screen.

>

> if screen-name = 'P_RAD4'. <-- disable a radio button

> screen-active = 0.

> endif.

>

> modify screen.

> endloop.

What's the point in that though?! You still end up with a radio-button that does nothing...

To the OP, I'm guessing you want to allow the user to switch processing between the options in the first box and those in the second box. In that case, why not put two radio-buttons outside of the boxes and control them with that. So you have a radio-button that selects blk3 and another that selects blk4 and inside blk3 you have your two existing radio buttons and insde blk4 you won't need any radio buttons.

Gareth.

Former Member
0 Kudos
50

Hi mahesh,

For u r requirement Check box is suitable.

if u still want radio button means try to put two radio buttons in one group.

Regards.

Eshwar.

vinod_vemuru2
Active Contributor
0 Kudos
50

Hi,

U can't have the single radio buttons group in different blocks.

Similarly u can't have a single radiobutton in a group.

There should be at least 2 radiobuttons in a group.

Logically there is no meaning in declaring single radio button. Because radio button act as a group. So at a time u can select only one.

U can use check box in second block. If it is mandatory that u have to select one of three then 2 solutions.

1. Declare all in single block.

2. Have 3 check boxes. 2 in block1 and 1 in block. Do the necessary validations so that if one check box is selected then if the user selects other check box then issue error message saying he already selected one check box.

Hope the concept is clear now.

Thanks,

Vinod.

Former Member
0 Kudos
50

thanks for ur response