... p IS [NOT] SUPPLIED ...
The logical expression checks whether a formal parameter p 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 logical expression is possible only in function modules and methods. For p, 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.
The logical expression with IS SUPPLIED cannot be used in function modules that are called with
CALL FUNCTION ... IN UPDATE TASK ...
CALL FUNCTION ... STARTING NEW TASK ...
For function modules called with Remote Function Call, the application servers of calling and called program must have at least release 4.6.
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.