2010 Jan 15 5:00 PM
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
2010 Jan 15 5:05 PM
2010 Jan 15 5:29 PM
With RFC_READ_TABLE I still have the same problem with the return lenght.
2010 Jan 15 5:53 PM
2010 Jan 15 5:55 PM
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
2010 Jan 15 7:25 PM
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
2010 Jan 15 9:44 PM
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.
2010 Jan 16 2:36 AM
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.