Sunday 8 April 2012

AT SELECTION-SCREEN

REPORT ztest.

PARAMETERS: p_field1 TYPE char10,
                          p_field2 TYPE char10,
                          p_field3 TYPE char10,
                          p_field4 TYPE char10.

AT SELECTION-SCREEN.

IF p_field1 IS INITIAL.
  MESSAGE 'Please enter a value in Field1.' TYPE 'E'.
ENDIF.

OUTPUT:










On pressing “ENTER” button or executing the program (F8):













At Selection-Screen On <field> and At Selection-Screen events, both do the same job i.e. validating the input fields present on the selection screen. The only difference is At Selection-screen event is used to validate all the fields on the selection screen where as At Selection-Screen On <field> event is used to validate a particular field in the selection screen.