ABAP Keyword Documentation → ABAP - Reference → Program Flow → Expressions and Functions for Logical Expressions → log_exp - Logical Expressions → log_exp - Comparisons → log_exp Comparison Rules
log_exp - Comparing Reference Variables
It is possible to compare data references to data references, and object references to object references, but not data references to object references. Two reference variables are identical if they point to the same object. A comparison of size is defined internally and always delivers the same results in similar situations.
Other versions: 7.31 | 7.40 | 7.54
Note
For data references to be identical it is not sufficient that the operands contain the same reference. Instead, the data type of the objects references must be
compatible. If, for example, two reference variables
have the same memory address, and one points to a structure, the other to the first component of the
structure, then these variables are not identical since the data type of the operands is incompatible.
Reference variables filled with GET
REFERENCE may be not identical although they point to the same data object if GET REFERENCE
is exectued for a field symbol which was assigned the data object using
casting.