on 11-14-2007 9:33 AM
Hello,
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");
repository.addFunctionInterfaceToCache(fmeta);
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?
Thanks,
Laurent
Hello
maybe you should use a JCO.Client to fetch the Metadata (if possible), because it's hard to built the metadata on your own (even harder if you have to support both unicode and none unicode)
regards franz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
you need indeed a client connection to use JCO.Server as i supposed
And if it is possible to also hava a JCO.Client Connection (which then gets used by JCO.Server to fetch the Metadata) it makes programmers life much easier, because the metadata is built automatically by JCO and you don't have to do it by yourself
download ftp://ftp.sap.com/pub/sapjco/sapjco2xDocs.zip extract and have a look at Example 7
regards franz
Message was edited by:
Franz Ferner
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.