‎2009 Aug 10 1:55 PM
Hi Experts,
We are having problem in one of our program.There is a conversion of data type P(length 11) to Data type I for one of the field(Key figure in SAP-BI).
The data is getting converted correctly when the field value is less than < 2,200,000,000.
But whenever the value of field is more than 2,200,000,000 it is giving
"Runtime Errors BCD_OVERFLOW".
Except. CX_SY_CONVERSION_OVERFLOW.
The reason for the exception is:
In the current arithmetic operation with operands of type P an overflow
has been detected. Possible causes are:
1. The result field of type P is too small to store the result.
2. The result or an intermediate result has more than 31 decimal places.
There is a problem in Converion routine.
Any help on this is hghly appreciated.
Regards,
Ashitosh.
‎2009 Aug 10 2:05 PM
Hi,
It is because the field is too small to hold the value.
Get a field of a data type which can hold a large value.
Try using a data element whose domain is DECV23_2.
Regards,
Ankur Parab
‎2009 Aug 10 2:07 PM
‎2009 Aug 10 2:08 PM
‎2009 Aug 10 2:14 PM
‎2009 Aug 10 4:35 PM
Thanks Raymond for your valuable inputs.
Pls suggest the data type which will solve this issue.
There are further calculations with the help of this filed.Which data type will be a better choice for me to go with.This is a BI system.
Thanks in advance.
‎2009 Aug 10 9:02 PM
try to use type F (floating point)
to convert floating to type p you need to use an intermediate parameter of type c.
F > C then C > P
use 'FLTP_CHAR_CONVERSION' to convert floating value to Charac
‎2009 Aug 11 7:00 AM
Hi Jay,
Here conversion of data type from P to I is taking place.Now I need to look for other data type which will not effect my further calculations.
Can I use the data type P with some considerations like, I should not get decimals in my final value Initial value may contain decimals.
Pls suggest data type to resolve this issue.
Thanks in advance.
‎2009 Aug 11 7:07 AM
Follow SAP advocacy ([Numeric Data Types - Hints on Use |http://help.sap.com/abapdocu/en/ABENNUMBER_TYPES_HINTS.htm])
If you need whole numbers, use data type i.
If the [value range|http://help.sap.com/abapdocu/en/ABENBUILT_IN_TYPES_VALUES.htm] of i is too small, use [packed numbers|http://help.sap.com/abapdocu/en/ABENPACKED_NUMBER_GLOSRY.htm] without fractional portions. If the value range of the packed numbers is too small, use [decimal floating point numbers|http://help.sap.com/abapdocu/en/ABENDECFLOAT_GLOSRY.htm].
Regards,
Raymond