Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com


We have different types of operators supported in our programming languages. The most categories of operators are:

1. Arithmetic operator

2. Comparison operator

3. Logical operator

4. Assignment operator

5. Conditional operators

Arithmetic operators:



Assume that variable A holds the value 10 and Variable B holds value 20:


Here while writing the output I have concatenated the variable to the text using + operator and written the output.

e.g document.write(“Literals are passed within quotations ” + variable );

Note: We don’t have the increment or decrement operator in ABAP, we normally achieve it through a = a + 1;

Assignment operators:


Program Code:


Note: We don’t have any of the assignment operators other than equals to ABAP. All other forms are achieved as in example. e.g a += b; is written as a = a + b.

Comparison operator:


All these operators are similar in usage as with ABAP, except that we don’t use double equal to check the equality between two variable and not equal to operator differs from the normal usage.

Equal to operator:

In javascript, if (a == b);

In ABAP, if a = b.

Not equal to operator:

In Javascript, if (a!= b);

In ABAP if a<>b.

Logical Operators:


We don’t have any of these operators in usage in our ABAP program, Instead we have keyword “AND” for “&&”, “OR” for “||” and “NOT” for “!”.

In javascript, instead of keywords we need to use the symbolic representation. Remaining usage of these operators remains the same as with that of ABAP.

Bitwise Operators:

Bitwise operators are bit advance and will be discussed in later chapters if usage of this operator is required.


Conditional Operators:

The condition operator checks condition and assign value to the variables. If the condition is true then value after question mark is assigned, if condition is false value after colon is assigned.


If the value of x is greater than 18 then old enough will be the value assigned to variable votable.

Note: This operator is similar to that of if…else.. condition in ABAP.

About Arun


Powered by Blogger.