ABAP - Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Numeric Calculations →  System Classes for Numbers → 

Random Numbers

The class CL_ABAP_RANDOM calls the pseudo random number generator Mersenne Twister for different numeric types.

For the one-dimensional case, the following special classes generate random numbers for the different numeric types:


Creates a pseudo random number of the type i between 1 and 100 (initialized by the system time).

DATA(r) = cl_abap_random_int=>create( seed = CONV i( sy-uzeit )
                                      min  = 1
                                      max = 100 ).