【发布时间】:2011-11-15 16:57:51
【问题描述】:
我正在尝试将 2 行传递给 BAPI 表,但我的代码始终只占用第 2 行。
我将数据传递为:
6 7 8
6 7 8
代替:
1 2 3
6 7 8
这是我尝试过的:
IRfcFunction bapiTEST = _rfcDest.Repository.CreateFunction(strBapi);
IRfcStructure structImport = _rfcDest.Repository.GetStructureMetadata("ZBAPI_A_STRU_ORDER_CLICK").CreateStructure();
structImport.SetValue("NUM1", "000001");
structImport.SetValue("NUM2", "000002");
structImport.SetValue("NUM3", "000003");
IRfcTable tblImport = bapiTEST.GetTable("IMPORT");
tblImport.Insert(structImport);
structImport.SetValue("NUM1", "000006");
structImport.SetValue("NUM2", "000007");
structImport.SetValue("NUM3", "000008");
tblImport.Insert(structImport);
bapiTEST.SetValue("IMPORT", tblImport);
RfcSessionManager.BeginContext(_rfcDest);
bapiTEST.Invoke(_rfcDest);
【问题讨论】:
-
不要以为你可以访问自定义bapi的源代码?我的第一个猜测是它需要一个带有隐式工作区域的表,而您的远程调用没有正确处理它。但我对 C# 没有任何经验。
标签: c# sap sap-dotnet-connector