Avoid Method Names That Overwrite Built-in Functions
WarningAnti-Patterns & Bad Practices#EC NO_OVERW_BUILTINRemote Enabled
Overview
Method name overwrites built-in SAP function.
ATC Finding Message:
Method name overwrites built-in SAP function name
Rationale
Naming a method LINES, STRLEN, or XSDBOOL shadows a well-known built-in and makes the call site ambiguous. Readers cannot tell whether the built-in or the method is intended. Use a descriptive verb that does not collide with language functions.
Non-Compliant
abap
METHODS matches
RETURNING VALUE(rv_result) TYPE abap_bool.Compliant
abap
METHODS matches_pattern
RETURNING VALUE(rv_result) TYPE abap_bool.Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC NO_OVERW_BUILTIN
" SAP CI_ prefix format:
... "#EC CI_NO_OVERW_BUILTINTechnical Details
- Native ATC Class:
ZCL_SKYLINT_NO_OVERW_BUILTIN - Implementation File: zcl_skylint_no_overw_builtin.clas.abap