06-08-2011 11:04 AM
Hi ,
I am using read_text function module to read materil text .
In output lines i am getting # some times this # is giving tabspace when i download the data
Typ AP MCZ 1,5
fuer anlegender#
Please let me know how to avoid this #
06-08-2011 11:29 AM
Hi Ramesh,
You can try with the REPLACE ABAP statement and use CL_ABAP_CHAR_UTILITIES attributes like "HORIZONTAL_TAB,
VERTICAL_TAB, NEWLINE, CR_LF" as the replacing characters.
Ex:
REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB in text-tline WITH space.
Regards,
Chen
06-08-2011 11:29 AM
Hi Ramesh,
You can try with the REPLACE ABAP statement and use CL_ABAP_CHAR_UTILITIES attributes like "HORIZONTAL_TAB,
VERTICAL_TAB, NEWLINE, CR_LF" as the replacing characters.
Ex:
REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB in text-tline WITH space.
Regards,
Chen
06-08-2011 12:20 PM
Hi,
use below code.
replace ALL OCCURRENCES OF '#' in text WITH space.
Ram.
06-08-2011 12:43 PM
Hmmm i have been working a LOT with this FM, and i never stumbled upon this problem. So i kind of wonder.
At first you should make sure it is not a codepage issue and that those # signs are replacing some other character you expected to be in that text.
06-08-2011 12:53 PM
06-08-2011 12:57 PM
oh it is not neccesary to check codepage settings beforehand. If those characters clearly represent line breaks, then all is fine and you can replace them with space if you need to.
But maybe you just got a text with signs like À or ó or whatever, that then end up beeing a #.
If thats the case, then i guess we have a codepage issue to check.
06-08-2011 1:17 PM
This is exactly same some junk characterÀ or ó are converitng to # . Please let me know how to handle this
06-08-2011 12:50 PM
Where is this output generated? Is it a list or maybe a file output on AL11? I experienced something like this as well with XML files stored on AL11 having '#'s all over. Although they were only representing line breaks...
06-08-2011 1:47 PM
Which kind of text did you read, maybe you need a [CONVERT_TEXT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=convert_text] ([more|http://help.sap.com/saphelp_40b/helpdata/pt/d6/0dba8f494511d182b70000e829fbfe/content.htm]) or [EXPORT_TEXT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=export_text] ([more|http://help.sap.com/saphelp_nw70/helpdata/en/d6/0dbab6494511d182b70000e829fbfe/content.htm]) after READ_TEXT (eg from itf text to ascii text)
Regards,
Raymond