JCo RFC_READ_TABLE 数据缓冲区超出

JCo RFC_READ_TABLE 数据缓冲区超出

问题描述:

我正在尝试通过函数 RFC_READ_TABLE 从表 VBRK 中获取数据,但总是收到数据缓冲区超出异常.

i'm trying to get data from Table VBRK via Function RFC_READ_TABLE but always getting a Data Buffer Exceeded Exception.

final JCoConnection managedConnection2 = sapCoreJCoManagedConnectionFactory.getManagedConnection("JCoStateless",
        getClass().getName(), rfcDestination);

final JCoFunction function2 = managedConnection2.getFunction("RFC_READ_TABLE");

final JCoParameterList importParameterList2 = function2.getImportParameterList();

importParameterList2.setValue("QUERY_TABLE", "VBRK");
final JCoParameterList tableParameterList2 = function2.getTableParameterList();

final JCoTable optionsTable = tableParameterList2.getTable("OPTIONS");
String selectionFilter = "VBELN EQ '" + "0123456789" + "'";
optionsTable.appendRow();
optionsTable.setValue("TEXT", selectionFilter);

//execute function RFC_READ_TABLE
managedConnection2.execute(function2);

有人能指出我的错误吗?

Can anybody point out my mistake?

您收到此错误是因为所选字段不适合结构 DATA,即 TAB512.此外,功能模块RFC_READ_TABLE 还限制读取每行数据是否超过 512 字节.

You are getting this error because selected field do not fit into structure DATA i.e TAB512. Further, Function Module RFC_READ_TABLE also limits if read exceeds 512 bytes per row of data.

您已将 OPTIONS 应用于 SELECT 记录,但您没有使用 FIELDS 限制 SELECTED 字段.如果您将限制 SELECTED 字段,那么您将不会遇到错误 Data Buffer Exceeded.还建议使用 ROWCOUNT 限制记录数.

You have applied OPTIONS to SELECT records but you did not limit SELECTED fields using FIELDS. If you will limit SELECTED fields then you will not face error Data Buffer Exceeded. It is also recommend to limit no of records using ROWCOUNT.