In this recipe, we will see how input fields may be hidden and shown, based on the input of the radio buttons. We will create a program having a selection screen containing a group of two radio buttons and an integer field. We will then add the code that will hide or display the integer field based on which a radio button is selected.
For creating the program, proceed as follows:
First, three radio buttons
show
,no_show
, andno_input
, are defined. These are assigned to the radio button groupg1
. The user command,INT1
, is assigned.Next, an integer is defined with the addition,
modif id INT
.The
AT SELECTION-SCREEN output
event is then defined. A loop is run at thescreen
table. Within the loop, thegroup1
of each screen element is checked forINT
. In addition, ifshow
is equal toX
, theactive
field is set as1
(active). Ifno_show
is equal toX
, theactive
field is set as0
(inactive). In caseno_input
equals toX
, theinput
field...