NCo3.0调用RFC,通用接口, 支持泛型和动态类型。 Sap通用接口  一、 接口说明 1. 入参Dictionary,出参泛型 1.1 接口ExecuteString public T ExecuteString(string FunName, Dictionary import) 实例代码: SapRfcHelper sapserver = new SapRfcHelper("10.6.203.19", "100", "E_SFC", "Sfcs@123"); Dictionary import3 = new Dictionary(); import3.Add("NUM", "1"); import3.Add("STATUS", "1"); //入参字符串出参对象 StatusModel d = sapserver.ExecuteString("Y_RFC_SUPPLY_ZMM10_STATUS", import3); 1.2 接口ExecuteStructure public T ExecuteStructure(string FunName, Dictionary import) 没有测试实例 1.3 接口ExecuteTable public T ExecuteTable(string FunName, string tableName, Dictionary import) 实例代码: Dictionary import23 = new Dictionary(); import23.Add("AUFNR", "111"); //入参表格出参对象 MappingModel fd = sapserver.ExecuteTable("Z_SFC_BU_MO_MAPPING", "BU_MO", import23); 2. 入参Dictionary,出参动态类型 2.1 接口Execute public ExpandoObject Execute(string FunName, Dictionary import) 3. 入参Dictionary,出参泛型 3.1 接口Execute public T Execute(string FunName, Dictionary import) 二、出参泛型对象 注意事项: 1. 仅对属性赋值,字段自动忽略(如果有异常,请检查) 2. 属性不能多于sap接口的参数 3. 属性名即是sap接口的Key 列如:
2025-06-15 19:45:00 22.69MB NCo3.0 SAP通用接口
1