‎2007 Sep 03 12:15 PM
Hi developers,
I am executing a report in the back ground from the selection screen,the selection screen contains work centers from 1 to 18 individually.
we can have range 1 to 18 at once or we can execute each work center invidually.
when executing work centers individually the back ground job is getting failed and the reports are leaving to dump.
The answers which can fulfill my requirement will be awarded poins.
kindly do the need for me.
short dump analysis:
Unable to fulfil request for 67108864 bytes of memory space.
what happend:
Each transaction requires some main memory space to process application data.If the operating system cannot provide any more space, the transaction is terminated.
what can you do:
try to find out (eg:targeted data selection) whether the transaction will run with less main memory.
if there is a temporary bottle neck execute the transaction again
Problem at the code:
IF p_zdrm <> 'X'. " IF ZDIS Or Summary selected.
IF NOT itvia_zdis[] IS INITIAL.
SELECT ordernum
discno FROM ediscact
INTO TABLE itediscact
FOR ALL ENTRIES IN itvia_zdis
WHERE ordernum = itvia_zdis-aufnr.
IF NOT itediscact[] IS INITIAL.
SORT itvia_zdis BY aufnr.
LOOP AT itediscact.
READ TABLE itvia_zdis WITH KEY aufnr = itediscact-ordernum
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE itvia_zdis-kunum TO itediscact-gpart.
MODIFY itediscact TRANSPORTING gpart.
ELSE.
DELETE itediscact.
ENDIF.
ENDLOOP.
SELECT vkont
discno
opbel
gpart FROM fkkmaze
INTO TABLE itfkkmaze
FOR ALL ENTRIES IN itediscact
-
> WHERE gpart = itediscact-gpart.(problem located here)
AND
discno = itediscact-discno.
IF NOT itfkkmaze[] IS INITIAL.
SORT itediscact BY discno.
SORT itfkkmaze BY discno.
LOOP AT itfkkmaze.
READ TABLE itediscact WITH KEY discno = itfkkmaze-discno
BINARY SEARCH.
IF sy-subrc NE 0.
DELETE itfkkmaze.
ENDIF.
ENDLOOP.
ENDIF.
itfkkmaze_zdis[] = itfkkmaze[].
IF NOT itaufk[] IS INITIAL.
***itvia_zdis
--Join with fkkmaze using opbel
SELECT vkont
betrw
augrd
augst
augdt
hvorg
tvorg
opbel
faedn FROM dfkkop
INTO TABLE itdfkkop_zdis
FOR ALL ENTRIES IN itfkkmaze
WHERE opbel = itfkkmaze-opbel.
FOR ALL ENTRIES IN itaufk " change to itfkkmaze
WHERE opbel = itaufk-zz_vkont.
IF NOT itdfkkop_zdis[] IS INITIAL.
itdfkkop[] = itdfkkop_zdis[].
ENDIF.
SELECT vkont
msalm
mahns
laufd FROM fkkmako
INTO TABLE itfkkmako
FOR ALL ENTRIES IN itvia_zdis
WHERE vkont = itvia_zdis-zz_vkont.
ENDIF. "itediscact not initial
ENDIF. "itvia_zdis initial.
ENDIF. " ZDIS chosen.
.
‎2007 Sep 03 12:21 PM
Hi Naveen,
After the LOOP statement, you are directly using the select query..
However in the LOOP, you are deleting records of table itediscact. and after this loop you are fetching data from fkkmaze for all entries in itediscact.
If the table itediscact gets empty in the loop, means all records gets deleted, then the system will try to fetch all records in the following select statement..
So, after the ENDLOOP. put the following SELECT statement in condition:
IF NOT itediscact[] IS INITIAL.
SELECT....
ENDIF.
Thanks and Best Regards,
Vikas Bittera.
‎2007 Sep 03 12:24 PM
try giving IN instead of '='.
probably it will be solved or try selecting only say 10 records from each table then it wont go to the dump.
REWARD IF HAPPY OR GET BACK TO ME.
‎2007 Sep 03 12:26 PM
hi Naveen ,
u have to fine ture ur report at these places.
SORT itvia_zdis BY aufnr.
LOOP AT itediscact.
READ TABLE itvia_zdis WITH KEY aufnr = itediscact-ordernum
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE itvia_zdis-kunum TO itediscact-gpart.
MODIFY itediscact TRANSPORTING gpart.
ELSE.
DELETE itediscact.
ENDIF.
ENDLOOP.
<b>delete itediscact where gpart eq space.
IF NOT itediscact[] IS INITIAL.
SELECT vkont
discno
opbel
gpart FROM fkkmaze
INTO TABLE itfkkmaze
FOR ALL ENTRIES IN itediscact
-
> WHERE gpart = itediscact-gpart.(problem located here)
AND
discno = itediscact-discno.
endif.</b>IF NOT itfkkmaze[] IS INITIAL.
SORT itediscact BY discno.
SORT itfkkmaze BY discno.
Regards
Peram
‎2007 Sep 03 12:26 PM
Hi Naveen
The problem is mainly bcoz of selecting all work centers at a time.
To avoid this problem during Background processing of ur report:
Tcode:
Create the Variants for the report with each Work center as input
Tcode SM36:
Create separate steps in a single Background jobs with a different variant for each work center. So that the Load will be less each time. and the Job will be executed successfully.
<b>reward if Helpful</b>
‎2007 Sep 03 12:27 PM
Hi,
SELECT vkont
discno
opbel
gpart FROM fkkmaze
INTO TABLE itfkkmaze
FOR ALL ENTRIES IN itediscact
-
> <b>WHERE gpart = itediscact-gpart</b>.(problem located here)
in where condition you need to check the <b>data type</b> it may be bec of mis matching data type.
regards,
vijay
‎2007 Sep 03 1:29 PM
Hi Naveen,
the short dump clearly says that it could not allocate further memory for the data fetched (<i>67108864 bytes of memory space</i>).
In this scenario, i ll suggest you to filter the SELECT on EDISCACT ( DiscDoc.: Activities) - may be u can add some ACTDATE to your selection screen - in that case this first select would return lesses number of records.
When you are going to FKKMAZE (Dunning history of line items) with all these records - number of records returned aer huge too - because ur searching with GPART ( Business Partner Number) only. Just check if you can do something with FKKMAZE-LAUFD for filteing ur records - may be from ACTDATE-ACTDATE.
Bottom line is - ur prog is fetching huge amount of data - SAP fails to allocate further memory and gives u a dump. if you can limit the amount of data - its fine .. else talk to ur basis consultant.
‎2007 Sep 04 6:54 AM
Hi,
The problem lies here
SORT itvia_zdis BY aufnr.
LOOP AT itediscact.
READ TABLE itvia_zdis WITH KEY aufnr = itediscact-ordernum
BINARY SEARCH.
IF sy-subrc EQ 0.
MOVE itvia_zdis-kunum TO itediscact-gpart.
MODIFY itediscact TRANSPORTING gpart.
ELSE.
<b>DELETE itediscact.</b>
ENDIF.
ENDLOOP.Since ur deleting the entries from the table so it becomes empty and thus the select after this does with restriction on the where clause, put a check on
if not tediscact[] is initial.
SELECT vkont
discno
opbel
gpart FROM fkkmaze
INTO TABLE itfkkmaze
FOR ALL ENTRIES IN itediscact
WHERE gpart = itediscact-gpart.
endif.
Hope That Helps
Anirban M.