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

ABAP Error :How to remove spaces from the string.

Hi ,

For example :

string S1 = ' 8 000 000 '.

I want to remove the spaces from the string to get the output of the string as : 8000000.

Please help me in this

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2008 at 05:35 AM

    Kiran,

    Use

    CONDENSE s1 NO-GAPS.

    Regards

    RR

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 16, 2008 at 02:34 PM

    Hi Kiran,

    You can try something like this:

    DATA S1 TYPE string VALUE '8 000 000'.
    REPLACE ALL OCCURRENCES OF REGEX '[ ]+' IN S1 WITH ``.
    

    Kind regards,

    Bruno

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 21, 2015 at 10:56 AM

    This message was moderated.

    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.