ABAP Keyword Documentation → ABAP − Reference → Program Flow Logic → Expressions and Functions for Conditions → log_exp - Logical Expressions → rel_exp - Comparison Expressions → rel_exp - Relational Operators → rel_exp - Relational Operators for All Data Types
rel_exp - Binary Relational Operators
||Equal: True if the value of
||Not Equal: True if the value of
||Less Than: True if the value of
||Greater Than: True if the value of
||Less Equal: True if the value of
||Greater Equal: True if the value of
The values are compared in accordance with the comparison rules.
- The operators
>=are equivalent to
GErespectively. It is recommended that only one of these types of operator is used within the same program. If in doubt, the variant with the characters
<, and > is considered to be more up-to-date, however this also overloads these characters. Relational operators that consist of two letters, on the other hand, are better suited to other relational operators such as
CN, and so on, which have no alternative forms.
- Due to the comparison rules, the size comparisons shown here are not suitable for determining the textual order of character-like data objects.
- The obsolete forms
=>of relational operators may still appear outside of classes.
Logical expression as a termination condition of an unlimited
CONSTANTS limit TYPE i VALUE 1000. DATA variable TYPE i. ... DO. IF variable > limit. EXIT. ENDIF. ... ENDDO.