ABAP Arithmetic Statement

  Define Data

Let’s introduce what the arithmetic operators mentioned above can be described as instructions.

CommandMeaning    
ADDAddition
SUBTRACTSubtraction
MULTIPLYMultiplication
DIVIDEDivision

ADD:Addition

First, the variable: result is set to 3, and then 2 is added. Since ADD 2 TO 3 has the same meaning as 3 + 2, 5 is set to the variable: result as a result. The part described as 2 can be described as a variable.

SUBTRACT:Subtraction

First, the variable: result is set to 3, and then 2 is subtracted. SUBTRACT 2 FROM 3 has the same meaning as 3-2, so 1 is set as the result: variable: result.

MULTIPLY:Multiplication

First, the variable: result is set to 3, and then it is multiplied by 2. Since MULTIPLY 3 BY 2 has the same meaning as 3 * 2, 6 is set to the variable: result as a result.

DIVIDE:Division

First, set the variable: result to 6, and then divide it by 2. Since MULTIPLY 6 BY 2 has the same meaning as 6/2, 3 is set as the result: variable: result.

LEAVE A COMMENT