Skip to Content
avatar image
Former Member

How to extract SAP TABLE from external system with ABAP

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Feb 23, 2017 at 03:06 PM

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

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 23, 2017 at 03:14 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 24, 2017 at 09:26 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2017 at 11:41 AM

    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 ?

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 24, 2017 at 09:39 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 28, 2017 at 07:31 AM

    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

    Add comment
    10|10000 characters needed characters exceeded