In the PAI event of the selection screen, the event
AT SELECTION-SCREEN ON <field>
is triggered when the contents of each individual input field are passed from the selection screen to the ABAP program. The input field <field> can be checked in the corresponding event block. If an error message occurs within this event block, the corresponding field is made ready for input again on the selection screen.
The program below is connected to the logical database F1S:
AT SELECTION-SCREEN ON CITY_FR.
IF CARRID-LOW EQ 'AA' AND CITY_FR NE 'NEW YORK'.
If the user enters "AA" in the first input field, but not NEW YORK for the departure city, an error message is displayed in the status line until the user enters the correct city.