Logical Expressions - Test for Existence of a Formal Parameter

The expression f IS [NOT] REQUESTED is true if an actual parameter was specified for the formal parameter f when the call was made.
Here, f must be the parameter of a function module, not a pure import parameter ("IMPORTING"). If you are dealing with a structured parameter, it must refer only to the parameter itself, not to a component. Moreover, this is allowed only in the function module itself (not in a subroutine called by the function module).

Note

The function of the logical expression IS REQUESTED is covered by the logical expression IS SUPPLIED. Instead of IS REQUESTED you should use IS SUPPLIED.

Example

In a function module, the next test establishes whether the result parameter TEXT was specified when the module was called. The expensive database read operation is executed only if the result is positive.

...
IF TEXT IS REQUESTED.
  SELECT SINGLE * FROM ...
  TEXT = ...
ENDIF.

Note

Although this test can result in a considerable improvement in performance, it should still be used with caution. In particular, the behavior of a function module (visible from outside) should depend only on the values and not on the existence of actual parameters.