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

select * from mara from row 1 up to row2

Hi All

I want to fetch records from MARA table in packets.

Like select matnr

matkl from MARA into table itab

from row1 up to row2.

Here Row1 and row2 are variables n could have values like 10000 to 20000.

Please suggest me any idea here which i can use here to get records in packets without using do..enndo or select ..endselect.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 10:11 AM

    Create ranges and pass the range of values in the low and high values and use the select statement as below.

    Let us suppose you have created range r_range

    r_range-low = '100000'

    r_range-high = '200000'.

    r_range-options = 'BT'.

    r_range-sign = 'I'.

    select matne from mara into table where matnr in r_range.

    rewars points if useful,

    Thanks,

    Nageswar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 01:05 PM

    Hi,

    Do like this

    SELECT matnr matkl

    FROM mara

    INTO TABLE it_mara PACKAGE SIZE 50.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      If you read data in packages of 5000, then the last record of the second packet will have the first record of the data that you want you want. The rest of the data will be in the third packet (less the last record). There is no way that I know of to go directly to the 10,000th record.

      Rob

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.