SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Release-Specific Changes → Changes in Release 3.0 →
String Processing in Release 3.0
1. Assignments with variable offsets and lengths specified
2. ASSIGN/PERFORM: Offset without exceeding field limits
6. New additions for WRITE [TO] for alignment purposes
Assignments with Variable Offsets and Lengths Specified
destination = source can be used with respect to the source and target field when variable offsets and lengths are specified.
ASSIGN and PERFORM with Offsets Specified and Field Limits Not Exceeded
The language elements ASSIGN
and PERFORM can now be used to specify offsets without exceeding field limits (using field+off(*)).
New SHIFT Variants
The new variants of
SHIFT allow field contents to be shifted so that a prefix or suffix consisting
of a certain number of characters is omitted. In the character string gaps, for example, it is possible to specify which characters constitute the prefix or suffix (using
"SHIFT field LEFT DELETING LEADING gaps" or "SHIFT field RIGHT DELETING TRAILING gaps").
New Language Element CONCATENATE
CONCATENATE can be used to append character strings to a target field (using CONCATENATE f1 ... fn INTO
g). The addition "SEPARATED BY h" makes it possible to insert the separator h between the character strings fi.
New Language Element SPLIT
SPLIT can be used to split a string in accordance with a sequence of separators
(SPLIT f AT g) and place the resulting substrings in the specified fields
(... INTO h1 ... hn) or in an internal table (... INTO TABLE itab).
New Additions for WRITE [TO] for Alignment Purposes
WRITE now has the additions LEFT-JUSTIFIED,
CENTERED, and RIGHT-JUSTIFIED for left-justified, centered, or right-justified output. These can be used both when displaying data in
lists and for string processing using
WRITE ... TO. In the first case, the alignment refers to the output field
in the list. In the latter case, it refers to the target field specified after TO.