cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract SAP TABLE from external system with ABAP

Former Member
0 Kudos

Hi,

from an external system I have to extract all the data of some SAP ECC table containing millions of records. I tried using the FM RFC_READ_TABLE but go in memory dump for memory exhaust. How can I call from the external system via RFC once a FM and ensure that it runs several times to break the extractions?

Many thanks.

Charly

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member330793
Discoverer
0 Kudos

Hello Nic,

I understand that with the RFC there are limitations both of consumed memory and CPU time. Since the Z_AW_RFC_READ_TABLE program is not installed on the system (not installed the Data Service), how could I resolve to read more fields in tables with millions of records without the FM goes to dump memory problems? I have some alternatives with RFC?

Many thanks.

Charly

NTeunckens
Active Contributor

You could try the third approach in this link ...

Additionally, talk to SAP-BASIS when memory is an issue (can these parameters be changed) ...

NTeunckens
Active Contributor
0 Kudos

Hello Charly

Please understand that there are limitations to what you can do with the mentioned RFC's ... the "Z_AW_RFC_READ_TABLE" RFC can consume more data ... See SAP-KBA 1752954 that mentiones up to 2048 bytes per row.

A nice example on what you could do in a Custom-Copy of "RFC_READ_TABLE" is mentioned in this link ...

Also verify with SAP-BASIS if they can / want / are allowed to make any changes in terms of Memory Consumption ...


Kind regards

Nic T.

Former Member
0 Kudos

Nic,

my problem is that I need to import into an external system not-sap the contents of various tables (VBAK, VBAP, etc) in FULL mode with most of the fields via RFC. Given that the tables may contain millions of records, the FM RFC_READ_TABLE goes into dump because it fails to extend the internal table because memory. So I thought if we could build some FM that called from the external system in LOOP reads a fixed number of records (package size) and send it to the external system and so on. It's possible ? As ?

NTeunckens
Active Contributor
0 Kudos

Some possible solutions would be :

  • Make use of the "ROWCOUNT" / "ROWSKIPS" to 'chunk' your Query ;
  • See if you can use the "FIELDS"-table to indicate a limited set of Columns that you actually need ;
  • Use other RFC's (*)


(*) Other Standard-FM is "BBP_RFC_READ_TABLE" or "Z_AW_RFC_READ_TABLE" (the second is not available on every System and even though 'Z' it is a SAP-(Standard)-Function ....

Former Member
0 Kudos

Hi Nic,

i read all records table vbap but the FM dump for memory exhausted.

How can I do ? I can use another FM ? How do I segment the extraction with a single call from the external system? Or i can use the Open Cursor and Fetch and passed

cursor variable as a parameter at next call ?

Thanks.

Charly

NTeunckens
Active Contributor
0 Kudos

What specific error are you getting (in trx. "ST22")?

Further, check SAP-KBA 1752954 and consider the limitations of this RFC ...