Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  Remote Function Call 

CALL FUNCTION - RFC

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax Forms


Synchronous RFC

1. CALL FUNCTION func DESTINATION dest
                     parameter_list.


Asynchronous RFC

2. CALL FUNCTION func STARTING NEW TASK task
                [DESTINATION {dest|{IN GROUP {group|DEFAULT}}}]
                [{PERFORMING subr}|{CALLING meth} ON END OF TASK]
                parameter_list.

Background RFC

3. CALL FUNCTION func IN BACKGROUND UNIT
                     parameter_list.

Transactional RFC

4. CALL FUNCTION func IN BACKGROUND TASK
                     [AS SEPARATE UNIT]
                     [DESTINATION dest]
                     parameter_list.

Effect

A function module or a function is called using the RFC interface.


Notes

  • BackgroundRFC (bgRFC) is enhanced successor technology of the transactional RFC (tRFC). At the moment, all variants can still be used. However, it is strongly recommended that bgRFC be used instead of tRFC.
  • A more detailed description of exceptions that can arise in RFC can be found in the SAP Library under RFC Exceptions.

Exceptions


Non-Catchable Exceptions

  • Cause: The function module called has not been released for RFC.
    Runtime Error: CALL_BACK_ENTRY_NOT_FOUND
  • Cause: Destination type is not permitted.
    Runtime Error: CALL_FUNCTION_DEST_TYPE
  • Cause: The current function was not called remotely.
    Runtime Error: CALL_FUNCTION_NO_SENDER
  • Cause: Communication type missing (I for internal connection, 3 for an AS ABAP) when an asynchronous RFC is executed.
    Runtime Error: CALL_FUNCTION_DESTINATION_NO_T
  • Cause: The destination entered does not exist.
    Runtime Error: CALL_FUNCTION_NO_DEST
  • Cause: The destination entered (in load distribution mode) does not exist.
    Runtime Error: CALL_FUNCTION_NO_LB_DEST
  • Cause: Data received for unknown CPI-C connection.
    Runtime Error: CALL_FUNCTION_NO_RECEIVER
  • Cause: The function module to be called is flagged as one that cannot be called remotely.
    Runtime Error: CALL_FUNCTION_NOT_REMOTE
  • Cause: An error occurred during an RFC. This error has been logged in the calling system.
    Runtime Error: CALL_FUNCTION_REMOTE_ERROR
  • Cause: The logon data for the user is incomplete.
    Runtime Error: CALL_FUNCTION_SIGNON_INCOMPL
  • Cause: RFC from an external program without a valid user ID.
    Runtime Error: CALL_FUNCTION_SIGNON_INVALID
  • Cause: Attempt to log on to the target system without a valid user ID.
    Runtime Error: CALL_FUNCTION_SIGNON_REJECTED
    The error code indicates the following:
    1) Incorrect password or invalid user ID
    2) User locked
    3) Too many logon attempts
    5) Error in authorization buffer (internal error)
    6) No external user check
    7) Invalid user type
    8) User's validity period has been exceeded
  • Cause: No authorization for logon as a trusted system.
    Runtime Error: CALL_FUNCTION_SINGLE_LOGIN_REJ
    The error code indicates the following:
    0) Incorrect logon data with a valid security key.
    1) The calling system is not a trusted system or the security key is invalid.
    2) The user has no RFC authorization (authorization object S_RFCACL) or someone tried to log on using protected user 'DDIC' or 'SAP*'.
    3) The timestamp for the logon data is invalid.
  • Cause: An RFC without a valid user ID is only permitted when a system function module is called. The error codes mean the same as for CALL_FUNCTION_SINGLE_LOGIN_REJ.
    Runtime Error: CALL_FUNCTION_SYSCALL_ONLY
  • Cause: Data error (internal table info) in a Remote Function Call.
    Runtime error CALL_FUNCTION_TABINFO
  • Cause: No memory available for the table to be imported.
    Runtime error CALL_FUNCTION_TABLE_NO_MEMORY
  • Cause: Only applies to asynchronous RFC: Task name is already being used.
    Runtime Error: CALL_FUNCTION_TASK_IN_USE
  • Cause: Only applies to asynchronous RFC: The specified task is already open.
    Runtime Error: CALL_FUNCTION_TASK_YET_OPEN
  • Cause: No RFC authorization.
    Runtime Error: CALL_FUNCTION_NO_AUTH
  • Cause: No RFC authorization for the user.
    Runtime error RFC_NO_AUTHORITY
  • Cause: Destination "BACK" is not permitted in the current program.
    Runtime Error: CALL_FUNCTION_BACK_REJECTED
    Runtime Error: CALL_XMLRFC_BACK_REJECTED
  • Cause: Type conflict when passing a table.
    Runtime Error: CALL_FUNCTION_CONFLICT_TAB_TYP
  • Cause: No memory available for creating a local internal table.
    Runtime Error: CALL_FUNCTION_CREATE_TABLE
  • Cause: Type conflict when passing a structure.
    Runtime Error: CALL_FUNCTION_UC_STRUCT
  • Cause: Invalid data type when passing parameters.
    Runtime Error: CALL_FUNCTION_WRONG_VALUE_LENG
  • Cause: Type conflict when passing a field of type WCHAR.
    Runtime error CALL_FUNCTION_WCHAR_SIZE
  • Cause: Illegal LEAVE statement on the RFC server.
    Runtime Error: CALL_FUNCTION_ILLEGAL_LEAVE
  • Cause: Incorrect length when passing a parameter of type decfloat16 or decfloat32.
    Runtime Error: CALL_FUNCTION_ILL_DECFLOAT_LEN

Continue

CALL FUNCTION - DESTINATION

CALL FUNCTION - STARTING NEW TASK

CALL FUNCTION - IN BACKGROUND