code pal for ABAP > Documentation > Boolean Input Parameter
Usage of boolean input parameters because they are often an indicator that a method does two things instead of one.
Ps: Setter methods using boolean variables are ok.
Splitting the method may simplify the methods' code and describe the different intentions better.
You can suppress Code Inspector findings generated by this check using the pseudo comment "#EC BOOL_PARAM
.
The pseudo comment has to be placed after the method declaration.
METHODS update IMPORTING do_save TYPE abap_bool. "#EC BOOL_PARAM
Before the check:
METHODS update IMPORTING do_save TYPE abap_bool.
After the check:
METHODS update_without_saving.
METHODS update_and_save.