Search on this Website

Wednesday, June 18, 2008

Selection Screen Radio Buttons,Check Box Syntax


Parameters can be created as data fields that contain only one input value and they can also be created as check boxes. When Parameters take the form of check boxes, they are declared as type C and hold the value of X when checked and space when unchecked. A good use of the checkbox parameter is to prompt the user to signal if they want certain components of a report to be displayed.

Syntax for selection-screen checkbox
The following is the syntax for a parameter that appears as a checkbox:



parameters: testparm as checkbox default 'X'.

In this example, the initial value is set to checked, or X for the logical processing of the program. Check boxes, unlike radio buttons, are not mutually exclusive so the user can have as many boxes checked as are generated on the selection screen.

As you have learned, the parameter statement is best utilized when soliciting a single input value. If the input required is better represented in a range of values, the select-options statement is a more efficient field to use.

The select-options statement generates an internal selection table that contains the input for the attributed field entries.

Selection Screen checkbox

Parameters can be created as data fields that contain only one input value and they can also be created as check boxes. When Parameters take the form of check boxes, they are declared as type C and hold the value of X when checked and space when unchecked. A good use of the checkbox parameter is to prompt the user to signal if they want certain components of a report to be displayed.

Syntax for selection-screen checkbox
The following is the syntax for a parameter that appears as a checkbox:

parameters: testparm as checkbox default 'X'.

In this example, the initial value is set to checked, or X for the logical processing of the program. Check boxes, unlike radio buttons, are not mutually exclusive so the user can have as many boxes checked as are generated on the selection screen.

As you have learned, the parameter statement is best utilized when soliciting a single input value. If the input required is better represented in a range of values, the select-options statement is a more efficient field to use.


The select-options statement generates an internal selection table that contains the input for the attributed field entries.

The following is the syntax for a radiobutton parameter group:

selection-screen begin of block rad_blk with frame title text-000.
parameters: rad_ex1 radiobutton group one,
rad_ex2 radiobutton group one,
rad_ex3 radiobutton group one.
selection-screen end of block rad_blk.

This example generates a group of three parameters as radio buttons. As you can see, these radio buttons are grouped in one block on the screen. This is good programming practice as it helps the user to realize that they all belong to the same input request group. These parameters are best utilized to select a single value from a multiple option setting and must contain at least two buttons per group.

Only one of these three example buttons can be checked at runtime due to its inclusion in group one. Data integrity is maintained because this is a great way to solicit mutually exclusive input from the user. This will be further demonstrated in the following section where there is an example of a simple selection screen that utilizes many selection screen elements that you have learned about.


No comments: