2009 Apr 22 12:49 PM
Hi all,
i hope there is someone that can help me: i've to convert the field IMRG-CDIFF in a new field type QUAN or type not equal FLTP.
How can i do it?
Is there a FM?
Regards,
Alex.
2009 Apr 22 12:54 PM
I think a simple move will do the conversion..
DATA : lv_value TYPE imrg-cdiff ,
lv_quan TYPE ekpo-menge .
lv_value = '100.23' .
lv_quan = lv_value .
WRITE : / lv_value , lv_quan .
2009 Apr 22 12:53 PM
Hi Alex,
Check if you can use FM FLTP_CHAR_CONVERSION.
This function module works fine we try to conver Float to character.
Regards,
Komal
2009 Apr 22 12:53 PM
quan is inturn character i guess
so you can convert FLTP to character
FLTP_CHAR_CONVERSION
QSS0_FLTP_TO_CHAR_CONVERSION
hope you can use this
cheers
s.janagar
2009 Apr 22 12:54 PM
I think a simple move will do the conversion..
DATA : lv_value TYPE imrg-cdiff ,
lv_quan TYPE ekpo-menge .
lv_value = '100.23' .
lv_quan = lv_value .
WRITE : / lv_value , lv_quan .
2009 Apr 22 1:11 PM
Thank Pawan Kesari for yout suggest but i've used your routine and the output is:
FLT 5,200000000000001E-02 --> convert 0,052
i've need 52,00
How can ido it?
Thanks a lots,
Alex.
2009 Apr 22 1:16 PM
> Thank Pawan Kesari for yout suggest but i've used your routine and the output is:
> FLT 5,200000000000001E-02 --> convert 0,052
>
> i've need 52,00
>
> How can ido it?
>
> Thanks a lots,
>
> Alex.
Alex,
5,200000000000001E-02.i.e. 5.2 exponential -2 is equal to 0.052. Its a totally correct conversion. The way you need will change the actual value.
2012 May 09 8:46 PM
Hi guy!
<request removed by moderator>.
tks;
DATA oauszt TYPE eauszt.
DATA: loauszt TYPE f.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
input = loauszt (6.4920000000000000E+03)
unit_in = 'S' "Einheit 1
unit_out = 'H' "Einheit 2
IMPORTING
output = loauszt
EXCEPTIONS
conversion_not_found = 2
input_invalid = 4
output_invalid = 4
type_invalid = 4
division_by_zero = 6
overflow = 8
units_missing = 10
unit_in_not_found = 12
unit_out_not_found = 12.
oauszt = loauszt.
Message was edited by: Thomas Zloch
2012 May 10 5:03 AM
Asking for points so openly in such a way 😮
You may need to read the rule of engagement in SCN