Function sapnwrfc::binding::RfcInstallGenericServerFunction [] [src]

pub unsafe extern "C" fn RfcInstallGenericServerFunction(
    serverFunction: RFC_SERVER_FUNCTION,
    funcDescProvider: RFC_FUNC_DESC_CALLBACK,
    errorInfo: *mut RFC_ERROR_INFO
) -> RFC_RC

Installs a generic callback function of type RFC_SERVER_FUNCTION together with a callback function of type RFC_FUNC_DESC_CALLBACK for obtaining the metadata description of unknown function modules.

The RFC Runtime calls the callback function RFC_SERVER_FUNCTION, if it receives a function call, for whose function module name no matching callback function has been installed via RfcInstallServerFunction() (neither for the current system ID nor for SysID=NULL).

In addition to the handler function you need to provide a second callback function: RFC_FUNC_DESC_CALLBACK. The RFC runtime calls it to obtain an RFC_FUNCTION_DESC_HANDLE for the current function module from you. So this function either needs to return hardcoded meta data or needs to be able to perform a DDIC lookup using a valid client connection and RfcGetFunctionDesc(). If your implementation of RFC_FUNC_DESC_CALLBACK is not able to provide a function description for the current function module name, it should return RFC_NOT_FOUND. The RFC runtime will then notify the backend, that this function module cannot be processed by your RFC server.

\in serverFunction A pointer to a function that can handle "all" function modules. \in funcDescProvider A pointer to a function that can provide metadata descriptions of "all" function modules. \out *errorInfo Again not much that can go wrong at this point. \return