‎2008 Feb 16 11:14 AM
Hi All,
I have a string like "Nikhil #". I need to remove # from the string but still keeping the trailing spaces. I tried REPLACE ALL and SHIFT statements but it deletes the Trailing spaces as well. Any help would be highly appreciated.
Please see there are 5 spaces between "Nikhil" and "#" and I need to remove # still keeping those spaces
Edited by: Nikhil Sood on Feb 16, 2008 12:15 PM
‎2008 Feb 16 11:33 AM
Hi,
try using translate keyword.....
data string type string.
move 'NIKHIL #' to string.
write : string,'<-ends here'.
translate string using '# '.
write : / string,'<-ends here'.Cheers,
jose.
‎2008 Feb 16 11:33 AM
Hi,
try using translate keyword.....
data string type string.
move 'NIKHIL #' to string.
write : string,'<-ends here'.
translate string using '# '.
write : / string,'<-ends here'.Cheers,
jose.
‎2008 Feb 16 11:42 AM
Even the TRANSLATE is deleting the trailing spaces. Any other clues please??
‎2008 Feb 16 11:46 AM
No did u try dat code...........<-end indicates the end of dat string.
‎2008 Feb 16 1:33 PM
You are absolutely right Jose.
The issue actually was with the "WS_DOWNLOAD" function. It trucates the trailing spaces of the lines in the itab. It does not have any option for processing otherwise. I have shifted to "GUI_DOWNLOAD" and it has TRUNC_TRAILING_BLANKS_EOL to help i nthis situation.
Thanks a lot for the help!!!
‎2008 Mar 27 9:31 PM
Hi,
My requirement is reverse.
How to replace all occurrunces of space with '.' ?
Your help is appreciated.
Thank you,
Surya
‎2008 Mar 27 9:36 PM