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 button

Former Member
0 Likes
971

Hi

Is it possible to create single radio button in selection screen.

When iam trying to create iam getting error.

Thanks in advance.

8 REPLIES 8
Read only

Former Member
0 Likes
927

hi krk,

if it's radio button then it should be as group that means atleast two or more than that,

if u want single go for check box.

regards,

seshu.

Read only

Former Member
0 Likes
927

Hi

first know the concept of Radiobutton.

Basically to select a single action among multiple choices we have to use a Radiobutton

Means among more than one options to swap between the modes we use radiobuttons

So Single radiobutton creration is meaning less

Unless you have minimum 2 RB's we should not use them

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
927

Hi,

Instead of creating a single radiobutton.Creat single checkbox.

Reward points if it is helpful.

Regards,

Sangeetha.a

Read only

Former Member
0 Likes
927

hi krk,

it is not possible for you to create a single radio button.

u have to create it as a group. minimum 2 radio buttons are needed for a group.

so try with two radio buttons.

Regards...

Arun.

Read only

Former Member
0 Likes
927

hai,

It is not possible to create single radio button . You must use two or more radio button

Thank you

Read only

Former Member
0 Likes
927

Hi,

It is not possible to create single Radio button, we must required atlease two radio buttons to crate a radio button.

To define the input field of a parameter as a radio button, you use the following syntax:

PARAMETERS <p> ...... RADIOBUTTON GROUP <radi>......

Parameter <p> is created with type C and length 1, and is assigned to group <radi>. The maximum length of string <radi> is 4. You can use additions TYPE and LIKE, but you must refer to a field of type C with length 1. You must assign at least two parameters to each <radi> group. Only one parameter per group can have a default value assigned using the DEFAULT addition. The default value must be 'X'. If you do not use the DEFAULT addition, the first parameter of each group ist set to 'X'.

When the user clicks a radio button on the selection screen, the respective parameter is assigned the value 'X', while all other parameters of the same group are assigned the value ' '.

REPORT DEMO.

PARAMETERS: R1 RADIOBUTTON GROUP RAD1,

R2 RADIOBUTTON GROUP RAD1 DEFAULT 'X',

R3 RADIOBUTTON GROUP RAD1,

S1 RADIOBUTTON GROUP RAD2,

S2 RADIOBUTTON GROUP RAD2,

S3 RADIOBUTTON GROUP RAD2 DEFAULT 'X'.

regards,

sudheer.

Read only

Former Member
0 Likes
927

hi,

u can create a single radio button in selection screen that was not a problem,but in ur case u might have declared it in a group that's why it might have given u an error.

it better u go for check button if only one radio button u needs.

Read only

Former Member
0 Likes
927

hi,

Similarly to on screens, where you can define checkboxes and radio buttons with function codes, you can do the same with checkboxes and radio buttons on selection screens. You do this using the USER-COMMAND addition when you declare the relevant parameters:

PARAMETERS ... AS RADIOBUTTON GROUP ... USER-COMMAND <ucom>.

You can assign a function code <ucom> to an individual checkbox. However, a radio button group must have one shared function code, since it is only possible to make the assignment for the first button in the group.

When you select a checkbox or radio button in a group, the runtime analysis triggers the AT SELECTION-SCREEN event and places the function code <ucom> into component UCOMM of the interface work area SSCRFIELDS. You must use the TABLES statement to declare the SSCRFIELDS structure.

After the AT SELECTION-SCREEN event has been processed, the system displays the selection screen again. The only way to exit the selection screen and carry on processing the program is to choose Execute (F8). Consequently, checkboxes and radio buttons with function codes are more suitable for controlling dynamic modifications on a selection screen than for controlling the program flow.

REPORT demo_sel_screen_user_command.

TABLES sscrfields.

PARAMETERS: rad1 RADIOBUTTON GROUP rad USER-COMMAND radio,

rad2 RADIOBUTTON GROUP rad,

rad3 RADIOBUTTON GROUP rad.

AT SELECTION-SCREEN.

MESSAGE i888(sabapdocu) WITH text-001 sscrfields-ucomm.

START-OF-SELECTION.

WRITE text-002.

This program assigns function codes to a radio button group and a checkbox.

regards,

sudheer.