Show TOC

RfcInvokeLocate this document in the navigation structure

Use

Executes a function module in the backend system so far. The return codes have the following meaning:

Return Code

Description

RFC_OK

The function call was executed successfully

RFC_ABAP_EXCEPTION

The function call was executed and ended with a defined ABAP Exception. The key of the exception can be obtained from Start of the navigation path abapException Next navigation step exception_key End of the navigation path. In the above two cases rfcHandle is still open and can be used to execute further function call.

RFC_ABAP_MESSAGE

The function call was started to be processed, but was aborted with an ABAP Message. The message parameters can be obtained from Start of the navigation path abapException Next navigation step message_class End of the navigation path, Start of the navigation path abapException Next navigation step message_type End of the navigation path, Start of the navigation path abapException Next navigation step message_number End of the navigation path, Start of the navigation path abapException Next navigation step message[0] End of the navigation path, ..., Start of the navigation path abapException Next navigation step message[3] End of the navigation path

RFC_ABAP_RUNTIME_FAILURE

The function call was started to be processed, but was aborted with a SYSTEM_FAILURE (e.g division by zero, unhandled exception, etc in the backend system). Detailes can be obtained from Start of the navigation path  errorInfo Next navigation step message End of the navigation path

RFC_COMMUNICATION_FAILURE

The connection broke down while processing the function call. Details can be obtained from Start of the navigation path errorInfo Next navigation step message End of the navigation path.

In these three cases the connection has been closed, so the rfcHandle needs to be refreshed via RfcRegisterServer.

RFC_INVALID_HANDLE

rfcHandle is invalid or points to a connection that has already been closed

Structure

RFC_RC SAP_API RfcInvoke (RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* errorInfo);

rfcHandle : connection handle;

funcHandle : function handle;

errorInfo : error messages;