Application Development and Automation 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: 
Read only

Remote table reading

Former Member
0 Likes
2,487

Hi!

I need to acess data from tables located on a remote SAP system. How can I do that?

Is there any RFC to do that?

I've tried to use RFC_GET_TABLE_ENTRIES, but it only returns a table with a work area up to 512 characters, and I need some more.

Thanks in advance.

Regards,

André Filipe Madeira

7 REPLIES 7
Read only

former_member156446
Active Contributor
0 Likes
1,365

did u try RFC_READ_TABLE

Read only

0 Likes
1,365

With RFC_READ_TABLE I still have the same problem with the return lenght.

Read only

0 Likes
1,365

what make you need more than 512 characters?

Read only

0 Likes
1,365

Hello,

I know that this is not pretty, but you could call RFC_READ_TABLE 2 or 3 or 4 times( as many as needed)

and each time speicfiy a different set of fields. Then of course you may have to recombine the data into a

single table.

Regards

Greg Kern

Read only

Former Member
0 Likes
1,365

The 512 character limit seems to be because of the data type that is used in the FM. You could copy the FM to your own group and modify it to use a longer data type.

I tried this; it seems to work.

Rob

I should add that I tried this in the local system, not as an RFC.

Edited by: Rob Burbank on Jan 15, 2010 3:14 PM

Read only

Former Member
0 Likes
1,365

André,

Do you want to get the entire table contents and the row width is more than 512? How often would you do it? Does this happen in a dialog transaction or in a batch job? Do you have access to the remote system for creating your own RFC FM?

If you don't have developer's access to the remote system, and you want large amounts of data, and on a frequent basis, then you have to look for other interfaces. IDoc, flat file transfers, etc.

Read only

adrian_dorn
Advisor
Advisor
0 Likes
1,365

If you know the database user name / password of the other SAP system it woud be an option to integrate the other database in table DBCON (this is done with transaction DBCO). Afterwards you can submit SELECT statements against any table of the other system. Check the documentation of the EXEC SQL - CONNECT statement for further details.

Remark: If the two SAP systems run under different DBMS (e.g. one under MaxDB and the other under ORACLE) you will have to install some software on the application server to make this work. If both SAP systems use the same DBMS no software installation is required.