ABAP Keyword Documentation → ABAP − Reference → Built-In Types, Data Objects, Functions, and Constructors → Built-In Data Objects
The Constant space
The program-global constant space
has the data type c
, length 1, and contains a blank character.
Other versions: 7.31 | 7.40 | 7.54
Notes
- For the constant
space
, trailing blanks are ignored in most operand positions, as for all character-like fields with fixed lengths. The constantspace
should not, therefore, be used in these positions.
- The name
space
is reserved and cannot be used in any context for other data objects, structure components, attributes, or formal parameters. An exception to this are the obsolete anonymous components of structures.
Example
The result of the following concatenation is a string
with exactly one blank. The blank characters in the first two space
s specified
are ignored. Blank characters are only respected after SEPARATED BY
. With the same result (except for space
), this example also applies to a
text field literal ' '
with exactly one blank character.
DATA text TYPE string.
CONCATENATE space space INTO text SEPARATED BY space.