‎2008 Jan 24 4:29 AM
Hi all,
I want to fetch all the opbel records from erdk table into an intrnal table.
Only opbel records.There are 100000000 records in erdk table.
How can I fetch into internal table ? what statement can I use to fetch the data faster keepin performance into consideration ?
Many thanks
‎2008 Jan 24 4:35 AM
hi,
try this
data: itab like erdk occurs 0.
select * from erdk into corresponding fields of itab.
endselect.
Edited by: Rajasekhar Reddy on Jan 24, 2008 10:05 AM
‎2008 Jan 24 4:41 AM
Hi,
As far as data fetch is concerned you do the same as follows:
Select * from erdk into table itab
where..... < Your Where Condition if any>.
But as the number of records are very high, first try to put all the primary keys in the where clause and also if possible, try to narrow down the selection criteria by fetching data from some other table or widening the conditions in where clause.
Also try to fetch only thode fields which you actually need.
else your program will give performance problems.
Hope this helps!
Regards,
Lalit
‎2008 Jan 24 4:43 AM
Hi,
Data: itab LIKE TABLE OF erdk WITH HEADER LINE.
SELECT * INTO TABLE itab
FROM erdk.
‎2008 Jan 24 4:48 AM
gaurav,
Generally when you try to select all records of field OPBEL into to internal table there is chance to go to the report dump.
So better you use package size.Here you will get slect....end select but you can stop the program from dump.
SELECT opbel
INTO APPENDING TABLE ITAB
PACKAGE SIZE 30000.
Here if you want to do any validations you can do code here.....
ENDSELECT.
Don't forget to reward if useful...