2008 Dec 08 2:15 PM
hi guruz,
i have requirement something like that in a table more than 3 lakh record are there.
i want to fetch records in a block of 1000 . how can i achive this.
i already implemented one way that fetch all records (3 lakhs) one time , and process those in internal table .
But selecting 3lakhs records at one time abap application server giving timeout error.
some cofigraution required or what.
please guide me.
warm regards.
hi guruz,
i have requirement something like that in a table more than 3 lakh record are there.
i want to fetch records in a block of 1000 . how can i achive this.
i already implemented one way that fetch all records (3 lakhs) one time , and process those in internal table .
But selecting 3lakhs records at one time abap application server giving timeout error.
some cofigraution required or what.
please guide me.
warm regards.
2008 Dec 08 2:22 PM
2008 Dec 08 2:24 PM
SELECT UP TO 1000 entries will not work because it will give you the first 1000 but you wont be able to fetch subsequent 1000 entiries.
2008 Dec 08 2:23 PM
Are these 3Lakh records coming as successful data or you are filtering at a later stage?
Is there no way to restrict the number of entries by using any Where conditions?
Even if you process in chunks of 1000, program will give you a TIME OUT error because eventually you intend to process 3 Lakh entries.
2008 Dec 08 2:29 PM
can u send the code,
or are you using lots of looping statements or are you using append statement then there will be a timeout error.
2008 Dec 08 2:52 PM
what's the table structure ?
Dont you have identification to septrate records like ordrnum .. etc ..
if possible an another feild' can be inserted in the table with index number of record this speeds the processing some time if we dont have proper primary key
2008 Dec 08 2:56 PM
Hi Pawan ,
You will have to use Oracle Hints to select the data in blocks of 1000 , please refer to some document on oracle hints .
But that would also not help the tim out , because when you use that it basically acts as select endselct statement and the system might again give a tim out error , so my suggestion would be to try to optamize your select starement .
Regards ,
Arun
2008 Dec 08 2:57 PM
Hi..
Even if you try fetching records in block of 1000's.. you anyway..need 3 lakh record.. it would go for runtime error..then also....
So.. i guess either you reduce teh number of records to be selected.. or .. run the program in background....
2008 Dec 11 8:46 AM
Hi,
what about doing it package by package ( 1 package = 1000 rows) and process the int. table as you like:
DATA: itab TYPE STANDARD TABLE OF SCARR WITH NON-UNIQUE
DEFAULT KEY INITIAL SIZE 10.
FIELD-SYMBOLS: <FS> TYPE scarr.
SELECT * INTO TABLE itab PACKAGE SIZE 1000 FROM scarr.
LOOP AT itab ASSIGNING <FS>.
... process it
ENDLOOP.
ENDSELECT.
Set the package size high enough that you have not many additional selects
(10.000 or 50.000 should be also ok).
Please be aware that the int. table is only defined inside the SELECT / ENDSELECT.
bye
yk
2008 Dec 11 9:24 AM
In this example, four columns of the result set are read into four individually specified columns of a structure. Unlike in the previous example, the runtime environment does not compare names here.
DATA wa TYPE spfli.
SELECT carrid connid cityfrom cityto
FROM spfli ... INTO|APPENDING [CORRESPONDING FIELDS OF] TABLE itab [PACKAGE SIZE n]
INTO ENDSELECT.
PACKAGE SIZE n >>>>>>>>>>>>>>.Imp keyword for you
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |