"
Supported by

Does the function exist?

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'
  DESTINATION 'CEU'

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

And all uncertainties are cleared up!

Greetings from Abapinho.

Deixe um comentário


About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).