‎2006 Jul 25 3:49 PM
Hi,
We have a problem in executing the program. The code fetches millions of records for processing, due to this , the Dump occured. Any way to fine tune the Code to split the file and process the contents of it.
The Code :
select * from zglob_avail into table gt_zglob_avail.
lv_count = sy-dbcnt.
loop at gt_zglob_avail.
if gt_zglob_avail-offer_package is not initial and
gt_zglob_avail-good is not initial.
.
.
.
. endif.
endloop.
The Dump :
Roll..................... 16128
EM....................... 595179824
MM Used.................. 572595736
MM Free.................. 14183512
Regards,
Syed Ajaz
‎2006 Jul 25 3:52 PM
Depending on your needs:
1) Add a WHERE clause to reduce the recordset and process in "chunks"
2) Add an UP TO x ROWS to reduce the recordset and process in "chunks"
‎2006 Jul 25 3:53 PM
Hi,
Use field groups instead of internal tables.
Ex:
FIELD-GROUPS:x_database.
INSERT: x_fld1
x_fld2
x_fld3
INTO x_database.
move 1 to x_fld1.
move 2 to x_fld2.
move 3 to x_fld3.
EXTRACT x_database.
Regards
Appana
‎2006 Jul 25 3:53 PM
Try using pacgage size addition into your select statment.
BR, JAcek
‎2006 Jul 25 3:54 PM
Hi,
1.
Instead of using SELECT * , specify only the fields which are required.
eg. SELECT MATNR
MAKTX
from makt
where.....
2. In the WHERE clause specify the condition OFF_PACKAGE Not initial and good not initial.
3. This would avoid the If condition inside the loop.
Best regards,
Prashant
‎2006 Jul 25 4:19 PM
Hi,
use open cursor ,fetch with packet size logic
OPEN CURSOR WITH HOLD GV_DB_CURSOR FOR
SELECT * FROM ZCOX
WHERE BUKRS IN S_BUKRS
AND BUDAT IN S_BUDAT.
DO.
FETCH NEXT CURSOR GV_DB_CURSOR
INTO TABLE IT_ZCOXPRIHST
PACKAGE SIZE GC_SIZE. "Packet size 10000
IF SY-SUBRC NE 0.
CLOSE CURSOR GV_DB_CURSOR.
EXIT.
ENDIF.
Regards,
Amole
‎2007 Jul 09 2:00 PM