Entering content frame

Literals Locate the document in its SAP Library structure

Literals are unnamed data objects that you create within the source code of a program. They are fully defined by their value. You cannot change the value of a literal. There are two types of literals: numeric and character.

Numeric Literals

Number literals are sequences of digits which can have a prefixed sign. In number literals there are no decimal separators and no notation with mantissa and exponent


are possible as well.


Examples of numeric literals:


Numeric literals in ABAP statements:

DATA number TYPE i VALUE -1234.

WRITE 6789.

MOVE 100 TO number.

Character Literals

Character literals are sequences of alphanumeric characters in the source code of an ABAP program enclosed in single quotation marks or backquotes. Character literals enclosed in quotation marks have the predefined ABAP type c and are described as text field literals. Literals enclosed in backquotes have the ABAP type string and are described as string literals. The field length is defined by the number of characters. With text field literals trailing blanks are ignored while in string literals they are taken into account.


Examples of text field literals:

'Antony Smith'
'69190 Walldorf'

Examples of string literals:

`Antony Smith    `
`69190 Walldorf   `

If you use character literals in operand positions at which a numeric value is expected, they are converted into a numeric value.


Examples of character literals that can be converted into numeric types:



Leaving content frame