cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Function Module to fetch Table data

former_member233553
Active Participant
0 Kudos

Hi Team,

We are using RFC_READ_TABLE Function module to fetch reference data from LAGP (Storage Bin data) table, but the issue is in destination server, there are more ther 1 Lakh data, but we are only able to fetch 1.23k data by this function module, please help me out, if anything is missing out.

Regards

Kumar.

Sandra_Rossi
Active Contributor
0 Kudos

1 Lakh = India word for 100.000 in international numeric system

Accepted Solutions (1)

Accepted Solutions (1)

NTeunckens
Active Contributor
0 Kudos

Please check the following references on how to experiment with "RFC_READ_TABLE" :

  • SAP-KBA 1752954 : link
  • Working around limitations of TableReader / RFC_READ_TABLE Symptoms : link
former_member233553
Active Participant
0 Kudos

Hi Nic,

Thanks a lot for your quick help, I have created the custom FM but once I am running this FM system is throwing runtime error CALL_FUNCTION_Not_found, and in your link lastly mentioned is some think like that,
tr = s.GetTableReader("some_table")

 tr.Option("tablereader.transportcall") = "ZRFC_READ_TABLE"
 tr.Read(0,0)
Where I need to add this thing.
Also output is giving differently for different tables.

Regards
Kumar.
NTeunckens
Active Contributor

The RFC "Z_AW_RFC_READ_TABLE" is not always provided / installed straight away (it is part of "SAP Data Services"). Please verify if SAP-BASIS is able to obtain this RFC-code as is mentioned in some other posts (link, link).

They should be able to 'install' this additional RFC.

Alternatively, some people also suggest making use of RFC "/BODS/RFC_READ_TABLE" ...

former_member233553
Active Participant
0 Kudos

Hi Nic,

Thanks a lot we are trying to do same, will let you inform.

Regards

Kumar.

former_member233553
Active Participant
0 Kudos

Thanks Nic,

We have done, BASIS has installed it.

NTeunckens
Active Contributor

Great (you have some willing / fast BASIS people) ...

Hopefully this can set you on the path to a solution.

Please Close the Question if this has actually answered your Query.

Answers (3)

Answers (3)

weberpat
Contributor

Hi Kumar,

RFC_READ_TABLE has many limitations and shortcomings and you should never use it in a productive scenario. However, I don't recall that a restriction of the number of rows that can be returned is one of them. Are you getting any errors?

In any case, it's a good practice to download data in slices when dealing with this type of volume. Have you tried restricting the result to say 1000 rows and using the rowskip parameter to fetch the data in multiple iterations?

Regards,

Patrick

former_member233553
Active Participant
0 Kudos

Hey Patrick

Once I put 2300 in rowcount parameter it is giving 1123 records and it is fixed for all time.

kiran_k8
Active Contributor
0 Kudos

Kumar,

Read many threads, stating that using this FM in PRD is not advisable and will not be consistent as it is not released for Customer usage.

Btw did you tried Open Cursor/Fetch Cursor/Close Cursor methodology while writing the select query of this table ?

K.Kiran.

Sandra_Rossi
Active Contributor
0 Kudos

I second @weberpat in that by default RFC_READ_TABLE returns all rows of the logged-in client. So, if it doesn't return the rows you expect, then it means that you don't log in the right system/client.

raymond_giuseppi
Active Contributor
0 Kudos

First read 382318 - FAQ|Function module RFC_READ_TABLE, then (at your own risk) you can look for parameters ROWSKIPS and ROWCOUNT and multiple call of the FM...)

But what is the actual business requirement to extract the whole table?

former_member233553
Active Participant
0 Kudos

Hey Raymond,

Actually we want to sync up LAGP storage bin data from one system to another, we have written a custom program for this function, inside the program we are calling the FM.

raymond_giuseppi
Active Contributor

Didn't you find any less ressource intensive solution, like some delta load or a standard/custom tool like an Idoc/change pointer solution, even considering some implicit enhancements in function group L01S which contains the L_LAGP* update FMs?