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 not_found exception

Former Member
0 Kudos

Hi,

I am trying to use the read_text FM in a program. When I call it, it returns a not_found exception.

I have tried to test the FM in Se37 with the exact same parameters than the one I am using to call it in my program and it works. The text I am trying to read exists and I have no idea what's wrong with this MF.

Here is a piece of code:

DATA: lv_texte_name type THEAD-TDNAME.
lv_texte_name = 'TIMREQ_NOTIF_ASSIST'.

    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        id                      = 'ST'
        language                = lv_language_en
        name                    = lv_texte_name
        object                  = 'TEXT'
      TABLES
        lines                   = lt_text_en
      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.

When debugging, lv_language_en = A, lv_texte_name the name I give it to. This FM drives me crazy.

Helps would be much appreciated.

Thanks in advance for your answers,

Thibault

2 REPLIES 2

former_member188685
Active Contributor
0 Kudos

The issue might be with the Text name, is it the correct Text name, just double check once. also some times it happens that systems you are checking might be different.

Please check all the possibilities.

0 Kudos

No the problem is with language. When I get the language parameter, it gets A for Anglais (english in french) and the read text tries to reach an AR text (arabic) and I don't have such a text.

So I initialized a local variable to 'EN' and use it in the input parameter and now it workfs.

Crazy !!