Arithmetic Operators in SAP ABAP
Arithmetic Operators are used to perform basic operations in mathematics that are used in algebra, Here we are sharing you a list of arithmetic operators in SAP ABAP. Basic mathematical operations in SAP ABAP are carried out using arithmetic operators. Addition (+), subtraction (-), multiplication (*), division (/), and modulus (MOD) are some of these operators. Here we are sharing you a table in which every arithmetic operator is discussed in detail.
Operator |
Function |
Order |
---|---|---|
+ |
Adds the operands |
From left to Right |
– |
Subtract the operands |
From left to Right |
* |
Multiply the operands |
From left to Right |
/ |
Divide the left operand by the right operand |
From left to Right |
DIV |
integer parts after the division of the left operand by the right operand |
From left to Right |
MOD |
Positive remainder of the division of the left operand by the right; |
From left to Right |
** |
Raises the left Operand to the right Operand |
From Right to left |
Let’s examine an example:
DATA: num1 TYPE I VALUE 10,
num2 TYPE I VALUE 5,
result TYPE I.
result = num1 + num2. " Addition
result = num1 - num2. " Subtraction
result = num1 * num2. " Multiplication
result = num1 / num2. " Division
result = num1 MOD num2. " Modulus
Output:
15
5
50
2
0
Operators in SAP ABAP
High-level programming languages like SAP ABAP (Advanced Business Application Programming) are used to create apps in the SAP environment. Operators are essential for the execution of many different operations in SAP ABAP, ranging from straightforward arithmetic computations to complex logical analyses. This article will examine the various SAP ABAP operator types and offer examples to show how to use them.
Table of Content
- SAP ABAP Operators
- Arithmetic Operators in SAP ABAP
- Comparison/ Relational Operators in SAP ABAP
- Bitwise Operators in SAP ABAP
- Character String in SAP ABAP
- Automatic Type Adjustment in SAP ABAP
- String Operators in SAP ABAP
- FAQS on Operators in SAP ABAP: