ABAPDESCRIBE_DISTANCE - DESCRIBE DISTANCE

ABAP Short Reference   PERFORM Short Reference  
This documentation is copyright by SAP AG.

DESCRIBE DISTANCE

Short Reference



Syntax

DESCRIBE DISTANCE BETWEEN dobj1 AND dobj2 INTO dst
                         IN {BYTE|CHARACTER} MODE ...

Effect

This statement assigns the difference between the starting positions of the data objects dobj1 and dobj2 to the data object dst for which the data type i is expected. In case ofdeeperdata types, the referenced data object is not relevant but instead the position of the internal reference(for strings and internal tables) or the reference variables. It is not important, in which order dobj1 and dobj2 are specified.

In Unicodeprograms, the addition MODE must be specified. The variant with the addition IN BYTE MODEdetermines 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 presentation. Innon-Unicodeprograms, the addition MODE can be omitted. In this case, the addition IN BYTE MODEis used implicitly. When you use this addition in IN CHARACTER MODE and the determined distance cannot be converted into a number of characters, an exception that cannot be handled is triggered.

Notes

  • The distance between data objects should only be determined within the same structure and only the structure's components should be used because only they are always in a successive order in the memory. Note that thealignmentgaps are counted as well. Therefore, use the addition in IN BYTE MODE to avoid an exception that cannot be handled.

  • With regards to DESCRIBE DISTANCE, every substructure declared as aBoxedComponent is an independent structure. The distance between components which are not in the same Boxed Component is undefined.


Example

Refer to Determining data object distances.

Exceptions

Non-Catchable Exceptions

  • Cause: Distance cannot be converted into characters.
    Runtime Error: UC_NO_CHAR_NUMBER





SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   BAL Application Log Documentation  
This documentation is copyright by SAP AG.


Length: 3608 Date: 20120522 Time: 050822     triton ( 172 ms )