Skip to content

Prefer Symbol Comparison Operators (=, <>, <, >) ​

WarningClean ABAP & Modern SyntaxQuickFix Ready#EC SYMBOL_OPRemote Enabled

Overview ​

Prefer symbolic operators over textual EQ, NE, LT, GT.

ATC Finding Message: Prefer modern comparison operators (=, <>, <, >, <=, >=) over legacy keywords

Rationale ​

Text comparison operators such as EQ, NE, GT, LT, GE, and LE are legacy synonyms for the symbolic operators. Symbols are shorter, match mathematical notation, and are the Clean ABAP standard. Consistent symbols also make boolean expressions easier to scan in conditions and constructor expressions.

Non-Compliant ​

abap
IF lv_total GT 100 AND lv_status NE 'X'.
  process( ).
ENDIF.

Compliant ​

abap
IF lv_total > 100 AND lv_status <> 'X'.
  process( ).
ENDIF.

Automated QuickFix ​

This rule provides an automated QuickFix directly in Eclipse ABAP Development Tools (ADT):

  1. Position the cursor on the flagged statement.
  2. Press Ctrl + 1 (Quick Assist).
  3. Select the automated refactoring to apply the clean syntax immediately.

Suppression ​

To suppress findings for this rule, append the pseudo-comment to the statement:

abap
" Standard pseudo-comment:
... "#EC SYMBOL_OP

" SAP CI_ prefix format:
... "#EC CI_SYMBOL_OP

Technical Details ​

Released under the MIT License.