code pal for ABAP > Documentation > Boolean Input Parameter
This check searches for boolean input parameters in method signatures. These parameters could be an indicator that the single-responsibility principle (SRP) is not followed since the method might be doing several things at once.
Setter methods using boolean input variables are acceptable when the variable being set is a boolean.
Splitting the method may simplify its code and provide a better description for the consumer.
In exceptional cases, you can suppress this finding by using the pseudo comment "#EC BOOL_PARAM
which 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_commit.