Changing screen fields on radio button selection

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.

How to do it...

For creating the program, proceed as follows:

  1. First, three radio buttons show, no_show, and no_input, are defined. These are assigned to the radio button group g1. The user command, INT1, is assigned.
  2. Next, an integer is defined with the addition, modif id INT.
  3. The AT SELECTION-SCREEN output event is then defined. A loop is run at the screen table. Within ...

Get SAP ABAP Advanced Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.