Checking Input Values 

To check a user entry against a check table or against fixed values in the ABAP Dictionary, you use the following syntax:

PARAMETERS <p> TYPE <type> ... VALUE CHECK ...

In the TYPE addition, the data type of the parameter must refer to a data type from the ABAP Dictionary. Currently, parameters can only refer to fields of database tables, views and structures. If a check table or a list of fixed values is defined in the ABAP Dictionary for the relevant type, the user can only enter these valid values. Otherwise, the system issues an error message in the status bar of the selection screen when the selection screen is processed. Since this check is performed even if the input field is empty, you should use the VALUE CHECK addition only for required fields.

REPORT DEMO.

PARAMETERS P_CARR LIKE SPFLI-CARRID OBLIGATORY VALUE CHECK.

Parameter P_CARR is declared with reference to field CARRID of database table SPFLI. For this field, check table SCARR is specified in the ABAP Dictionary. The user can only enter carrier ID values that are contained in SCARR. The possible entries help of the input field for P_CARR displays the allowed values.