2003 Nov 14 12:54 PM
Hi, how do I convert an input string containing numeric data properly using the current user's settings? I.e. how do I get e.q. '1.234,56765' converted regarding decimals and thousands separator? I could not find any function doing just that, although every dynpro uses this functionality.
Any hint greatly appreciated.
TIA
Peter
2003 Nov 15 8:56 PM
Hi Peter ,
I am not sure of a FM but you could read table USR01 field DCPFM to determine the Decimal notation .
Regards
Raja
2003 Nov 17 8:30 PM
Hi Peter,
It sounds like you want to convert from external to internal format. If this is the case, you could look at class CL_FOBU_INPUT_UTIL, which was mentioned elsewhere in this forum for a similar issue. It might be what you are looking for.
Good luck,
Dave
2003 Nov 20 12:28 PM
data nfmt(20) type c value '1.234,56765'.
replace '.' with '' into nfmt.
replace ',' with '' into nfmt.
condense nfmt no-gaps.
2003 Nov 20 6:08 PM
You should at least use a loop to delete the '.' or the ','. There could be more than one in a number in print format. There could be a minus-sign too in the wrong place.
KInd regards Axel Kiltz
2003 Nov 21 9:03 AM
Hello ROB
now you've got value 123456765 but the input was 1234,56765 (where "," is the decimal point).
What is that usefull for ?
Best regards
Thomas Madsen Nielsen