Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data →  Numeric Calculations →  arith_exp - Arithmetic Expressions 

arith_exp - ( )

Other versions: 7.31 | 7.40 | 7.54

Syntax


... ( arith_exp ) ...

Effect

A full arithmetic expression arith_exp can be placed in parentheses. An arithmetic expression in parentheses can be used as the operand for another arithmetic expression and is only calculated when used in this way.


Example

The parentheses in the second calculation correspond to the implicit parentheses in the first calculation. The parentheses in the third calculation change its order. The results are 2, 2, and 3. In the third calculation, the result of the parenthesis is rounded to the value 1.

cl_demo_output=>display( 
  |  3 *   2   / 3   = {   3 *   2   / 3   }\n| && 
  |( 3 *   2 ) / 3   = { ( 3 *   2 ) / 3   }\n| && 
  |  3 * ( 2   / 3 ) = {   3 * ( 2   / 3 ) }| ).