java - SAP JCo3 表为空,但已连接
问题描述
嗨,我正在使用 SAP JCo3 连接器以及 jar 提供的 .dll 文件。目的地已成功连接。我的问题是,当我执行 function.execute(destination) 时,function.getTableParameterList().getTable("PART_LIST") 返回一个零行的空表 我实现连接的代码如下
JCoDestination dest = JCoDestinationManager.getDestination("EOMP");
dest.ping();
JCoRepository repo= dest.getRepository();
JCoFunctionTemplate ftemplate = repo.getFunctionTemplate("Z_BAPI_GET_ESO_PART");
JCoFunction function = ftemplate.getFunction();
JCoParameterList importParams = function.getImportParameterList();
importParams.setValue("ESO","R1S00444");
importParams.toXML();
function.execute(dest);
JCoParameterList tableParamList=function.getTableParameterList();
JCoTable table=tableParamList.getTable("PART_LIST");
解决方案
我建议调试您的 ABAP 代码。如果它会在这个 PART_LIST 表中填充一些行,那么您也可以在 Java 端获取它们。您的 Java 代码中没有明显的错误,除了importParams.toXML()
多余且dest.ping()
不需要。
推荐阅读
- r - Rmarkdown pdf的自定义表格
- javascript - 使用 javaScript 查找在表中选择值的次数
- firebase - Flutter:获取 Cloud Firestore 数据但没有结果
- html - 在模板中显示 shopify 变体选项 2 个位置
- python - 使用 Python 从文本文件中提取一行中两个字符之间的特定文本
- regex - 我需要一个相当基本的 Regex.Match 语法——用 2 个空格分隔的 2 个数字来识别文本行
- typeorm - 使 TypeORM 仅修改已更改的字段
- arrays - 在 JSON 路径中获得 +1 元素
- vb.net - 读取 NCR 7878 秤/扫描仪的称重和条形码扫描仪,
- javascript - OneTrust CCPA Opt Out Builder 按钮未在 React 中编译