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

How to avoid overflow in arithmetic calculation

Former Member
0 Likes
957

Hi Gurus,

I am trying to do multiplication of two quantities.

But qunatity value is coming too large.

I am getting the "Overflow for arithmetical operation (type P) in program "ZOUM_R021 ".

I am writing the below code.

LOOP AT t_stpo2 WHERE stlnr = t_mast2-stlnr.

t_temp1-idnrk = t_stpo2-idnrk.

t_temp1-bwkey = t_stpo2-werks.

t_temp1-stlnr = t_stpo2-stlnr.

*t_temp1-comp2_qty = v_comp1_qty * t_stpo2-menge.*

COLLECT t_temp1.

CLEAR t_temp1.

ENDLOOP.

wherer v_comp1_qty is already calculated value.

Then please suggest how to avoid this overflow .

Regards,

Amit Kumar Singh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
668

Hi

For amount

use these field type as bseg-dmbtr or bseg-wrbtr.

for quantity u can use standard type Quan field

ERFMG

2 REPLIES 2
Read only

Former Member
0 Likes
669

Hi

For amount

use these field type as bseg-dmbtr or bseg-wrbtr.

for quantity u can use standard type Quan field

ERFMG

Read only

Former Member
0 Likes
668

Thanks