ARTICLE
rel_exp - IS SUPPLIED
Syntax
ABAP_KEY ... para IS [NOT] SUPPLIED ...
Effect
This predicate expression checks whether a formal parameter para
of a procedure is filled or requested. The
expression is true if at the call an actual parameter was assigned to
the formal parameter.
This relational expression can be used only in function modules and
methods. For para , you can specify all optional formal
parameters.
With addition NOT , the expression is true if at the call no
actual parameter was assigned to the formal parameter.
For function modules called with
Remote Function Call , the
application servers of the calling and called program must have at
least release 4.6.
Notes
The predicate expression IS SUPPLIED is not evaluated in function
modules that are called using
CALL FUNCTION ... IN UPDATE TASK ...
CALL FUNCTION ... STARTING NEW TASK
...
from an external RFC interface.
. In these cases, IS SUPPLIED always returns the value true.
The predicate expression IS SUPPLIED includes the obsolete
expression IS REQUESTED .
Example
The logical expression of the first IF statement in method m1
is true if at the call, an actual parameter is assigned to formal
parameter p1 . A check for the initial value would not be
sufficient in this context, because this is the value of the replacement
parameter specified with DEFAULT . The logical expression of the
second IF statement is true if at the call no actual parameter is
assigned to formal parameter p2 .
CLASS c1 DEFINITION.
PUBLIC SECTION.
CLASS-METHODS m1 IMPORTING p1 TYPE i DEFAULT 0
EXPORTING p2 TYPE i.
ENDCLASS.
CLASS c1 IMPLEMENTATION.
METHOD m1.
IF p1 IS SUPPLIED.
...
ELSE.
...
ENDIF.
IF p2 IS NOT SUPPLIED.
RETURN.
ELSE.
...
ENDIF.
ENDMETHOD.
ENDCLASS.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved