Ansicht
Dokumentation

ABENLOGEXP_INITIAL - LOGEXP INITIAL

ABENLOGEXP_INITIAL - LOGEXP INITIAL

General Data in Customer Master   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

- IS INITIAL

... operand IS $[NOT$] INITIAL ...

Effect

This predicate expression checks whether the operand operand is initial. The expression is true, if the operand contains its type-dependent initial value. Any data objects can be specified for operand. This is an extended functional operand position in which, in addition to functional method calls, constructor expressions, or table expressions, certain built-in functions can also be specified.

With the addition NOT, the expression is true if the operand contains a value other than its type-dependent initial value

Notes

  • The expression IS $[NOT$] INITIAL is suitable for checking the type-dependent initial value regardless of its actual data type, instead of comparing it with a type-compliant operand that contains the initial value.
... operand IS NOT INITIAL ...
is a predicative method call.
  • It is possible, but not recommended, to always specify built-in functions or expressions as operand, for example:
  • It is better to use str IS INITIAL or itab IS INITIAL instead of strlen( str ) IS INITIAL or lines( itab ) IS INITIAL.

  • It is better to evaluate the arguments of the constructor expression instead of VALUE type( ... ) IS INITIAL.

Example

The logical expression in the IF statement is true if the internal table in the SELECT statement was filled with lines.

DATA spfli_tab TYPE TABLE OF spfli.
...
CLEAR spfli_tab.
SELECT *
       FROM spfli
       WHERE ...
       INTO TABLE @spfli_tab.

IF spfli_tab IS NOT INITIAL.
  ...
ENDIF.






CL_GUI_FRONTEND_SERVICES - Frontend Services   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 3939 Date: 20240427 Time: 052526     sap01-206 ( 56 ms )