Skip to Content
0
Former Member
Aug 11, 2010 at 05:04 PM

Read_text not_found exception

34 Views

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