code pal for ABAP > CALL METHOD Usage Check
This check verifies the usage of the CALL METHOD
ABAP statement. It is preferable to call a method dynamically instead of via this statement: CALL METHOD. In other words, prefer a functional instead of a procedural call.
It checks the usage of CALL METHOD
statement in the code.
Change the long method calls using CALL METHOD
statement to short method calls using parenthesis notation (dynamic call).
In exceptional cases, you can suppress this finding by using the pseudo comment "#EC CALL_METH_USAGE
which has to be placed after the CALL METHOD
statement:
CALL METHOD method_name. "#EC CALL_METH_USAGE
Before the check:
DATA(class) = NEW object( ).
CALL METHOD class->method.
After the check:
DATA(class) = NEW object( ).
class->method( ).