+ -

Pages

Saturday, July 26, 2014

Validation of selection screens


Validation of selection screen can be performed in the AT SELECTION SCREEN event.

Example:

************************************************************************
* AT SELECTION SCREEN                                                  *
************************************************************************
at selection-screen.
  perform validate_selection_screen using g_returkode.
  if g_returkode = c_returkode_error.

    exit.
  endif.

*&---------------------------------------------------------------------*
*&      Form  validate_selection_screen
*&---------------------------------------------------------------------*
*       Validation of selection screen
*----------------------------------------------------------------------*
*      -->P_G_RETURKODE  text
*----------------------------------------------------------------------*
form validate_selection_screen using    p_returkode.

  if s_framd > 12 or s_framd < 1 or s_tilmd > 12 or s_tilmd < 1.
     message e998.
     p_returkode = c_returkode_error.
     exit.
  endif.
  if s_framd > s_tilmd.
     message e997.
     p_returkode = c_returkode_error.
     exit.
  endif.

  if s_fraaar < s_tilaar.
     message e996.
     p_returkode = c_returkode_error.
     exit.
  endif.

ENDFORM.
5 ABAP Tips: Validation of selection screens Validation of selection screen can be performed in the AT SELECTION SCREEN event. Example: **********************************************...

No comments:

Post a Comment

< >