abapOpenChecks - Installation - Checks - Utilities - Links

CHECK_27 - Last statement is RETURN

Improve this page
RFC enabled
CODE

Remove the RETURN statement, and the program will work the same.

...
  IF p_subrut[] IS INITIAL.
    WRITE: / 'foobar'.
    RETURN.
  ENDIF.
ENDFORM.

Can be reduced to

...
  IF p_subrut[] IS INITIAL.
    WRITE: / 'foobar'.
  ENDIF.
ENDFORM.

Last statement is CLEAR or FREE

...
  DATA(bar) = `ABCD`.
  ...
  CLEAR bar.
ENDFORM.

Can be reduced to

...
  DATA(bar) = `ABCD`.
  ...
ENDFORM.

Last statement is CHECK or EXIT

...
  DATA(foo) = `foo`.
  DATA(bar) = `bar`.
  CHECK foo = bar.
ENDFORM.

Can be reduced to

...
  DATA(foo) = `foo`.
  DATA(bar) = `bar`.
ENDFORM.

Configuration

Configuration