05-06-2016 11:45 AM
Hi,
I want volume field to hold 10 digits at the integer part and 8 digits at the decimal part , please suggest what type can I use.
I know type P decimals 8 , but using this we can have only 6 digits at the integer and 8 digit at the decimal as the max is 14 digits.
Thanks,
RG
05-07-2016 1:20 PM
My 2 cents as Clemens would say: that's fun that nobody corrected what you said... If you just look at the ABAP documentation, you'll see that the default total lengh of a P field is 8 bytes, which means up to a total of 15 digits whatever the number of digits after the decimal separator, but you can extend it to 16 bytes, i.e 31 digits. So, if you define 8 digits after the decimal separator, you may have up to 23 digits before the decimal point. DATA packTYPE p LENGTH 16 DECIMALS 8. Or DATA pack(16) TYPE p DECIMALS 8.
05-06-2016 11:50 AM
05-06-2016 12:25 PM
05-06-2016 12:53 PM
05-06-2016 1:42 PM
Hi ,
Thanks for your replies , I am basically multiplying length width and height and passing it to volume, so I cannot operate using the integer part and decimal part separately.
Thanks,
RG
05-06-2016 1:51 PM
05-06-2016 3:23 PM
05-06-2016 5:57 PM
05-07-2016 11:10 AM
What is the business case fot this weird requirement?
Give some examples so maybe make it understood.
Regards Clemens
05-07-2016 1:20 PM
My 2 cents as Clemens would say: that's fun that nobody corrected what you said... If you just look at the ABAP documentation, you'll see that the default total lengh of a P field is 8 bytes, which means up to a total of 15 digits whatever the number of digits after the decimal separator, but you can extend it to 16 bytes, i.e 31 digits. So, if you define 8 digits after the decimal separator, you may have up to 23 digits before the decimal point. DATA packTYPE p LENGTH 16 DECIMALS 8. Or DATA pack(16) TYPE p DECIMALS 8.