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: 

RFC Enabled Function module to read DDIC tables & its values

Former Member
0 Kudos

Hi

Kindly let me know which RFC enabled function module has been used to extract DDIC tables & its values from the target system.

If not exist suggest me the code to achieve the same.

This is quiet urgent, quick response would be appreciated.

cheers

Alexander

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos

RFC_READ_TABLE

and

RFC_GET_TABLE_ENTRIES

These rfc function modules would let you read the data in the table you specify in the exporting parameters.

Regards,

Ravi

naimesh_patel
Active Contributor
0 Kudos

Hello,

Use, FM : 'RFC_READ_TABLE' to read the table contents.

DATA: I_OPT LIKE RFC_DB_OPT OCCURS 0 WITH HEADER LINE,

I_FLD LIKE RFC_DB_FLD OCCURS 0 WITH HEADER LINE,

I_DATA LIKE TAB512 OCCURS 0 WITH HEADER LINE.

L_TAB = 'TFDIR'.

CONCATENATE 'FUNCNAME' '=' '''' INTO I_OPT-TEXT SEPARATED BY ' '.

CONCATENATE I_OPT-TEXT 'RFC_READ_TABLE' ''''

INTO I_OPT-TEXT.

APPEND I_OPT.

CLEAR I_OPT.

I_FLD-FIELDNAME = 'FUNCNAME'.

I_FLD-OFFSET = '000000'.

I_FLD-LENGTH = '000030'.

APPEND I_FLD.

CLEAR I_FLD.

CALL FUNCTION 'RFC_READ_TABLE' DESTINATION RFCDEST

EXPORTING

QUERY_TABLE = L_TAB

TABLES

OPTIONS = I_OPT

FIELDS = I_FLD

DATA = I_DATA.

Regards,

Naimesh

Former Member
0 Kudos

Hi,

Unless you are planning on reading couple of tables, RFC_READ_TABLE is not the ideal choice as you will to call the same one multiple times.

If you are trying to fetch some transactional data, try writing a custom RFC and call that.

Regards,

Ravi

Note : Please mark the helpful answers

former_member188685
Active Contributor
0 Kudos

Hi,

you can use RFC RFC_READ_TABLE for both the cases.

for first case give the table name as <b>DD02L</b> to get all the tables, and for getting the table info then use that table name only.

Regards

vijay