Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read_text function moduel

Former Member
0 Kudos

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 #

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

use below code.

replace ALL OCCURRENCES OF '#' in text WITH space.

Ram.

Former Member
0 Kudos

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.

0 Kudos

Could you please tell me where i need to check codepage seetings

0 Kudos

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.

0 Kudos

This is exactly same some junk characterÀ or ó are converitng to # . Please let me know how to handle this

Lukas_Weigelt
Active Contributor
0 Kudos

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...

raymond_giuseppi
Active Contributor
0 Kudos

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