1.通过主动调用R3的RFC函数,获取R3中TABLE的数据,并将其保存至JAVA端
R3的导入参数:
R3的导出参数:
2.步骤
获取R3目标地址
protected static String BEIABAP_AS_POOLED = "ABAP_AS_WITH_POOL";
会自动寻找
ABAP_AS_WITH_POOL.jcoDestination文件,需要将此配置文件存放在tomcat的bin目录下
destination = JCoDestinationManager
.getDestination(BEIABAP_AS_POOLED);
参数传入
JCoRepository repository = destination.getRepository();
JCoFunction function = repository.getFunction("ZMLSCP_PP_F0010");
JCoParameterList parameters = function.getImportParameterList();
parameters.setValue("ZSJC", "20170523105706");// 时间戳
parameters.setValue("ZQTFS","0");// 齐套方式
function.execute(destination);
JCoParameterList tableParams = function.getTableParameterList();
JCoTable tableList = tableParams.getTable(3);
//通过do-while就可以对tableList中的数据进行各种增删改查操作啦do{//获取tablelist中的内容 可以通过tableList.getString("ZGDH") 方式获取} while (tableList.nextRow());