DATA: flag TYPE c.
DO 2 TIMES.
  PERFORM sub_display.
ENDDO.
WRITE:/ 'After Perform Statement'.

*&---------------------------------------------------------------------*
*&      Form  sub_display
*&---------------------------------------------------------------------*
FORM sub_display.
  WRITE:/ 'Before Check Statement'.

  CHECK flag NE 'X'.
  WRITE:/ 'Check Passed'.
  flag = 'X'.
ENDFORM.                    " sub_display
 
 
  
Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant