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

Convert Curr to Char

Hi!

I have to convert from a curr (length 11, dec 2) variable to a char, because I want to delete the leading spaces before I put the variable into my IDOC-field. Is it possible? How to do it?

Thanks for your help!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Nov 28, 2005 at 01:30 PM

    yes

    take a charfield variable of 13 length.

    data: charfield(13) type c.

    <b>write currfield to charfield.</b>

    then pass it to idoc.

    regards

    vijay

    Add a comment
    10|10000 characters needed characters exceeded

    • You are seeing the formatting specific to your user id. Here is a solution.

      
      
      report zrich_0001.
      
      
      data: currfield(11) type p decimals 2 value '12345.67'.
      data: charfield(13) type c.
      
      
      charfield = currfield.
      shift charfield left deleting leading space.
      
      write:/ charfield.
      
      

      Regards,

      Rich Heilman

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 01:31 PM

    Hi,

    write v_curr to v_char .

    But pay atention in the on output length of your curr field, your char have to have the same length, or more.

    att,

    Alexandre Nogueira.

    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.