Supported by
Supported by Inetum

Does the function exist?

images/thumbnail.jpg - Thumbnail

You call a function. Imagine it doesn’t answer. It may be that it’s staying silent. Or it’s shy. Or dumb. Or, of all the misfortunes, it doesn’t exist.

To make sure and put your mind to rest you then do:

CALL FUNCTION 'FUNCTION_EXISTS'
  EXPORTING
    funcname           = 'Z_DEUS'
  EXCEPTIONS
    function_not_exist = 1
    OTHERS             = 2.

This becomes even more useful if you want to know whether a function exists in a remote system:

CALL FUNCTION 'FUNCTION_EXISTS'
  <b>DESTINATION 'CEU'</b>

  EXPORTING
    funcname           = 'Z_DEUS'
  EXCEPTIONS
    function_not_exist = 1
    OTHERS             = 2.

And all uncertainties are cleared up!

Greetings from Abapinho.