Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JCO Server: Working with tables as input parameter


I'm using JCO server as described in weblog /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection

I'm having some issues working with tables. My function has 2 tables, one containing a compressed string (input from abap) and one containing the uncompressed version of the string (sent back to abap). My function is defined as follow:

fmeta = new JCO.MetaData("Z_DEFLATE");

fmeta.addInfo("STRING_LEN", JCO.TYPE_INT, 255, 0, 0, JCO.IMPORT_PARAMETER, null);

fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255, 0, 0, JCO.EXPORT_PARAMETER, null );

fmeta.addInfo("STRING_IN", JCO.TYPE_TABLE, 144, 0, 0, 0, "XML");

fmeta.addInfo("XML", JCO.TYPE_TABLE, 144, 0, 0, 0, "XML");


In SAP, the FM is defined using tables with lines of char1024.

When trying to retrieve the table content:

JCO.Table strin_table=tables.getTable("STRING_IN");

int numRows = strin_table.getNumRows();

numRows is zero and I'm not able to read any line from the table object.

Any suggestion?



Not what you were looking for? View more on this topic or Ask a question