Show TOC

RfcInstallServerFunctionLocate this document in the navigation structure


Installs a callback function of type RFC_SERVER_FUNCTION, which will be triggered when a request for the function module corresponding to funcDescHandle comes in from the SAP system corresponding to sysId .

The main inputs of RFC_SERVER_FUNCTION are as follows:


    A connection handle, which can be used to query logon information about the current (backend) user or to make callbacks into the backend.


    A data container that represents the current function call. Read the importing parameters, which came from the backend, from this container via the RfcGetX functions and write the exporting parameters, which are to be returned to the backend, into this container using the RfcSetX functions.The memory of that container is automatically released by the RFC Runtime after the RFC_SERVER_FUNCTION returns.


    If you want to return an ABAP Exception or ABAP Message to the backend, fill the

    parameters of that container and return RFC_ABAP_EXCEPTION or RFC_ABAP_MESSAGE from your RFC_SERVER_FUNCTION implementation.

    If you want to return a SYSTEM_FAILURE to the backend, fill the message parameter of this container and return RFC_EXTERNAL_FAILURE from your RFC_SERVER_FUNCTION implementation.

    If your RFC_SERVER_FUNCTION implementation processed the function call successfully, you should return RFC_OK.


RFC_RC SAP_API RfcInstallServerFunction(SAP_UC const *sysId, RFC_FUNCTION_DESC_HANDLE funcDescHandle,RFC_SERVER_FUNCTION serverFunction, RFC_ERROR_INFO* errorInfo);