cancel
Showing results for 
Search instead for 
Did you mean: 

not work to get return table?

former_member1137458
Participant
0 Kudos

T_GRINFO_SCANNED is required pass table.

T_GRINFO_ERROR is return table.

http://img89.imageshack.us/img89/7953/20101101212907.png

how to get the return table?

In my case is return 1 row..why always return 0 rows???


JCoTable table = function.getTableParameterList().getTable("T_GRINFO_ERROR");
System.out.println("T_GRINFO_ERROR Total Rows: " + table.getNumRows()); // return 0

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

As your code looks ok, my first test would be to check if the parameters you've supplied are correct. One of the common mistakes is to forget to apply any conversion exits to input parameters (which is done automatically when you execute a function in test mode directly in SAP via transaction SE37). If you want to validate the parameters that you've supplied you can also debug your JCo connection.

I like usually the quick approach of enabling debugging on the JCo client side via the connection parameters (check out [OSS note 1258724 - Starting SAPGUI using external RFC libraries|https://service.sap.com/sap/support/notes/1258724] for prerequisites):


jco.client.abap_debug=0
# Use SAP gui: [0,1,2] --> [without,with,invisible]
jco.client.use_sapgui=1

Strangely enough the property jco.client.abap_debug seems to have disappeared from the JCo3 documentation; I'm not sure why, because the property still works. In JCo 2.x the property appears for example in the API documentation for method <em>JCo.createClient(java.util.Properties)</em>.

Now there's two other things I can think of. In theory you could have set the parameters as inactive - I doubt that's applicable in your case, but you can check out methods JCoParameterList.setActive(). Also, in the old days I know I had sometimes problems with TABLES parameters if the function interface didn't declare them properly (e.g. missing meta data, because the function object/metadata was created manually on the JCo side - I have not tested this with JCo3 though, so quite possibly this is no longer relevant).

Cheers, harald

former_member1137458
Participant
0 Kudos

Go to SE37 to RUN, It is return 1correctly.

However, go back to java to run the code cannot get correct result.

Answers (0)