‎2006 Sep 27 12:52 AM
Hi ,
for the code :
data : string(10) type c.
string = 'BAT_&_BALL'.
NOW I WANT TO REPLACE '_' IN STRING WITH SPACE ie ' '.
but when i use
Replace all occurrences of '_' in string with ' '.
then the output is 'BAT&BALL' ..NO SPACE IS BEING INSERTED.
I need to display it as BAT & BALL.
CAN NYONE HELP ME HOW TO REPLACE '_' WITH SPACE....
Thanks
Bhasker
‎2006 Sep 27 1:02 AM
‎2006 Sep 27 1:02 AM
‎2006 Sep 27 1:08 AM
Hi Rich,
Thanks for your reply.
translate string is not working for me
thanks
Bhanker
‎2006 Sep 27 1:18 AM
‎2006 Sep 27 1:29 AM
Hi Rich,
I am working with ECC 6.0
I just tested your code in my system.
I am getting the output as BAT_&_BALL.
Thanks
Bhasker
‎2006 Sep 27 1:44 AM
‎2006 Sep 27 1:49 AM
Hi Rich;
It was my mistake
I didnt put space right next to the _.
its working now
thanks
Bhasker
‎2006 Sep 27 2:01 AM
You scared me a little there, thought I was going crazy. Anyway, the way that the translate statement works in this context, is that you have two values in your literal, the first is what you are looking for and the second is what you want to translate it to. So for example, it can be anything.
data: string(10) type c,
string = '1212121212'.
translate string using '20'.So in this case the value will now be '1010101010'.
Regards,
Rich Heilman
‎2006 Oct 31 6:23 AM
Hi Guys,
I have a string containing spaces, my requirement is to replace all the spaces in the given string with some other character. Could you please help me the syntax in ABAP for this
Regards,
Hari
‎2006 Oct 31 6:27 AM
hi,
chk this.
REPLACE all occurances of space IN your_string WITH 'Your_character' INTO lv_date.
rgds
anver
if hlped pls mark points