Application Development and Automation 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 only

Read_text function moduel

Former Member
0 Likes
1,289

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
Read only

Former Member
0 Likes
1,237

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
Read only

Former Member
0 Likes
1,238

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

Read only

Former Member
0 Likes
1,237

Hi,

use below code.

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

Ram.

Read only

Former Member
0 Likes
1,237

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.

Read only

0 Likes
1,237

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

Read only

0 Likes
1,237

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.

Read only

0 Likes
1,237

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

Read only

Lukas_Weigelt
Active Contributor
0 Likes
1,237

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,237

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