ABAP Keyword Documentation →  ABAP − Reference →  Declarations →  Declaration Statements →  Data Types and Data Objects →  Declaring Data Objects →  Literals → 

Numeric Literals

Numeric literals consist of continuous sequences of numbers with a maximum of 31 digits (0 to 9), which can be directly preceded by a plus (+) or minus (-) sign.

Notes

Example

The first literal has the type i. The following literals have the type p and lengths 8 and 16.

DATA: t TYPE c LENGTH 1,
      l TYPE i.

DESCRIBE FIELD 123456 TYPE t.
cl_demo_output=>write( t ).
DESCRIBE FIELD 123456790123 TYPE t LENGTH l IN BYTE MODE.
cl_demo_output=>write( |{ t } { l }| ).
DESCRIBE FIELD 12345679012345678 TYPE t LENGTH l IN BYTE MODE.
cl_demo_output=>write( |{ t } { l }| ).
cl_demo_output=>display( ).