Show TOC

Background documentationRfcInvoke Locate this document in the navigation structure

 

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   abapException   exception_key  . 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   abapException   message_class  ,   abapException   message_type  ,   abapException   message_number  ,   abapException   message[0]  , ...,   abapException   message[3]  

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    errorInfo   message  

RFC_COMMUNICATION_FAILURE

The connection broke down while processing the function call. Details can be obtained from   errorInfo   message  .

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;