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: 

Unique issue:Overflow during the arithmetical operation (type P)

former_member198402
Participant
0 Kudos

Hi Experts,

I am facing a unique issue. I am trying to do some arithmetic operation (LW_HEADERX-BOM_EQP = LW_HEADERX-BOM_EQP + LW_HEADER-BOM_EQP.)

where

LW_HEADERX-BOM_EQP = 9588052037.000

LW_HEADER-BOM_EQP = 444000000.000

i have declared data element of both the variable mentioned above is Menge_D.

data type of menge_d is Quan of size 13 integeral part & 3 decimals but when i am debugging then i found 7 integeral and 3 decimals.attached herewith screenshot.I am bit confuse please help me out.

the FINAL SUM OF

(LW_HEADERX-BOM_EQP = LW_HEADERX-BOM_EQP + LW_HEADER-BOM_EQP ) is still under Quan limit.

Please tell me where i am wrong.

Thanks in advance...

Santosh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Santosh,

There's nothing special here, it just indeed an overflow exception.

Please note that


The number of characters here is not the field length in bytes, but the number of valid characters excluding formatting characters

The data element MENGE_D's data type is what you see from the debugger P(7) DECIMALS 3 which has value range in (-10^(2len -1) +1) / (10^(+dec)) to (+10^(2len -1) -1) /(10^(+dec))

9588052037 + 444000000 > (+10^(2*7 -1) -1) /(10^(+3)) and of course will cause an overflow exception.

Hope it helps. Cheers!

6 REPLIES 6

Former Member
0 Kudos

Hi Santosh,

There's nothing special here, it just indeed an overflow exception.

Please note that


The number of characters here is not the field length in bytes, but the number of valid characters excluding formatting characters

The data element MENGE_D's data type is what you see from the debugger P(7) DECIMALS 3 which has value range in (-10^(2len -1) +1) / (10^(+dec)) to (+10^(2len -1) -1) /(10^(+dec))

9588052037 + 444000000 > (+10^(2*7 -1) -1) /(10^(+3)) and of course will cause an overflow exception.

Hope it helps. Cheers!

0 Kudos

Hi Nguyen,

Please suggest me to sort out this issue for large value?

Regards,
Santosh

0 Kudos

hi,

Change BOM_EQP data type.

try : BOM_EQP(15) type p DECIMALS 3.

Regards,

Satyen.

0 Kudos

Thanks Satyen,

What could be the appropriate data type(Domain Level ) of ( BOM_EQP(15) type p DECIMALS 3 ) in DDIC Instead of Quan?

Regards,
Santosh

0 Kudos

hi,

Please use MENG15 domain for this.

data Element : KSTBM

Regards,

Satyen

0 Kudos

Hi Satyen,

Thanks A lot.it's working.

Regards,
Santosh