Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

memory low

Former Member
0 Likes
467

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 .

3 REPLIES 3
Read only

Former Member
0 Likes
439

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

Read only

0 Likes
439

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 .

Read only

0 Likes
439

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