SAP NWES-46-OFFSET

Get Example source ABAP code based on a different SAP table
  



Dynamic Access to Offsets and Lengths in Release 4.6A

Offsets/lengths specified dynamically enable a specific position to be accessed within a field or structure using values that are only known at runtime. This access type is available in ABAP_99A for all statements relating to fields.

Example:

g+off2(len2) = f+off1(len1).

Starting with offset off2 in length len2, the field g is assigned the content of field f starting with offset off1 in length len2. If the two field lengths are not identical, the remaining positions are cut off or padded with initial values. The fields f and g must have the type X, C, N, D, or T. Structures are also allowed.



Latest notes:On Unicode, offset/length access
only makes sense for fields of purely character-like fields and areas (C, N, X, or string) or purely byte-like (X, xstring) fields and areas.