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: 

Hi very urgent, please help me.... rfc_read_table

Former Member
0 Kudos

Is there any memory constraints/no of records fetched by RFC_READ_TABLE

function module. Please suggest me.

9 REPLIES 9

Former Member
0 Kudos

Hi

RFC_READ_TABLE is an RFC that allows users to read a table remotely. This is important particularly to Java developers using JCO to communicate with an ABAP back-end. Unfortunately, RFC_READ_TABLE has size limitations; it also incorrectly reads binary data.

Note: no authorization checking takes place; that will need to be embedded in your version of the code. Also, you will need to define a table type with FIELDNAME as a line type.

0 Kudos

Hi Vasudha,

Thanks for quick reply.

Let me clearly tell my problem, actually my program using rfc_read_table is working fine if number of records to be fetched is few, however if records to be fetched more in thousands then its not working.

Please suggest

Former Member
0 Kudos

<b>SAP's RFC_READ_TABLE</b> function limits data retrieval to 512 bytes per row of data. Many SAP tables have more than 512 bytes of data per row. However, most business objects represent a small subset of all the database fields. Therefore, the total length of all attributes in a business object rarely exceeds the 512 byte maximum.

In those cases that require the connector to retrieve more than 512 bytes of data from a single database table, the additional fields must be represented in separate single-cardinality child business objects. For example, if a business object must represent 1500 bytes of data from a single table, the top-level business object contains at least two single-cardinality child business objects. Neither the parent nor either child has attributes whose total length (that is, the sum of their maximum length) exceeds 512 bytes.

<b>Note:</b>

If a business object represents more than one database table, the total length of the values in the attributes that represent each table cannot exceed 512 bytes. However, this limit does not pertain to the total length of the values of all attributes. For example, if a business object represents data from the tables that store information about Customers and CustomerPartners, the value of those attributes representing Customers cannot exceed 512 bytes, and the value of those attributes representing CustomerPartners cannot exceed 512 bytes, but the combined value of these attributes can exceed 512 bytes

<b><i>

REWARD IF HELPFUL.....</i></b>

0 Kudos

Hi,

Thanks for quick reply.

As you 512 bytes is limit for the size of row.

But i am getting problem with number of records to be fetched.

My program works fine if records to be fetched is few, however does not if more records to be fetched like in 1000's

Please suggest

0 Kudos

are you

getting error

DATA_BUFFER_EXCEEDED isnt it?

0 Kudos

F5 option is not going into funciton module, it directly executes funciton module in one step, so I could not even check what exactly is happening.

However expection should be 6 for DATA_BUFFER_EXCEEDED

but i get expection as 7 i.e sy-subrc value

please suggest

0 Kudos

<b>its not the number of records, its the length of a record which will create this problem. try to fetch only the fields you require.</b>

You can only move in two ways:

<b>Do not fecth any data, but only table structure (NO_DATA = 'X').

Do not fetch all of table fields.</b>

Hope this helps,

Regards

SANTOSH K.

0 Kudos

Hi all,

To further clearly tell my problem about RFC_READ_TABLE, i am able to execute it successfully if i give some where around 100 to 130 records for WHERE clause

however, if i give more than 130 records, then the problem comes, like sy-subrc =7.

Former Member
0 Kudos

Hi

The function RFC_READ_TABLE reads table records into a table with the structure TAB512. As the name somewhat indicates, this table has a single field with the length of 512 characters. This means you are limited to reading a combination of fields from your table that does not exceed 512 characters in width.

In most cases, if you are limiting your call to the specific fields you need, this should not be a problem.However, you should be aware of this limitation. Exceeding 512 characters in width will result in an exception of DATA_BUFFER_EXCEEDED.

Avoiding the Exception DATA_BUFFER_EXCEEDED

If you need more space than the allotted 512 characters for you table records, you can change the reference

type of the function’s table parameter DATA from TAB512 to some other similar structure having a single,

larger character field. Anyone familiar with searching the R/3 data dictionary (transaction SE11) should be

able to find a similar table with a larger character field in a matter of a few minutes. Simply swap the

newfound table or structure into the reference type for DATA using the function builder (transaction.

SE37). If you cannot find a suitable standard table or structure for your needs, you can simply create your

own using SE11. You should keep in mind that as you increase the size of your record buffer, the

performance of your function will wane. That can be a very critical issue for web applications.

U can refer to below linkfor more:

<u>https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/portal-content/simplified%20queries%20of%20sap%20tables%20from%20java</u>