C# .net ERP SAP 通过传表进行查询

RfcDestination dest = rfc_public.GetRfcDestination("SMP");
IRfcFunction func = dest.Repository.CreateFunction("ZPP_SYHD_GET_ISSUE_CHARGE");//接口明
IRfcTable rfcTable = func.GetTable("IT_TAB");//所属表 明细表  传入的表名
for (int i = 0; i < DT.Rows.Count; i++)//循环插入要传入的表
{

rfcTable.Insert();
rfcTable.CurrentRow.SetValue("RSPOS", DT.Rows[i]["RSPOS"].ToString());//预留项目编号
rfcTable.CurrentRow.SetValue("RSNUM", DT.Rows[i]["RSNUM"].ToString());//预留号
//rfcTable.SetValue("RSPOS", DT.Rows[i]["RSPOS"].ToString() );
//rfcTable.SetValue("RSNUM", DT.Rows[i]["RSNUM"].ToString());
}

func.Invoke(dest); //执行函数
IRfcTable rfcResTable = func.GetTable("OT_TAB");

posted @ 2022-11-02 16:06  黑月SAMA  阅读(79)  评论(0编辑  收藏  举报