Application Development 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: 

itab sum

Former Member
0 Kudos
86

hi,

i did like this.

loop at gt_item into wa_item.

sumtotal = sumtotal + wa_item-wrbtr .

endloop.

gt_item having 53 records.

all are summing in sumtotal field but after 40 record that sumtotal is 0000. then its giving runtime error.

why its like this?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
66

hi,

check the data type of ur sumtotal, if the range of it exceeds

there are some possibilities of errors like this

regards,

priya.

5 REPLIES 5

Former Member
0 Kudos
66

What is the Data Type of sum total....

Try this

Data: SUM_TOTAL Type WRBTR.

loop at gt_item into wa_item.

At Last.

Sum.

SUM_TOTAL = wa_item-wrbtr .

EndAt.

endloop.

Write: SUM_TOTAL.

Santhosh

abapdeveloper20
Contributor
0 Kudos
66

Hi,

check this out.

data : sumtotal like bsad-wrbtr.

loop at gt_item into wa_item.
sumtotal = sumtotal + wa_item-wrbtr .
endloop.

reward if useful.

Former Member
0 Kudos
67

hi,

check the data type of ur sumtotal, if the range of it exceeds

there are some possibilities of errors like this

regards,

priya.

Former Member
0 Kudos
66

This may be due to the field sumtotal is not large enough to hold the value. So try to increase the size of sumtotal .

Former Member
0 Kudos
66

Hi,

Declare

data : sumtotal like wa_item-wrbtr..

Regards,

Balakumar.G

Reward Points if helpful.