Entering content frameProcessing Radio Buttons Locate the document in its SAP Library structure

In the PAI event of the selection screen, the event

AT SELECTION-SCREEN ON RADIOBUTTON GROUP <radi>

is triggered when the contents of all of the fields in a radio button group are passed from the selection screen to the ABAP program. To define a radio button group <radi>, use the addition RADIOBUTTON GROUP <radi> in the corresponding PARAMETERS statements. This event block allows you to check the whole group. If an error message occurs within this event block, the radio button group is made ready for input again on the selection screen. The individual fields of radio button groups do not trigger the event AT SELECTION-SCREEN ON <field>.

Example

REPORT EVENT_DEMO.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
  PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
              R2 RADIOBUTTON GROUP RAD1,
              R3 RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
  PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
              R5 RADIOBUTTON GROUP RAD2,
              R6 RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN END OF BLOCK B2.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.

  IF R1 = 'X'.
    MESSAGE W040(HB).
  ENDIF.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.

  IF R4 = 'X'.
    MESSAGE W040(HB).
  ENDIF.

If the user does not change one of the radio button groups, a warning is displayed.

This graphic is explained in the accompanying text

 

 

Leaving content frame