cancel
Showing results for 
Search instead for 
Did you mean: 

JCO not returning Table Data from RFC

Former Member
0 Kudos

Hi,

I have written a RFC in ABAP having ..

1) One Import parameter.

2) NO EXPORT Parameter.

3) One Table. (Returning 'n' rows of data field 'WA').

I am calling the RFC using JCO.

No output is displayed. The ABAP functions is working fine

when tested using SE37.

How call function with this combination?

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Milind,

This is how I have done.

I pass the parameter to import parameter list. The abap code looks if any import parameter is added. Then it fills one of the tables with data values. Then I call the table and display the results and set the import parameter to something else.

JCO.Field import = function.getImportParameterList().getField("<Field Name>");

import.setValue("<Field Value1>");

Table1=function.getTableParameterList().getTable("<Table Name>");

Table2=function.getTableParameterList().getTable("<Table Name>");

mConnection.execute(function);

Then I get the table values from the required table1 and table2. Then Finnaly before exiting from the connection

I reset the value of Import parameter

JCO.Field import = function.getImportParameterList().getField("<Field Name>");

Con2.setValue("<FieldValue2>");

mConnection.execute(function);

mConnection.disconnect();

Hope this helps to understand from J2ee perspective what is happening. So accordingly you can write the ABAP code to change the table values based on the values that you get in the import Parameters.

Ravi

Former Member
0 Kudos

Hi Milind

Does your import fields have conversion exits attached to it . In which case the data which you pass from Java via JCO will bypass the exits and the intended data will not be passed into the Function module.

Other reason could be that you have not coded properly to extract the data out of the table.

There are ways to debug this. This link (

)

contains pointers to how you can investigate this. Hope it help

Regards

Pran