Problem solve Get help with specific problems with your technologies, process and projects.

Setting values of a table parameter in JCo

Dear Mr Schuessler, your JCo tutorial is a great help, but one point I could not find:
If you have to set the values of a table parameter (which will be used here in the role of an "import" parameter!) I tried:
function.getTableParameterList().setValue("IFDM|||11111111111|5655018|||", "QUERY"); where QUERY is built up with 8 fields). Eg, the first of these 8 fields is called TYPE, so could I set the field using a syntax like: ... .setValue("...", "QUERY.TYPE). I tried several versions, but had no success. An error message (to my first try above) was:
com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Cannot convert a value of 'IFDM|||11111111111|5655018|||' from type java.lang.String to TABLE at field QUERY at com.sap.mw.jco.JCO$Record.createConversionException(Unknown Source).
It would be great if you could provide a code snippet with an example.
This requirement is indeed discussed in my tutorial, mainly in section 6 (Table Manipulation). I have excerpted and adapted the required source statements so that you should only have to fill in the correct table parameter name in order for this to work:

JCO.Table table = null; table = function.getTableParameterList().getTable("<name of table parameter>"); table.appendRow(); table.setValue("IFDM|||11111111111|5655018|||", "QUERY");

Dig Deeper on SAP ABAP