‎2010 Mar 06 4:13 AM
Hi ABAP experts,
I would like to write a ABAP script to remove additional spaces present in a string. The additional spaces present in a string will be removed and replaced with one single space character. I am not a ABAPer, so can I have your help?
For example,
String: "abc def ghi"
ABAP Process: remove additional spaces and replace with one single space character.
Expected result: "abc def ghi"
Appreciate your help,
‎2010 Mar 06 5:00 AM
HI,
TRY THIS CODE
DATA CHAR(20) VALUE 'ABC DEF GHI'. (Your String)
CONDENSE CHAR.
‎2010 Mar 06 5:00 AM
HI,
TRY THIS CODE
DATA CHAR(20) VALUE 'ABC DEF GHI'. (Your String)
CONDENSE CHAR.
‎2010 Mar 06 5:05 AM
Hi,
You can try this way.
1.take an Internal table.
2.Split the String at space into internal table.
3.Then condense the Contents of the internal table.
4.Concatenate each row separated by space.
This will solve your problem.
Thanks & Regards,
Vamsi.
‎2010 Mar 06 5:12 AM
‎2010 Mar 06 5:59 AM