2007 Jun 20 2:05 AM
Hi experts,
I have a below statement in my code
"SELECT on EKPO for all entries on ITAB (which is having 4 hundread thousand recods )"
giving dump saying "MEMORY_PGFREE_FAILED" and "Error releasing memory block in paging"
i need your suggestion to avoid the memory problem
"MEMORY_PGFREE_FAILED" ?
can we go ahead with EXTRACT logic, does this solve the memory problem?
thoughts will be appriciated,
Thanks,
Shaik bhasha
Hi experts,
I have a below statement in my code
"SELECT on EKPO for all entries on ITAB (which is having 4 hundread thousand recods )"
giving dump saying "MEMORY_PGFREE_FAILED" and "Error releasing memory block in paging"
i need your suggestion to avoid the memory problem
"MEMORY_PGFREE_FAILED" ?
can we go ahead with EXTRACT logic, does this solve the memory problem?
thoughts will be appriciated,
Thanks,
Shaik bhasha
2007 Jun 20 2:12 AM
do you give primary key in where condition ?
and also check with basis - to increase time operation ,we used to run the report about 4 to 5 hours ( we schdule in background )..
2007 Jun 20 2:15 AM
thanks for ur immediate response.
i am using primary key. i dont want to change the basis memory settings.
does any other way to handle it, like packet sizing (does it handle memory issue) or EXTRACT will work.
thanks,
shaik bhasha
2007 Jun 20 2:18 AM
are you running foreground ?
try with fieldgroups instead of internal table ..
2007 Jun 20 2:38 AM
2007 Jun 20 2:33 AM
HI
Before using for all entries, try to sort internal table.
After that delete duplicate entries from internal table.
In select for all entries use as much as key fields in a selection table.
Still u face same problem then use field groups...
Regards
Ravi
2007 Jun 20 2:37 AM
i dont know how to use field groups..., can you please send the sample code.
i have done all duplication deletion.. passed all key fields of where clause in for all entries
thanks,
shaik bhasha
2007 Jun 20 2:44 AM
See the example code :
REPORT ZSPFLI LINE-SIZE 132 LINE-COUNT 65(3)
NO STANDARD PAGE HEADING.
TABLES:SPFLI,SCARR, SFLIGHT, SBOOK.
SELECT-OPTIONS: MYCARRID FOR SPFLI-CARRID.
FIELD-GROUPS: HEADER, SPFLI_FG, SFLIGHT_FG, SBOOK_FG.
INSERT:
SPFLI-CARRID
SPFLI-CONNID
SFLIGHT-FLDATE
SBOOK-BOOKID
INTO HEADER,
SPFLI-CARRID
SPFLI-CONNID
SPFLI-CITYFROM
SPFLI-AIRPFROM
SPFLI-CITYTO
SPFLI-AIRPTO
SPFLI-DEPTIME
SCARR-CARRNAME
INTO SPFLI_FG,
SFLIGHT-FLDATE
SFLIGHT-SEATSMAX
SFLIGHT-SEATSOCC
SFLIGHT-PRICE
INTO SFLIGHT_FG,
SBOOK-BOOKID
SBOOK-CUSTOMID
SBOOK-CUSTTYPE
SBOOK-SMOKER
INTO SBOOK_FG.
SELECT * FROM SPFLI WHERE CARRID IN MYCARRID.
SELECT SINGLE * FROM SCARR WHERE CARRID = SPFLI-CARRID.
EXTRACT SPFLI_FG.
SELECT * FROM SFLIGHT
WHERE CARRID = SPFLI-CARRID AND CONNID = SPFLI-CONNID.
EXTRACT SFLIGHT_FG.
SELECT * FROM SBOOK
WHERE CARRID = SFLIGHT-CARRID AND
CONNID = SFLIGHT-CONNID AND FLDATE = SFLIGHT-FLDATE.
EXTRACT SBOOK_FG.
CLEAR SBOOK.
ENDSELECT.
CLEAR SFLIGHT.
ENDSELECT.
CLEAR SPFLI.
ENDSELECT.
SORT.
LOOP.
AT SPFLI_FG.
FORMAT COLOR COL_HEADING.
WRITE: / SCARR-CARRNAME,
SPFLI-CONNID, SPFLI-CITYFROM,
SPFLI-AIRPFROM, SPFLI-CITYTO, SPFLI-AIRPTO, SPFLI-DEPTIME.
FORMAT COLOR OFF.
ENDAT.
AT SFLIGHT_FG.
WRITE: /15 SFLIGHT-FLDATE, SFLIGHT-PRICE, SFLIGHT-SEATSMAX,
SFLIGHT-SEATSOCC.
ENDAT.
AT SBOOK_FG.
WRITE: /30 SBOOK-BOOKID, SBOOK-CUSTOMID,
SBOOK-CUSTTYPE, SBOOK-SMOKER.
ENDAT.
ENDLOOP.
2007 Jun 20 3:09 AM
does this field-group will have same performace as for all entries?
thanks,
shaik bhasha
2007 Jun 20 3:24 AM
it is better than internal table ,try to test simple program with internal table and field group and do compare.
2007 Jun 20 4:08 AM
Bhasha,
In this situation in select statement you have to use PACKAGE SIZE.
BAsic syntax is
SELECT ... INTO|APPENDING [CORRESPONDING FIELDS OF] TABLE <itab>
[PACKAGE SIZE <n>] ...
Here you have 2 options.
Only First if you want to append the data in internal table you can use
1.SELECT CARRID CONNID
FROM SPFLI
APPENDING TABLE ITAB
PACKAGE SIZE 30000.
ENDSELECT.
========================
2. If you want to do some functionality on data which is coming in internal table in packaze size you can use
Ex :
SELECT CARRID CONNID
FROM SPFLI
INTO TABLE ITAB
PACKAGE SIZE 30000.
-
Here you can work on 30000 data next it will get refresh and next 30000 records will come.Here no appending of data in internal table .If you want data in internal table for long time use first example.
ENDSELECT.
Don't forget to reward if useful
2007 Jun 20 4:11 AM
<a href="https://websmp230.sap-ag.de/sap/support/notes/612415">Check OSS Note 612415</a>
Rewards if helpful.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |