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: 

Ampersand '&' in Material Basic data text converted from function 'READ_TEXT' in '<(>&<)>'

former_member826181
Discoverer
0 Kudos

When inserting manually in a material long text in base data the value & it is displayed commectly from MM03 but if the text is extracted using the function READ_TEXT it is instead converted in <(>&<)>

Do you have any idea how to solve or manage this issue?

Thanks!

3 REPLIES 3

Sandra_Rossi
Active Contributor

This is not about READ_TEXT. READ_TEXT returns what was stored. It's normal to have & stored as <(>&<)>.

These kind of texts ("long texts") are stored in ITF format, which is a "rich text" (bold, etc.) READ_TEXT returns the text in ITF format.

If you want to convert ITF rich text into plain text, my preferred way is to use CONVERT_ITF_TO_STREAM_TEXT. Line breaks are the characters CRLF.

See CONVERT_STREAM_TO_ITF_TEXT convert '&' to '<(>&<)>' | SAP Community

You could also use CONVERT_ITF_TO_ASCII as was suggested by SAP in some OSS note.

FredericGirod
Active Contributor

This looks like an answer sandra.rossi