在使用SAP .NET连接器的C#程序中,我想调用RFC函数“ BAPI_GET_PAYROLL_RESULT_LIST”并读取结果。
我用看了函数SE37
。在那里,我发现导出参数应为BAPIRETURN1
,这是一个结构。
因此,我搜索了RFC调用的示例代码,并针对我的情况对其进行了修改。
我已经尝试读取该表BAPI7004_RL
,因为该表位于信息中,SE37
并且我不知道是否必须使用export参数或该表。
这是我的代码:
string appServerHost = ConfigurationManager.AppSettings["AppServerHost"];
string name = ConfigurationManager.AppSettings["Name"];
string systemnumber = ConfigurationManager.AppSettings["SystemNumber"];
string user = ConfigurationManager.AppSettings["User"];
string pw = ConfigurationManager.AppSettings["Password"];
string client = ConfigurationManager.AppSettings["Client"];
string language = ConfigurationManager.AppSettings["Language"];
RfcConfigParameters parms = new RfcConfigParameters
{
{ RfcConfigParameters.AppServerHost, appServerHost },
{ RfcConfigParameters.Name, name },
{ RfcConfigParameters.SystemNumber, systemnumber },
{ RfcConfigParameters.User, user },
{ RfcConfigParameters.Password, pw },
{ RfcConfigParameters.Client, client },
{ RfcConfigParameters.Language, language }
};
RfcDestination dest …
Run Code Online (Sandbox Code Playgroud)