Comparison operators are very important operators in SAP ABAP, these are used to compare variables of different types like comparing numbers, characters, strings, dates etc, below are the list of operators available in SAP ABAP.
Comparison | Operator Description |
---|---|
= (equality test). Alternate form is EQ. | Checks if the values of two operands are equal or not, if yes then condition becomes true. Example: (A = B) is not true. |
<> (Inequality test). Alternate form is NE. | Checks if the values of two operands are equal or not. If the values are not equal then the condition becomes true. Example: (A <> B) is true. |
> (Greater than test). Alternate form is GT. | Checks if the value of left operand is greater than the value of right operand. If yes then condition becomes true. Example: (A > B) is not true. |
< (Less than test). Alternate form is LT. | Checks if the value of left operand is less than the value of right operand. If yes, then condition becomes true. Example: (A < B) is true. |
>= (Greater than or equals) Alternate form is GE. | Checks if the value of left operand is greater than or equal to the value of right Operand. If yes, then condition becomes true. Example: (A >= B) is not true. |
<= (Less than or equals test). Alternate form is LE. Checks if the value of left operand is less than or equal to the value of right operand. If yes, then condition becomes true. Example: (A <= B) is true. | |
a1 BETWEEN a2 AND a3 (Interval test) | Checks whether a1 lies in between a2 and a3 (inclusive). If yes, then the condition becomes true. Example: (A BETWEEN B AND C) is true. |
IS INITIAL | The condition becomes true if the contents of the variable have not changed and it has been automatically assigned its initial value. |
The SAP is a market leader for CRM and enterprise options which permits easy and global integration of industry strategies, creating a more efficient work environment and giving customers the actual-time knowledge thereby lowering the possibility of errors and redundant understanding. https://dynamoinfotech.com