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

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

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