Skip to content

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 enclosed in curly brackets { }
  • are not control characters
  • are not the special characters |, {, }, or \.

Blanks in string templates in particular are always significant. To display a special character |, {, }, or \ as a literal character, it can be prefixed with the escape character \.


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.|.