‎2009 Apr 22 5:41 AM
Hi Experts,
I have a select query, which yields huge amount of data. Due to its size, the internal table is not getting filled and raises some memory problem. Can I spilt that selection into multiple small selections and append it to the same internal table. If possible, how can it be done?
Thanks and regards,
Venkat...
‎2009 Apr 22 5:50 AM
Hi Venkat,
You can try this.
SELECT *
FROM XXXX
APPENDING TABLE ITAB PACKAGE SIZE 500.
ENDSELECT.
This query will fetch 500 records and time and add it to ITAB and proceed with fetching next 500 records.
Hope it helps.
Regards,
Komal
Edited by: Komal Lakhwani on Apr 22, 2009 10:20 AM
‎2009 Apr 22 5:46 AM
Dear
You can do this by resticting the number of records
select *
from bseg
where
........
...
up to 100 rows .by this you can restrict number of rows .
rgds ankit
‎2009 Apr 22 5:51 AM
This will repeatedly selecting same 100 records. But the second selection should be 101-200.
‎2009 Apr 22 6:39 AM
Hi,
You can use this logic:
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
END OF ITAB.
DATA: VAL TYPE STRING,
N TYPE I.
SELECT VBELN FROM VBAK INTO TABLE ITAB UP TO 100 ROWS.
LOOP AT ITAB. " First 100 records selected
WRITE:/ ITAB-VBELN.
ENDLOOP.
DESCRIBE TABLE ITAB LINES N.
LOOP AT ITAB.
IF SY-TFILL = N.
VAL = ITAB-VBELN.
ENDIF.
ENDLOOP.
CLEAR ITAB.
*WRITE:/ VAL.
SELECT VBELN FROM VBAK INTO TABLE ITAB UP TO 100 ROWS
WHERE VBELN GT VAL.
" Next 100 records selected
LOOP AT ITAB.
WRITE:/ ITAB-VBELN.
ENDLOOP.thanks\
Mahesh
‎2009 Apr 22 6:55 AM
Hi Venkat,
You can try this.
SELECT *
FROM XXXX
APPENDING TABLE ITAB PACKAGE SIZE 500.
ENDSELECT.
This query will fetch 500 records and time and add it to ITAB and proceed with fetching next 500 records.
This should work.
Regards,
Komal
‎2009 Apr 22 5:47 AM
Hi Venkat,
Can you be little more clear, from which tables are you picking the data how did you write the select statement ?
Regards
Kumar M
Edited by: Kumar M on Apr 22, 2009 6:47 AM
‎2009 Apr 22 5:50 AM
Hi Venkat,
You can try this.
SELECT *
FROM XXXX
APPENDING TABLE ITAB PACKAGE SIZE 500.
ENDSELECT.
This query will fetch 500 records and time and add it to ITAB and proceed with fetching next 500 records.
Hope it helps.
Regards,
Komal
Edited by: Komal Lakhwani on Apr 22, 2009 10:20 AM
‎2009 Apr 22 5:51 AM
hi,
use views it will solve u r problem it is very fast .
hope it will help u .
‎2009 Apr 22 6:36 AM
create views with suitable inner joins
and after that use the view for picking the data with suitable select query.
it will increase your performance.
As for as possible try to use maximum no. of possible keys
with regards
s.janagar
‎2009 Apr 22 7:37 AM
HI ,
first try to search for any database view if its then use it and if not first make secondry keys of the tables you are using then make ur own custom database view .
use inner join and replace all the like sataments with the type
most important is to make the secondry keys of the table for which you are going to select .
Regards
Digvijay Rai