Ansicht
Dokumentation

ABENLOGEXP_RULES_OPERANDS_REF - LOGEXP RULES OPERANDS REF

ABENLOGEXP_RULES_OPERANDS_REF - LOGEXP RULES OPERANDS REF

CPI1466 during Backup   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

- Comparing Reference Variables

It is possible to compare data references with data references and object references with object references, but it is not possible to compare data references with object references. Two reference variables are identical if they point to the same object. Size comparisons are defined internally and always produce similar results in similar situations.

The null reference in an initial reference variable is always smaller than any non-initial reference. However, a non-initial invalid reference that no longer points to an object cannot be compared. A comparison with a non-initial invalid reference always produces an uncatchable exception.

Notes

  • For data references to be identical, the data type of the referenced objects must be compatible and it is not enough for the operands just to contain the same reference. If, for example, two reference variables contain the same memory address, with one pointing to a structure and the other to the first component of the structure, these variables are not identical since the data type of the operands is incompatible. Reference variables filled using GET REFERENCE might not be identical, even though they point to the same data object if GET REFERENCE or the reference operator REF is executed for a field symbol to which the data object was assigned using casting.
  • The fact that non-initial invalid references cannot be compared affects all operations with internal tables where comparisons take place, for example, WHERE conditions, sorts, or accesses using a sorted key. If a comparison with a non-initial invalid reference takes place, a runtime error occurs.

The following comparisons are both true. Although all references created with the reference operator REF point to the same data object in the memory, the reference created using fs2> is not equal to the other two because it references another data type.






CPI1466 during Backup   General Material Data  
This documentation is copyright by SAP AG.

Length: 2429 Date: 20240419 Time: 092600     sap01-206 ( 61 ms )