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

Former Member
0 Kudos

Hi,

I am trying to retrieve the header text using FM Read_Text.

But I am getting an error <b>"Form of address key is not defined"</b>

Can some one tell me what could be the possible reason behind it??

the parameters I am passing are as below :

        MOVE WA_LIKP-VBELN TO T_THEAD-TDNAME.

        T_THEAD-TDOBJECT = 'VBBK'.
        T_THEAD-TDID = 'YU15'.
        T_THEAD-TDSPRAS = G_LANG .
        APPEND T_THEAD.

        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT                        = SY-MANDT
            ID                            = T_THEAD-TDID
            LANGUAGE                      = G_LANG
            NAME                          = T_THEAD-TDNAME
            OBJECT                        = T_THEAD-TDOBJECT
*           ARCHIVE_HANDLE                = 0
*           LOCAL_CAT                     = ' '
*         IMPORTING
*           HEADER                        = T_THEAD
          TABLES
            LINES                         = T_TEXT
         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.

Please help

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Are you sure it is coming from this call? Also change your IF sy-subrc = 0, to IF sy-subrc <b><></b> 0.

7 REPLIES 7

Former Member
0 Kudos

Are you sure it is coming from this call? Also change your IF sy-subrc = 0, to IF sy-subrc <b><></b> 0.

0 Kudos

This message typically comes out of address screens or function modules related to addresses.

0 Kudos

ya!! I am absolutely clueless on this???

Former Member
0 Kudos

What value do you have in G_LANG? Other than that, I cannot think of any. What is your program do in the rest of the code?

0 Kudos

Thanks a lot Srinivas

0 Kudos

What was the issue?

0 Kudos

I had placed the error message when the sy-subrc = o.