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: 

Getting problem when adding two quantity fields.

Former Member
0 Kudos

Hi,

I have two fields like following

Data: lv_menge TYPE menge,

lv_quan TYPE menge.

When I am doing the following operation I am getting problem.

lv_quan = lv_menge + lv_quan.

Thanks,

srinivas.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Exactly what problem you are getting?

MENGE is a structure and also a DOMAIN.

I think it will give some error message if you declare like that.

3 REPLIES 3

vinod_vemuru2
Active Contributor
0 Kudos

HI Srinivas,

Please specify ur problem clearly Otherwise ur thread will be locked as it make no sence to the readers.

As per my understanding u might be getting overflow problem. This might be because u are declaring both of same type.

eg: If both lv_menge and lv_quan has big values, when u add these two it might exceed system limit.

So take lv_quan as TYPE P length 25 DECIMALS 2. Practically quantities won't cross this limit.

eg:

DATA: lv_quan(25) TYPE p DECIMALS 2.

Thanks,

Vinod.

Former Member
0 Kudos

hi sreenivasulu,

Exactly what error u r getting?

and check the values by keeping break-point. check is it more then the size it can hold.

Regards,

Azim.

Former Member
0 Kudos

Hi,

Exactly what problem you are getting?

MENGE is a structure and also a DOMAIN.

I think it will give some error message if you declare like that.