‎2008 Sep 03 3:01 AM
Dear All
I have a problem in replaced character u2018 with u2018 u2018.
for example: STR1 is 'ABC'EFGHI' ,
I want changed 'ABC EFGHI'
How can I do
Thanks
Sun
‎2008 Sep 03 3:40 AM
Hi
check the following code
text-001 : ABC'DEF
text-002 : '
DATA:
str(7) TYPE c,
sub(1) TYPE c,
new(1) TYPE c.
START-OF-SELECTION.
str = text-001.
sub = text-002.
new = ' '.
WRITE / str.
REPLACE sub WITH new INTO str.
WRITE / str.
‎2008 Sep 03 3:27 AM
Check below sample code:
DATA: l_text TYPE char10 VALUE 'ABC''EFGHI',
l_apos TYPE char01 VALUE ''''.
WRITE:/ l_text.
REPLACE l_apos IN l_text WITH space.
WRITE:/ l_text.Kind Regards
Eswar
‎2008 Sep 03 3:40 AM
Hi
check the following code
text-001 : ABC'DEF
text-002 : '
DATA:
str(7) TYPE c,
sub(1) TYPE c,
new(1) TYPE c.
START-OF-SELECTION.
str = text-001.
sub = text-002.
new = ' '.
WRITE / str.
REPLACE sub WITH new INTO str.
WRITE / str.
‎2008 Sep 03 4:26 AM
Dear All
Thanks a lot.
solved.
if you have not point,please contace me.
Sun
‎2008 Sep 03 3:43 AM
Just checked the help of REPLACE and it seems the trailing spaces in search text the searching text are ignored. So the output will be in condensed form as per your current search.
Check below example ignoring the above:
DATA: l_text TYPE char10 VALUE 'ABC''EFGHI',
l_apos TYPE char01 VALUE ''''.
WRITE:/ l_text.
SEARCH l_text FOR l_apos.
l_text+sy-fdpos(1) = space.
WRITE:/ l_text.Kind Regards
Eswar