Skip to content

ABAP Keyword Documentation →  ABAP - Release-Specific Changes →  Changes in Release 7.0 and its EhPs →  Changes in Release 7.0, EhP2 

Character String and Byte String Processing in Release 7.0, EhP2


1. String expressions


2. String templates


3. Chaining operator


4. String functions


5. Bit functions


6. Management of short strings


7. Streaming for strings


8. Any start values for data objects of type xstring


9. Maximum length of data objects of types c, n, and x

Other versions: 7.31 | 7.40 | 7.54


Note

The program DEMO_EXPRESSIONS provides examples of character string and byte string processing for Release 7.0, EhP2.

Modification 1

String Expressions

The new string expressions enhance the previous calculation expressions and enable character string processing at specific operand positions. A string expression is either a string template or a chaining with operator &&.

Modification 2

String Templates

String templates have been introduced as a new way of creating character strings. A string template is enclosed between two "|" characters and creates a character string in a string expression from a

  • literal text,
  • embedded expressions, and
  • control characters.

String templates replace the WRITE TO statement to a large extent. They cannot be used in obsolete non-Unicode programs.

Modification 3

Chaining Operator

The chaining operator && is a new string operator that chains together two character-like operands as one operand in a string expression. The chaining operator replaces the CONCATENATE statement to a large extent.

Modification 4

String Functions

String functions have been introduced as a new type of embedded function. There are

The Boolean function boolc can also be considered a string function.

The string functions enable many character string processing tasks to be performed in operand positions where separate statements and auxiliary variables were required previously.

Modification 5

Bit Functions

Bit functions have been introduced as a new type of embedded function. A bit function (bit-set) currently exists for setting bits. The Boolean function boolx can also be considered a bit function.

Modification 6

Management of Short Strings

The internal management of short stings has been optimized to reduce the memory overhead that accumulates when short strings are managed for the relevant string header. For string lengths of less than 30 characters or 60 bytes, the string header now only requires between 10 and 40 bytes. For longer strings, this remains at approximately 50 bytes. Before Release 7.0, EhP2, the overhead of the string header was not related to the length of the string and was approximately 60 bytes for each string.

We now recommend using strings instead of data objects for all character and byte string operations where a fixed length is not important.


Note

This change is also available before EhP2 if a kernel greater than Release 7.0 is used.

Modification 7

Streaming for Strings

The new streaming concept supports strings.

Modification 8

Any Start Values for Data Objects of Type xstring

From Release 7.0, EhP2, any suitable start value val can be specified for xstring after the addition VALUE for statements DATA, CONSTANTS and so on. Previously, only IS INITIAL was possible.

Modification 9

Maximum Length of Data Objects of Types c, n, and x

The maximum length of data objects of types c and n has been increased from 65535 to 262143. The maximum length of data objects of type x has been increased from 65535 to 524287.