SAP LOGEXP BOUND



Get Example source ABAP code based on a different SAP table
  


• IS BOUND ABAP_RELAT_EXPR
• IS NOT BOUND ABAP_RELAT_EXPR

ABAP_RELEXP - IS BOUND

ABAP_SYNTAX
ABAP_KEY ... ref IS $[NOT$] BOUND ...

What does it do?
This predicate expression checks whether a reference variable contains a valid reference. A reference variable must be specified for ref. This is a functional operand position.
A data reference is valid if it can be dereferenced.
An object reference is valid if it points to an object.
With the addition NOT, the expression is true if the reference variable does not contain a valid reference. In this case, the reference variable is either initial and contains the null reference, or it is not initial and contains an invalid reference that does not point to an object.



Latest notes:

A non-initial reference variable that contains a heap reference is generally always valid since it keeps an object alive. Only heap references that point to lines of internal tables can become invalid when lines are deleted. A data reference variable that contains a stack reference, on the other hand, can also become invalid if the referenced data object is removed from the stack.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
The logical expression in the IF statement is false. The data reference dref contains a reference to an already deleted table line. DATA: dref TYPE REF TO data,
itab TYPE TABLE OF ...

FIELD-SYMBOLS <(><)> TYPE ANY.

dref = REF #( itab[ ... ] ).

...

CLEAR itab.

...

IF dref IS BOUND.
ASSIGN dref->* TO <(><)>.
ENDIF.
ABAP_EXAMPLE_END

ABAP_EXAMPLE_ABEXA
Predicate Expression IS NOT BOUND
ABAP_EXAMPLE_END