JCO读取function里的数据

2023-07-11  本文已影响0人  Bigglesworth

一、入参传值

JCoParameterList tableParameterList = function.getTableParameterList();
        JCoTable inputParam = tableParameterList.getTable("ET_DATA");
        inputParam.appendRow();
        inputParam.setValue("字段1",item.get字段1());
        inputParam.setValue("字段2",item.get字段2());
        inputParam.setValue("UUID",item.getUuid());

这个ET_DATA可以从下面template查找


入参

二、接收返回值

返回值在exportParameters里面,debug可以展开看结构

JCoParameterList returnTable  = function.getExportParameterList();
// 因为没有放到odata里,所以不用从structure里取了,直接getString获取
//  JCoStructure aReturn = returnTable.getStructure("MSGTY");
// 如果从structure取的话,就换成aReturn.getString("MSGTY"); 

    String type = returnTable.getString("MSGTY");
    String message = returnTable.getString("MSG");
没有odata的返回值
获取metaData的两个字段
上一篇 下一篇

猜你喜欢

热点阅读