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
675

Hi,

While reading the standard text through READ_TEXT Function Module , I am getting unwanted text <(>&<)> instead of & . In the standard text editor it is becoming like unwanted text. this is because of '&' as a special charecter to read standard text. so any one helpme how to eliminate unwanted text and put my original text charectore as '&' only. can any suggest on this

thanks,

Anji

6 REPLIES 6
Read only

Former Member
0 Likes
609

Hello,

Give like this <b>'&'</b> in std. text

Regards,

Vasanth

Read only

Former Member
0 Likes
609

Hi Ramanjaneyulu

Have you used all the parameter in the same way depending upon your requirement.

If no then please use all required parameter.


    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        ID                            = 'LTXT'
        LANGUAGE                      =  V_SPRAS
        NAME                          =  V_NAME
        OBJECT                        =  'QMMA'
      TABLES
        LINES                         =  IT_LINES
     EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
       OTHERS                        = 8
              .
    IF SY-SUBRC <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

Read only

Former Member
0 Likes
609

replace '<(>&<)>' with '&'.

Read only

Former Member
0 Likes
609

Hi,

If you want to display & then write like<b> '&'</b> in your standard text.

Read only

0 Likes
609

Thanks for your reply.However, this option is not working .

Inplace of '&' now it displaying like this '<(>&<)>'

Rgds,

Anshul

Read only

Former Member
0 Likes
609

Use this way - some times we do not know how many & symbols are in each line.

DO.

SEARCH in_str FOR '&'.

IF sy-subrc = 0.

REPLACE '&' WITH '&' INTO in_str.

endif

enddo.

reward points if it is helpful

Thanks

Seshu