Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Numerical Calculations →  arith_exp - Arithmetic Expressions →  arith_exp - Arithmetic Operators 

Arithmetic Calculations

This example demonstrates the use of different divisions.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    DATA: pack TYPE p DECIMALS 4,
          n    TYPE decfloat16 VALUE '+5.2',
          m    TYPE decfloat16 VALUE '+1.1'.

    pack = n / m.
    WRITE pack.

    pack = n DIV m.
    WRITE  / pack.

    pack = n MOD m.
    WRITE / pack.

Description

In this example, the functions of the three division operators, DIV, MOD, and / are demonstrated.