ABAP Keyword Documentation → ABAP Overview → ABAP and Unicode → Differences between Unicode and Non-Unicode Programs
Character String and Byte String Processing in Unicode Programs
In Unicode programs, character string and byte string processing are strictly separated. The operands of character string processing must be character-like data objects, and operands in byte string processing must be byte-like data objects. In non-Unicode programs, byte strings are normally handled in the same way as character strings.
Other versions:
7.31 | 7.40 | 7.54
Syntactic Separation
Statements for Character String and Byte String Processing
In the statements for character string and
byte string processing, in Unicode programs, the distinction is made in the statements that are
intended for both types of processing by the optional addition IN CHARACTER|BYTE MODE
. In this case, IN CHARACTER MODE
is the default.
Note
The addition IN CHARACTER|BYTE MODE
is also used in the statements for determining length and offset:
In this case, the specifications are mandatory.
Relational Operators for Character Strings and Byte Strings
Relational operators exist both for character strings and for byte strings. In Unicode programs, the latter can no longer be used for byte strings.
Functions for Character Strings and Byte Strings
The description functions
are divided into description functions for character strings and description functions for byte strings.
In particular, in Unicode programs, strlen
can now only be used for character-like arguments, while xstrlen
is available for byte-like arguments.