2011 Jan 24 9:27 AM
Hello experts,
I'm reading the text of an incoming emai with method pdf_table = document->get_body_part_content( 1 )
where pdf_table is type bcss_dbpc with CONT_TEXT-Line of type SO_TEXT255 char.
But when I now have a look into this pdf_table I see a lot of this #### - characters.
How I can convert this character into space character ?
Thanks for help,
G.
2011 Jan 24 10:15 AM
Hash characters are a substitute for characters which cant be displayed. In most cases this happens when you have a code page issue. Your SAP System is running under a different code page then the imported document
2011 Jan 24 9:49 AM
2011 Jan 24 9:57 AM
Hello,
REPLACE ALL OCCURENCES OF '#' IN pdf_table3 WITH space
does not solve the problem: . I still get this # characters.
Any other idea ?
BR
G
2011 Jan 24 10:05 AM
Hi Gerd,
"#" is also a wild-card character for any not printable sign. You have not to replace "#" but the original values. Check them in debugger!
Regards,
Klaus
2011 Jan 24 10:15 AM
Hash characters are a substitute for characters which cant be displayed. In most cases this happens when you have a code page issue. Your SAP System is running under a different code page then the imported document
2011 Jan 24 10:26 AM
Hello again,
this # - characters seems to be control chracters from line break in the email.
I've changed code settings in my gui, but this didn't help. (we also use unicode).
But the problem is still there.
How to change this # - control characters ?
Any ideas ?
Thanks G
2011 Jan 24 10:35 AM
Hi Gerd,
you can try to remove those values by using the attributes of class CL_ABAP_CHAR_UTILITIES.
e.g.
CONSTANTS: xc_vtab type c value cl_abap_char_utilities~vertical_tab.
REPLACE ALL OCCURRENCES of xc_vtab in my_field WITH SPACE.
Regards,
Klaus
2011 Jan 24 10:38 AM
Hello again,
problem solved:
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf IN pdf_table3 WITH space.
Now the #-characters are eliminated !
Thanks Gerd
2011 Jan 24 10:42 AM
you need to use the replace command. Your try using it couldnt work because the # is not really in your varaibale, the # is only shown cause the character cant be displayed but their originally value ist still there,
try
replace all occurences of cl_abap_char_utilities=>newline in so_text255 with ''.