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

Former Member
0 Likes
849

Hi Friends,

I have entered item text in ME23N as follows:

Product A & Product B.

When I use READ_TEXT ( CALL FUNCTION 'READ_TEXT'),

I am getting the out put as follows:

Product A <(>&<)> Product B.

- How to get the correct content? Please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
778

Hi,

Check Text in Script editor .. definitely it would be like "Product A <(>&<)> Product B. " So it is coming like that.Pease check ur text in script editor.

Regards,

Ananth

7 REPLIES 7
Read only

Former Member
0 Likes
778

Hi,

After saving, just check if the text is in correct format in ME23N?

Regards

Read only

Former Member
0 Likes
779

Hi,

Check Text in Script editor .. definitely it would be like "Product A <(>&<)> Product B. " So it is coming like that.Pease check ur text in script editor.

Regards,

Ananth

Read only

former_member609120
Contributor
0 Likes
778

Hi hari,

Since u are reading a long text, u must be having text id , langauge etc.

Kindly Go to SO10 and check what is the text stored in it..

U will get an clear idea.

If always the value obtained as shown den format the same using character manupulations.

Hope this helps...!

Best Regards,

Vanessa Noronha.

Read only

GauthamV
Active Contributor
0 Likes
778

Yes, you are correct.

That can be rectified if you can use B paragraph justified format for that text.

Read only

Former Member
0 Likes
778

i had also faced same problem

actually due to system problem only

sap is not able to store certain special character (&) in the formate whatever we enter

actualy its internaly converting that symbol into internal format ,

only one solution for your problem

pass this symbols(&) to sort text of that perticular long text

or use this thing in

first 40 char

Read only

jaideepsharma
Active Contributor
0 Likes
778

Hi,

Please go through the include LMEPOF2O and search for READ_TEXT Function call.

Standard program calls READ_TEXT and then detokenizes the string retrived if it contains special characters. Some part of code is written below. May be you can reuse the same by calling subroutines of program RSTXSCAN in your program.

* copy text lines
  ls_textline-tdobject = ls_text_type-tdobject.
  ls_textline-tdid     = ls_text_type-tdid.
  LOOP AT lt_lines INTO ls_line.
    ls_textline-tdformat = ls_line-tdformat.
    ls_textline-tdline   = ls_line-tdline.
    APPEND ls_textline TO cht_textlines.
  ENDLOOP.

  CLEAR ch_text_formatted.
  IF ls_text_type-displaymode EQ space. "means: text is changeable!
* check if text is formatted
    PERFORM init_itf_scanner(rstxscan) USING c_without_command_scan
                                             c_form_text.
    PERFORM set_itf_text(rstxscan) USING lt_lines.
    DO.
      PERFORM read_next_itf_token(rstxscan) USING l_token.
      IF l_token-code <> c_token_element_begin AND
         l_token-code <> c_token_element_end AND
         l_token-code <> c_token_paragraph_begin AND
         l_token-code <> c_token_paragraph_end AND
         l_token-code <> c_token_line_begin AND
         l_token-code <> c_token_line_end AND
         l_token-code <> c_token_string.
        IF l_token-code = c_token_text_end.
          EXIT.
        ELSE.
          ch_text_formatted = mmpur_yes.
          EXIT.
        ENDIF.
      ENDIF.
    ENDDO.
  ENDIF.

KR Jaideep,

Read only

Former Member
0 Likes
778

Hi Anand,

You are correct. When I opened in script editer (double click->Change editor),

I can see the special charecters. After I removed and saved, it is ok now.

Thanks for your help.