Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

GEN_KEY and FROM_KEY of RFC_GET_TABLE_ENTRIES

Former Member
0 Kudos

Hi there,

I am using JCO java connector in my own client application to talk to SAP. I need to use RFC_GET_TABLE_ENTRIES to read table entries.

Just wondering if anyone knows how to use GEN_KEY and FROM_KEY of this function to narrow the table read as it currently returns all the entries in the table. Could someone provide the exact syntax of the data that I need to pass to these two parameters please?

Your help is much appreciated!

3 REPLIES 3

naimesh_patel
Active Contributor
0 Kudos

In GEN_KEY you can pass the general key.

Like if for table MARA, if you want only materials with begins with TEST, you can give it into GEN_KEY = 'TEST'.

FROM_KEY and TO_KEY is helpful to restrict the data between those keys.

Regards,

Naimesh Patel

0 Kudos

Thanks for your reply.

I am using this table "USRSYSACTT". It is keyed on "MANDT", "SUBSYSTEM", "LANGU" and "AGR_NAME". When I want to only get the entry where the SUBSYSTEM = "SUB123", LANGU="E" and AGR_NAME="Role Name", I passed GEN_KEY="SUB123 ERole Name ". It did not work for me. It seems that only the "SUBSYSTEM" field has some effect. It returns all the entries with the correct subsystem. But the LANGU and AGR_NAME do not seem to have any effect.

Any idea what I have done wrong.

Thanks again

former_member194669
Active Contributor
0 Kudos

Hi,

Its have output length limitation of 512. Try to use RFC_READ_TABLE its have better options (its also have same length limitation)