SAP Tutorials Blog


Comparison Operators

Let’s discuss the various types of comparison operators for different operands.


S.No. Comparison Operator & Description

1

= (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.


2

<> (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.


3

> (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.


4

< (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.


5

>= (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.


6

<= (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.


7

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.


8

IS INITIAL


The condition becomes true if the contents of the variable have not changed and it has been automatically assigned its initial value. Example (A IS INITIAL) is not true


9

IS NOT INITIAL


The condition becomes true if the contents of the variable have changed. Example (A IS NOT INITIAL) is true.



Serkan AKKAVAK

Computer Engineer BSc

SAP Department Manager

Contact : serkurumsal@yandex.com