cancel
Showing results for 
Search instead for 
Did you mean: 

Alternatives to RFC_READ_TABLE?

Former Member
0 Kudos

Hello

I currently writing an application using the .Net connector that extracts tables from SAP into a local database. As this is an application that should work generically with any SAP implementation, I cannot write a custom RFC for this task, and I need to use an RFC that also allows for filter conditions (i.e. I can define the WHERE clause somewhere).

I have been using <b>RFC_READ_TABLE</b>, which I know is not recommended nor supported by SAP. However it does not retrieve data in Unicode, so the Japanese/Russian/Greek/etc. records that I retrieve are all garbled.

Is there another predefined RFC that can do accomplish this? Basically I need the following:

-> Input table name

-> Input WHERE conditions

-> Retrieve fields and data from table in Unicode

I have been looking into the following RFCs on my system:

<b>RFC_GET_TABLE_ENTRIES

TABLE_ENTRIES_GET_VIA_RFC

GET_TABLE_RFC</b>

...but documentation and on-line information about them is extremely limited.

Any help is highly appreciated.

Szeming

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Re: OSS Note 758278

It describes how to modify the code of RFC_READ_TABLE so that it supports Unicode.

Unfortunately... I <i><b>wish</b></i> I could actually change the function, but this application is meant to run on systems for our clients without any modification to the SAP systems (this includes writing new function modules or modifying existing ones).

Otherwise this would have been a much easier problem to solve!

Lakshmant1
Active Contributor
0 Kudos

Hi Szeming,

For retrieving unicode data using RFC_READ_TABLE, Please refer OSS Note 758278.

Thanks

Lakshman

Nigel_James
Active Contributor
0 Kudos

Just a quick note to say that the correct url to the blog mentioned above is:

[RFC_READ_TABLE|/people/piers.harding/blog/2004/11/10/rfcreadtable--my-old-faithful--what-has-happened-to-you] [original link is broken];

/people/piers.harding/blog/2004/11/10/rfcreadtable--my-old-faithful--what-has-happened-to-you

Cheers,

Nigel

Edited by: Nigel James on Jun 4, 2009 2:12 PM

andreas_mann3
Active Contributor
0 Kudos

Hi Szeming,

I use fm <b>TABLE_ENTRIES_GET_VIA_RFC</b> on principle.

And it works very fine !

(versions are the same in 4.6 and 4.7 )

example:

data: wtab type BDSEL_STAT occurs 0 with header line.

data: tab type BDI_ENTRY occurs 0 with header line.

CALL FUNCTION 'TABLE_ENTRIES_GET_VIA_RFC'

destination dest

EXPORTING

LANGU = SY-LANGU

TABNAME = name

TABLES

SEL_TAB = wtab

  • NAMETAB =

TABENTRY = tab

EXCEPTIONS

INTERNAL_ERROR = 1

TABLE_HAS_NO_FIELDS = 2

TABLE_NOT_ACTIV = 3

NOT_AUTHORIZED = 4

OTHERS = 5 .

regards Andreas

Former Member
0 Kudos

Hello Andreas

I was trying this module and it seems to return the same garbled data for the foreign character sets. Is there a flag that I need to set so that it returns the data in Unicode?

And also is this FM supported by SAP?

Thanks

Szeming

Former Member
0 Kudos

Hi,

Take a look at https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/weblogs/Weblogs/pub/wlg/10.... [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] Its comments section points to various resources on this FM. See if this helps.

Regards