Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8709

Re: Retrieve x Amount of records in a internal table

$
0
0

I think the best solution would be to use package size.

 

When you use package size n with the select query, you select n rows at a time.

 

START-OF-SELECTION.

SELECT vbeln erdat FROM vbak INTO TABLElt_gty_vendormain PACKAGE SIZE 500.

 

    SELECT knumh kopos kbetr loevm_ko INTO TABLE lt_gty_amount

     FROM konp FOR ALL ENTRIES IN lt_gty_vendormain

       WHERE knumh   lt_gty_vendormain-knumh

       AND loevm_ko  NE 'X'.


    IF sy-subrc = 0.

      * Now you have the two internal tables.

        After processing the data, clear the tables and then continue with the next set of 500            in the first internal table.  This is a loop between select and end select.

     ENDIF.

ENDSELECT.


Viewing all articles
Browse latest Browse all 8709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>