Skip to content

ABAP Keyword Documentation →  ABAP − Release-Specific Changes →  Changes in Release 7.0, EhP2 

Character String and Byte String Processing for Release 7.0, EhP2


1. String expressions


2. Character 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 the type xstring


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

Other versions: 7.31 | 7.40 | 7.54


Note

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

Modification 1

Character string expressions

The new character string expressions enhance the current calculation expressions and allow character string processing at certain operand positions. A character string expression is either a character string template or a concatenation with the operator &&.

Modification 2

Character string templates

Character string templates were introduced as a new possibility for creating character strings. A character string template is enclosed between two characters "|" and creates a character string in a character string expression. The character string is created from a

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

Character string templates replace the use of the WRITE TO statement to a large extent. They can only be used in Unicode programs.

Modification 3

Chaining operator

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

Modification 4

Character String Functions

As a new type of embedded functions, character string functions have been introduced. There are:

In addition, the Boolean function boolc is, in principle, also one of the character string functions.

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

Modification 5

Bit functions

As a new type of embedded function, bit functions have been introduced. At the moment, there is a Bit function bit-set for setting bits. Furthermore, the Boolean function boolx is, in principle, also one of the Bit functions.

Modification 6

Management of short strings

To reduce the memory overhead that accumulates during administration of short strings for their string headers, their administration has been optimized. 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 is constant at approximately 50 bytes. Before Release 7.0, EhP2, the overhead of the string headers was not related to the length of the string and was approximately 60 bytes for each string.

It is now advisable to use 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 higher than Release 7.0 is used.

Modification 7

Streaming for strings

The new streaming concept supports strings.

Modification 8

Any start value for data objects of the type xstring

As of Release 7.0, EhP2, any suitable start value val can be specified for xstring after the VALUE addition to the statements DATA, CONSTANTS etc. Previously, only IS INITIAL was possible.

Modification 9

Maximum lengths of data objects of the types c, n, and x

The maximum length of data objects of the types c and n was increased from 65,535 to 262,143. The maximum length of data objects of the type x was increased from 65,535 to 524,287.