‎2008 Jan 28 8:49 AM
Hi experts !
i m develping a report in which i used following code
LOOP AT IT_atten INTO WA_ATTEN.
WA_ATTEN-total_REST_HOLIDAY = WA_ATTEN-REST_HOLIDAY + WA_ATTEN-total_REST_HOLIDAY .
APPEND WA_ATTEN TO IT_ATTEN .
ENDLOOP.
becoz of this code short dump is coming with error " Memory Low " . plz help me in solving this should i use some hash table or sort table instead of standard table ..
DATA: BEGIN OF IT_ATTEN OCCURS 1,
PERNR LIKE P0000-PERNR,
REST_HOLIDAY(3) TYPE P DECIMALS , ACT_WORK_DAY(3) TYPE P DECIMALS 2,
LWP(3) TYPE P DECIMALS 2,
." here i have other 14 fields "
END OF IT_ATTEN .
DATA : WA_ATTEN LIKE LINE OF IT_ATTEN .
‎2008 Jan 28 8:56 AM
Hi ,
It is dumping as it is creating an infintie loop , as you are looping on IT_ATTEN and inside that loop you are appending a record in that internal table.
So with each iteration of the loop , a new records is added and hence there is no way you can end/exit the loop
Please correct it , then you program will not give a dump for this reason.
Regards
Arun
‎2008 Jan 28 9:22 AM
thanks .
I have checked it and modify it .
WA_ATTEN-total_REST_HOLIDAY = WA_ATTEN-REST_HOLIDAY + WA_ATTEN-total_REST_HOLIDAY .
APPEND WA_ATTEN TO IT_ATTEN .
if sy-subrc ne 0 .
exit .
endif .
but still this error is coming . help me in solving this .
‎2008 Jan 28 9:36 AM
Hi ,
If you loop and a table and in that loop keep appending records to that same table , it will result in an infinite loop.
So append it to some other table .
Regards
Arun