Function sapnwrfc::binding::RfcInstallServerFunction
[−]
[src]
pub unsafe extern "C" fn RfcInstallServerFunction(
sysId: *const SAP_UC,
funcDescHandle: RFC_FUNCTION_DESC_HANDLE,
serverFunction: RFC_SERVER_FUNCTION,
errorInfo: *mut RFC_ERROR_INFO
) -> RFC_RC
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 R/3 system corresponding to sysId.
If you pass NULL as "sysId", the serverFunction will be used for calls from any backend system.
The main inputs of RFC_SERVER_FUNCTION are as follows: - RFC_CONNECTION_HANDLE\n A connection handle, which can be used to query logon information about the current (backend) user or to make callbacks into the backend. - RFC_FUNCTION_HANDLE\n 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.\n The memory of that container is automatically released by the RFC Runtime after the RFC_SERVER_FUNCTION returns. - RFC_ERROR_INFO*\n 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.\n 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.
\in *sysId System ID of the R/3 system, for which this function module implementation shall be used. If you set this to NULL, this server function will be used for calls from all backends, for whose SysID no explicit server function has been installed. \in funcDescHandle A function description giving the name of the function module and its parameters.\n Note that the NW RFC library does not create a copy of this function description. So if you are using self-defined (hard-coded) function descriptions (see RfcCreateFunctionDesc()), then you need to make sure, that these function descriptions are not destroyed as long as they are still used in a server function installation! \in serverFunction Pointer to a C function of type RFC_SERVER_FUNCTION. If you pass a null-pointer here, any previously installed server function for the given function module will be uninstalled. \out *errorInfo Not much that can go wrong here. \return RFC_RC