Skip to content

Avoid obscuring built-in functions

Within a class, a built-in function is always obscured by methods of the class if they have the same name, regardless of the number and type of arguments in the function. The function is also obscured regardless of the number and type of method parameters. Built-in functions are, for instance, condense( ), lines( ), line_exists( ), strlen( ), etc.

"anti-pattern
METHODS lines RETURNING VALUE(result) TYPE i.    
METHODS line_exists RETURNING VALUE(result) TYPE i.  
"anti-pattern 
CLASS-METHODS condense RETURNING VALUE(result) TYPE i.   
CLASS-METHODS strlen RETURNING VALUE(result) TYPE i.  

Read More in Built-In Functions - Obscuring with Methods.

From SAP/styleguides under CC BY 3.0 — more details
Last updated on