Skip to Content
author's profile photo Former Member
Former Member

Error making an outgoing call within a SELECT loop.

Hello ABAPpers,

In my custom application, an external .NET program invokes a custom RFC. This custom RFC processes some queries and sends the records back to the .NET program. As the number of records are more than 10 million, the RFC sends the records in batches of 1000. Here is the pseudo ABAP code:


IF ROWCNT = 1000.





When the RFC executes, CLIENT_RFC is invoked as expected. However, once we return from CLIENT_RFC, the ABAP program terminates with an error "Invalid interruption of selected database when accessing..."

It appears that the SELECT mechanism does not like making outgoing calls:-(.

Can someone please enlighten me on how to fix this problem? I am hoping there is some way to instruct the database not to interrupt itself.

Thank you in advance for your help.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2005 at 06:17 AM


    you should select the data into a internal table first, loop over the table and do the call.

    select * into table itab from dbtab

    where cond.

    rowcnt = 0.

    loop at itab.

    if rowcnt = 1000.

    call function ....

    rowcnt = 0.





    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Siggi.

      In this case my only concern is the performance penalties when dealing with 10+ million records?

      Would having to move all data into an internal table affect SAPs performance?

      Thanks for your help.



  • Posted on Jan 19, 2005 at 07:03 PM

    Hi Sheetal,

    this depends on how much 'blah' you select.

    Let's say, you select 10 000 000 entries with 1 Byte, then you have (about) 10MB. Each additional selected Byte will add another 10MB...

    Reasonable size of program in memory is about 200MB, 500MB is possible (but should be discussed with basis team) and 1GB doesn't make much sense any more - program parts will be swapped to harddisk much earlier.

    This is the border, were performance will break in: swapping.

    So count selected fields carefully.

    If you need to select to much columns, split execution by restriction with something like

    select * into itab up to 1000 rows
         from DB
         where key > old_key
         order by primary key.
    if sy-dbcnt < 1000.
    old_key = last line of itab.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 19, 2005 at 09:00 PM

    Were you in debugging mode when you get this error.

    You also want to look at using PACKAGE SIZE n when doing the select statement for performance improvement.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.