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

itab sum

Former Member
0 Likes
770

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
Read only

Former Member
0 Likes
750

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
Read only

Former Member
0 Likes
750

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

Read only

abapdeveloper20
Contributor
0 Likes
750

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.

Read only

Former Member
0 Likes
751

hi,

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

there are some possibilities of errors like this

regards,

priya.

Read only

Former Member
0 Likes
750

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

Read only

Former Member
0 Likes
750

Hi,

Declare

data : sumtotal like wa_item-wrbtr..

Regards,

Balakumar.G

Reward Points if helpful.