2007 Mar 27 8:50 AM
Hi Experts,
i hope you can help me. I have to upload an excel sheet by FM 'TEXT_CONVERT_XLS_TO_SAP'. The result that i get contains a string that could implement line breaks. This line breaks are each identified by '#'.
Before the string is displayed the '#' has to be replaced. I have tempted it with
REPLACE '#' WITH ' ' but i get no positiv result.
Can anyone assist me to resolve this problem?
2007 Mar 27 9:03 AM
It depends on what you wanna do with it. Those '#' are special characters to indicates new line or tab. You need to use the abap objects CL_ABAP_CHAR_UTILITIES to fix this issue.
Sample codes:
This code will split up the
REPLACE CL_ABAP_CHAR_UTILITIES=>NEWLINE IN myString WITH SPACE.
2007 Mar 27 8:55 AM
hi Florian,
do this way ..
replace all occurrences of
cl_abap_char_utilities=>CR_LF in str with space.
or
replace all occurrences of cl_abap_char_utilities=>HORIZONTAL_TAB
in str with space.
REgards,
Santosh
2007 Mar 27 8:55 AM
data temp_fill_string(50) type c value 'sfg###sjndks###fifis'.
translate temp_fill_string using '# '.
write temp_fill_string .
Message was edited by:
sunil kumar
2007 Mar 27 8:59 AM
Hi,
Replace # with CL_ABAP_CHAR_UTILITIES=>NEWLINE in the text, this will give the next text in the new line
Regards
Sudheer
2007 Mar 27 9:03 AM
It depends on what you wanna do with it. Those '#' are special characters to indicates new line or tab. You need to use the abap objects CL_ABAP_CHAR_UTILITIES to fix this issue.
Sample codes:
This code will split up the
REPLACE CL_ABAP_CHAR_UTILITIES=>NEWLINE IN myString WITH SPACE.
2007 Mar 27 9:13 AM
Hi all,
thanks a lot. I've resolve the problem with Thungs answer. The replace statement by santosh does not work. I get the correct result from
REPLACE CL_ABAP_CHAR_UTILITIES=>NEWLINE IN myString WITH SPACE.
Thanks.