SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Attributes of Data Objects → DESCRIBE →Syntax
DESCRIBE DISTANCE BETWEEN dobj1 AND dobj2 INTO dst
IN {BYTE|CHARACTER} MODE.
Effect
This statement determines the distance between the start positions of the data objects dobj1 and dobj2.
The return value has the type i. The following can be specified for dst:
In the case of deeper data types, the referenced data object is not relevant but the position of the internal reference (for strings and internal tables) or the reference variables instead. It is not important in which order dobj1 and dobj2 are specified.
The addition MODE must be specified in
Unicode programs. The
variant with the addition IN BYTE MODE determines the distance in bytes.
The variant with the addition IN CHARACTER MODE converts the distance into characters that can be stored in this length according to the current character format. In
non-Unicode programs,
the addition MODE can be omitted. In this case, the addition IN
BYTE MODE is used implicitly. When this addition is used in IN CHARACTER
MODE and the determined distance cannot be converted into a number of characters, a non-handleable exception is raised.
Notes
Example
See Determining Data Object Distances.
Non-Catchable Exceptions