abapOpenChecks - Installation - Checks - Utilities - Links

CHECK_34 - Large WHEN construct

Large number of lines within WHEN construct, refactor code

CASE lv_foo.
  WHEN 'BAAR'
    ...
    code
    ...
ENDCASE.

can be transformed to the following, it will become easier to get an overview of the CASE

CASE lv_foo.
  WHEN 'BAAR'
    PERFORM foobar.
ENDCASE.

FORM foobar.
  ...
  code
  ...
ENDFORM.

Configuration

Configuration