ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Character String and Byte String Processing → Expressions and Functions for String Processing → string_exp - String Expressions → string_exp - String Templates
String Templates - literal_text
Other versions: 7.31 | 7.40 | 7.54
Syntax
c...c
Effect
Within a string template |...|
, a literal text c...c
represents its exact character string. Literal text consists of all characters in c
that
- are not included in curly brackets
{ }
- are not control characters
- not the special characters
|
,{
,}
, or\
.
Blanks in string templates in particular are always significant. To display a special character
|
, {
, }
, or \
as a literal character, you can prefix it with the escape symbol \
.
Example
The following string template displays the text "Characters |, {, and } have to be escaped by \ in literal text.".
DATA txt TYPE string.
txt = |Characters \|, \{, and \} have to be escaped by \\ in literal text.|.
This translation does not reflect the current version of the documentation.