Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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?

like image 241
pr191ex Avatar asked Aug 21 '26 14:08

pr191ex


1 Answers

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.

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.

like image 91
Umar Abdullah Avatar answered Aug 24 '26 05:08

Umar Abdullah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!