‎2006 Aug 14 2:08 PM
Hi,
I have a method with an exporting parameter of type QUAN, lenghth 9. How do i store the value of a local variable of type STRING into the export parameter?
Regards,
Rachita.
‎2006 Aug 14 2:10 PM
‎2006 Aug 14 2:13 PM
‎2006 Aug 14 2:19 PM
Hi Rich,
The value in the local variable of type string is 2151521545.33333333333333.
Regards,
Rachita.
‎2006 Aug 14 2:33 PM
Hi
the value given by you is a 10 digit numeric & morethan 10 as decimals. if you move this to a 9digit numeric, definitely values will be trucated.
so try to redefine your export parameter length.
you can use CEIL or FLOOR command, to round off the variable.
Regards
Srikanth
‎2006 Aug 14 2:42 PM
‎2006 Aug 14 2:45 PM
For example, if you want just the whole number with no decimals, the your quantity field must be at least a length of 6 TYPE P field.
report zrich_0001.
data: q(6) type p.
data: str type string.
str = '2151521545.33333333333333'.
clear q.
q = str .
write:/ q.
The output here is ...
2151521545
Regards,
Rich Heilman
‎2006 Aug 14 3:35 PM
Hi,
Since my exp variable is of type QUAN of length 9 only, I want max first 9 difits to be populated from the local variable of string type.
I did the following:
data: q(6) type p,
ex type <data_element QUAN (9)>.
data: str type string.
str = '2151521545.33333333333333'.
clear q.
q = str(9).
ex = q.
However, this raises an exception RANGE OUT OF BOUNDS if the value in str is 0. How do I just pick up the first 9 digits whatever be the length or any no of decimal places?
Regards,
Rachita.