radiobutton

The radiobutton command is used to create and modify radiobuttons in SAP.

Like pushbuttons, radiobuttons are used to simplify the user interface. Radiobuttons can be used for many purposes, such as replacing a set of input fields with default data sets. Users can employ radiobuttons to specify various fields and values that will be populated when the user selects the radiobutton. The syntax is as follows:

radiobutton([row,col], 'DisplayName', {"option":value…});

To refer to a field on the same screen, users can specify that field in the radiobutton as shown below:

radiobutton([row,col], "DisplayName", {"F[field_name]":"value"});

Radiobuttons have two possible states that can be associated with them, as follows:

These states can be used to determine which value will be passed, as will be demonstrated in the examples.

Options

The radiobutton command takes the following options:

default

Sets the radiobutton on which this option is used as the default. If the 'default' option is used, setting a radiobutton or a checkbox as the default on a given screen will automatically deactivate the other checkboxes or radiobutton in that grouping. The syntax is as follows:

{"default":true}
name

Enables users to assign a GuiXT name to a radio button. This name can then be used to refer to the radiobutton. This syntax is as follows:

{"name":"z_radiobutton"}
readonly

Specifies that a radiobutton is uneditable, or read-only. This is useful if a particular option is not intended for use.

{"readonly":true}
value

Assigns a value to a given radiobutton. This is very useful when assigning field values to radiobuttons or for passing parameters to other screens. The syntax is as follows:

{"value":"value"}