‎2007 Aug 27 11:26 AM
hi,
my requirement is reading the content of the mail using the function module so_object_get_content. and that data we will update in the log.
where as while using this fm we are getting # in that content and these # are replacing with junk character (i.e box ) in the log.
what we have to do in order to remove those #'s from that content.
‎2007 Aug 27 11:29 AM
Hi!
For reaplacing the relevant text within a string you can use this:
REPLACE ALL OCCURRENCES OF '#' IN gv_text WITH space.
Regards
Tamá
‎2007 Aug 27 11:31 AM
Hi..
You can use .
Translate <str> using '# '. "To replace # with Space in all occurreneces
Condense <str> no gaps. "To remoce Spaces if u want
<b>reward if Helpful</b>
‎2007 Aug 27 11:36 AM
‎2007 Aug 27 11:41 AM
try with this
REPLACE ALL OCCURRENCES of CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB IN V_STR WITH SPACE.
or
REPLACE ALL OCCURRENCES of CL_ABAP_CHAR_UTILITIES=>CR_LF IN V_STR WITH SPACE.which ever works in your system
‎2007 Aug 27 11:45 AM
hii,
try like this using REPLACE keyword with other options as
REPLACE ALL OCCURRENCES OF '#' IN ITAB[internal table] WITH space.
or
REPLACE '#' WITH ' ' into iITAB.
if helpful reward some points.
with regards,
Suresh Aluri.
‎2007 Aug 27 11:47 AM
Hi raghu,
is the external representation of non-displayable characters - internal (switch to hex display in debugger) it may be something else.
You have to use a WRITE TO statement first to convert any non-displayable character to # hashmark symbol.
So you have to go thru all line like this:
data:
lv_offset type syfdpos,
c type c.
do strlen( line ) times.
lv_offset = sy-index - 1.
write line+lv_offset(1) to c.
if c = '#'.
line+lv_offset(1) = space.
endif.
enddo.Regards,
Clemens