Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Calling and leaving program units →  Calling Processing Blocks →  Calling procedures →  CALL FUNCTION 

CALL FUNCTION func

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


CALL FUNCTION func { parameter_list 
                           | parameter_tables }.

Effect

This statement calls the function module specified in func. The name func must be a character-like data object containing the name of a function module permitted by the package check in uppercase letters when the statement is executed. Each function module in AS ABAP has a unique name, which is why do not need to specify the function group.

The additions parameter_list or parameter_tables are used to assign (statically or dynamically) actual parameters to the formal parameters of the function module and return codesto the non-class-based exceptions.


Note

If the name of a function module is specified by a constant or as a character literal, the specified function module is checked. If the function module does not exist, the extended program check reports an error.

Exceptions


Catchable Exceptions

CX_SY_DYN_CALL_ILLEGAL_FUNC

  • Cause: The called function is known but not active.
    Runtime Error: CALL_FUNCTION_NOT_ACTIVE
  • Cause: The called function is unknown.
    Runtime Error: CALL_FUNCTION_NOT_FOUND

CX_SY_DYN_CALL_ILLEGAL_TYPE

  • Cause: The type of the actual parameter does not meet the requirements of the function interface.
    Runtime Error: CALL_FUNCTION_CONFLICT_GEN_TYP
  • Cause: The actual parameter does not have the length expected by the function.
    Runtime Error: CALL_FUNCTION_CONFLICT_LENG
  • Cause: The actual parameter does not have the type expected by the function.
    Runtime Error: CALL_FUNCTION_CONFLICT_TYPE
  • Cause: Only valid functions can be called in the update.
    Runtime Error: CALL_FUNCTION_NO_VB
  • Cause: An actual parameter does not meet the alignment requirements of the corresponding formal parameter.
    Runtime Error: CALL_FUNCTION_WRONG_ALIGNMENT

CX_SY_DYN_CALL_PARAM_MISSING

  • Cause: The function expects a parameter not specified by the caller.
    Runtime Error: CALL_FUNCTION_PARM_MISSING

CX_SY_DYN_CALL_PARAM_NOT_FOUND

  • Cause: The caller specified a parameter not recognized by the function.
    Runtime Error: CALL_FUNCTION_PARM_UNKNOWN

Continue

Calling Function Modules