Skip to Content
0

How to extract SAP TABLE from external system with ABAP

Feb 23, 2017 at 02:44 PM

196

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Nic Teunckens Feb 23, 2017 at 03:06 PM
0

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

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 23, 2017 at 03:14 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Nic Teunckens Feb 24, 2017 at 09:26 AM
0

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 ....

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 24, 2017 at 11:41 AM
0

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 ?

Share
10 |10000 characters needed characters left characters exceeded
Nic Teunckens Feb 24, 2017 at 09:39 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 28, 2017 at 07:31 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

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

1