Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Reverse WRITE TO ??

Former Member
0 Kudos

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

5 REPLIES 5

athavanraja
Active Contributor
0 Kudos

Hi Peter ,

I am not sure of a FM but you could read table USR01 field DCPFM to determine the Decimal notation .

Regards

Raja

0 Kudos

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

Former Member
0 Kudos

data nfmt(20) type c value '1.234,56765'.

replace '.' with '' into nfmt.

replace ',' with '' into nfmt.

condense nfmt no-gaps.

0 Kudos

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

0 Kudos

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