using SAP.Middleware.Connector;
RfcConfigParameters rfcPar = new RfcConfigParameters();
rfcPar.Add(RfcConfigParameters.Name, "DEV");rfcPar.Add(RfcConfigParameters.AppServerHost, "服务器IP");
rfcPar.Add(RfcConfigParameters.Client, "端口");
rfcPar.Add(RfcConfigParameters.User, "用户名");
rfcPar.Add(RfcConfigParameters.Password, "密码");
rfcPar.Add(RfcConfigParameters.SystemNumber, "版本");
rfcPar.Add(RfcConfigParameters.Language, "EN");
rfcPar.Add(RfcConfigParameters.IdleTimeout, "10");
rfcPar.Add(RfcConfigParameters.MaxPoolSize, "10");
RfcDestination dest = RfcDestinationManager.GetDestination(rfcPar);
RfcRepository rfcrep = dest.Repository;
IRfcFunction myfun = null;
myfun = rfcrep.CreateFunction("Z_RFC_TEST");
myfun.SetValue("NUMB_A", 100);//SAP里面的传入参数
myfun.SetValue("NUMB_B", 123);//SAP里面的传入参数
myfun.Invoke(dest);
//IRfcTable IrfTable = myfun.GetTable("IT_ZMYTB2");
string RETURNStr = myfun.GetString("NUMB_C");
安装nco3.x版本
引用:sapnco.dll 、sapnco_utils.dll
本文介绍如何在ASP.NET项目中使用SAP Middleware Connector进行连接。首先,需要安装NCO 3.x版本,然后引入sapnco.dll和sapnco_utils.dll两个库文件。
2150

被折叠的 条评论
为什么被折叠?



