2012 Jul 22 1:32 PM
Dear All,
My scenario is like this:
1. I have to do a computation based on 2 variables.
Data: V1 type WERTV7, (CURR 13)
V2 type UKURSP. (Decimals 9)
2. The values across the above 2 variables are:
v1 = 11846153200.00.
v2 = 65.00000.
3. The Computation which has to be done is:
v1 = v1 * v2.
4. Now, I get a runtime error saying "Overflow during the arithmetical operation (type P) in program"
5. I tried many FMs mentioned in this FORUM like ROUND, CHAR_FLTP_CONVERSION, QSS0_FLTP_TO_CHAR_CONVERSION etc.
But, while moving the final value I face a runtime error.
Could you please help me in fixing this ?
Regards,
Deepu.K
Dear All,
My scenario is like this:
1. I have to do a computation based on 2 variables.
Data: V1 type WERTV7, (CURR 13)
V2 type UKURSP. (Decimals 9)
2. The values across the above 2 variables are:
v1 = 11846153200.00.
v2 = 65.00000.
3. The Computation which has to be done is:
v1 = v1 * v2.
4. Now, I get a runtime error saying "Overflow during the arithmetical operation (type P) in program"
5. I tried many FMs mentioned in this FORUM like ROUND, CHAR_FLTP_CONVERSION, QSS0_FLTP_TO_CHAR_CONVERSION etc.
But, while moving the final value I face a runtime error.
Could you please help me in fixing this ?
Regards,
Deepu.K
2012 Jul 22 6:52 PM
For type CURR fields you must know the number of decimals configured for the related currency key. So yu may have to muliply with /divide by multiples of 10.
Then you can put everything to a type F variable, no danger of overflow. Check the result and write back to currency variable again muliply with /divide by multiples of 10
to get correct result.
Regards
Clemens
2012 Jul 22 6:53 PM
The maximum value a field of data type WERTV7 can contain is 99999999999.99 (13 chars with 2 decimals). The result of operation 65 * 11846153200.00 = 769999958000.00 ( 14 chars) does not fit.
Use a variable with a larger range (e.g. WERTV8) for field V1.
JNN
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |