ABAP Keyword Documentation → ABAP − Release-Specific Changes → Changes in Release 4.6A
Dynamic Offset and Length Access in Release 4.6A
Dynamic offset/length specifications allow you to access a specific position within a field or structure using values that are only known at runtime. This access type is available in Release 4.6A for all statements relating to fields.
Other versions: 7.31 | 7.40 | 7.54
Example
MOVE f+off1(len1) to g+off2(len2).
Starting with offset off2 in length len2, the field g is assigned the contents of field f starting with offset off1 in length len2. If the two field lengths are not identical, the remaining positions are truncated or filled with initial values. The fields f and g must have the type X, C, N, D, or T. Structures are also allowed.
Note
Under Unicode, offset/length
access only makes sense for fields of purely character-type fields and areas (C, N, X, or string
), or purely byte-type (X, xstring
) fields and areas.