01-22-2008 10:06 AM
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.
01-22-2008 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
01-22-2008 10:35 AM
But here i dont know the material numbers. We have only rows number.
Edited by: Amit Kumar on Jan 22, 2008 6:00 PM
01-22-2008 1:05 PM
Hi,
Do like this
SELECT matnr matkl
FROM mara
INTO TABLE it_mara PACKAGE SIZE 50.
Regards,
Satish
01-22-2008 1:17 PM
yeah that way ic an read the size in packages but is it possible to asign the starting point of read in the query. I mean if i want to read from 10000th record to 15000 then wher we will set the cursor directly to to 10000th record without know the material number.
01-22-2008 2:29 PM
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