Skip to Content

Key figure in char

Hi Sapexpert,

I would like to see a char in a numerical format, for make this I'm trying to write a little abap code.

the result is the following

I would like to see the minus sign in the left part (and not on the right part) without any space. In case of negative number I'll multiplicate for minus one.

Any suggest?

Thak you in advance


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Mar 01, 2019 at 02:08 AM

    you can use SHIFT...RIGHT CIRCULAR to move minus to the left.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 01, 2019 at 04:15 PM

    Please make sure that the title matches the actual question. There is no "key figure" here, the question is simply about formatting a numeric field.

    Look in the ABAP documentation under WRITE TO statement. There is an explanation how different types are interpreted for output (note the differences for decfloat... types). And the commands for string operations are also all listed right there:

    Edit: using simple REPLACE... to handle the user-specific presentation of decimal and thousand separators is usually not a good idea. And in a simple test/demo program this shouldn't even be necessary, just set your preferred delimiter in your user profile (SU3) and go with it.

    scn.jpg (58.3 kB)
    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.