C语言代码
#include <stdlib.h>
#include <stdio.h>
#include "sapnwrfc.h"
RFC_RC SAP_API stfc_connection_impl(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* errorInfo){
RFC_RC rc = RFC_OK;
SAP_UC requtext[256], buf[256];
rc = RfcGetString(funcHandle, cU("REQUTEXT"), requtext, 256, NULL, errorInfo);
printfU(cU("Got request for STFC_CONNECTION./nREQUTEXT = %s/n/n"), requtext);
sprintfU(buf, cU("STFC_CONNECTION called with REQUTEXT = %s"), requtext);
rc = RfcSetString(funcHandle, cU("ECHOTEXT"), buf, strlenU(buf), errorInfo);
return rc;
}
int mainU(int argc, SAP_UC** argv){
RFC_RC rc = RFC_OK;
RFC_CONNECTION_PARAMETER loginParams[1];
RFC_ERROR_INFO errorInfo;
RFC_CONNECTION_HANDLE connection;
RFC_FUNCTION_DESC_HANDLE z_perform_callback, stf