Skip to Content
avatar image
Former Member

JCO not returning Table Data from RFC

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 21, 2004 at 07:50 AM

    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 (

    Passing table to RFC in Java iview )

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

    Regards

    Pran

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2004 at 07:46 PM

    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

    Add comment
    10|10000 characters needed characters exceeded