简体   繁体   English

JCo RFC_READ_TABLE 数据缓冲区超出

[英]JCo RFC_READ_TABLE Data Buffer Exceeded

i'm trying to get data from Table VBRK via Function RFC_READ_TABLE but always getting a Data Buffer Exceeded Exception.我正在尝试通过函数 RFC_READ_TABLE 从表 VBRK 获取数据,但总是收到数据缓冲区超出异常。

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?有人能指出我的错误吗?

You are getting this error because selected field do not fit into structure DATA ie TAB512.您收到此错误是因为所选字段不适合结构 DATA,即 TAB512。 Further, Function Module RFC_READ_TABLE also limits if read exceeds 512 bytes per row of data.此外,功能模块RFC_READ_TABLE还限制读取每行数据是否超过 512 字节。

You have applied OPTIONS to SELECT records but you did not limit SELECTED fields using FIELDS .您已将OPTIONS应用于 SELECT 记录,但未使用FIELDS限制 SELECTED 字段。 If you will limit SELECTED fields then you will not face error Data Buffer Exceeded.如果您将限制 SELECTED 字段,那么您将不会遇到错误数据缓冲区超出。 It is also recommend to limit no of records using ROWCOUNT .还建议使用ROWCOUNT限制记录数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM