Start of Content Area

Defining Radio Buttons  Locate the document in its SAP Library structure

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 ' '.

Example

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'.

The selection screen looks as follows:

This graphic is explained in the accompanying text

Radio buttons R1, R2 and R3 form group RAD1, while S2, S2 and S3 form group RAD2. On the selection screen, R2 and S3 are selected, while all others are not.