cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Error :How to remove spaces from the string.

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Kiran,

Use

CONDENSE s1 NO-GAPS.

Regards

RR

Former Member
0 Kudos

Kiran,

Ur problem is solved...?

Thanks

RR

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

BGarcia
Active Contributor
0 Kudos

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