ABAP - Keyword Documentation →  ABAP - ABAP Release News →  News for ABAP Release 7.0 and its EhPs →  News for ABAP Release 7.0, EhP2 → 
Mail Feedback

Character String and Byte String Processing in ABAP Release 7.0, EhP2


1. String Expressions

2. String Templates

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



Hint

The program DEMO_EXPRESSIONS provides examples of character string and byte string processing for ABAP 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 concatenation 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

String templates replace the WRITE TO statement to a large extent.



Modification 3  

Concatenation Operator

The concatenation operator && is a new string operator that concatenates together two character-like operands as one operand in a string expression. The concatenation 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 helper 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 ABAP 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.

Strings are recommended instead of data objects for all character string and byte string operations where a fixed length is not important.

Hint

This change is also available before EhP2 if a kernel greater than ABAP 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 ABAP 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.