Skip to Content

Reverse WRITE TO ??

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Nov 15, 2003 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 17, 2003 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2003 at 12:28 PM

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

    replace '.' with '' into nfmt.

    replace ',' with '' into nfmt.

    condense nfmt no-gaps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.