Skip to Content
author's profile photo Former Member
Former Member

character value separated by comma

Hi,

I am having a character field with numbers as value. I have to apply comma (,) every 3 digit from the lower value (i.e. 1,000,000). How to do it. whether there is any function module to do so???

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 06:34 PM

    if you can move your value to a packed field (TYPE P), this will work.

    DATA: val(10) TYPE p VALUE '123456789'.
    DATA: valc(10) TYPE C.
    
    WRITE val CURRENCY 'USA' DECIMALS 0 to valc.
    
    write: valc.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 06:57 PM

    Check the sample program .

    DATA:
          char_value TYPE char15       ,
          pack_value TYPE p DECIMALS 2 VALUE '353252623'.
    
    SET COUNTRY 'USA'.
    WRITE pack_value to char_value.
    
    write char_value.
    Regards, Venkat.O

    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.