<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Runtime error when calling READ_TEXT FM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955586#M1336843</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you all for your help.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2009 03:21:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-21T03:21:42Z</dc:date>
    <item>
      <title>Runtime error when calling READ_TEXT FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955582#M1336839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to search this before I post my question. Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a subroutine which calls the 'READ_TEXT' FM to get the basic data text from material as follow:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA tmp_matnr TYPE string.
DATA matnr TYPE vbap-matnr.
matnr = '27-10125-00'.

PERFORM zz_get_matnr_for_replacement USING matnr
                                     CHANGING tmp_matnr.

FORM zz_get_matnr_for_replacement USING p_matnr TYPE vbap-matnr
                                  CHANGING p_return.
  CONSTANTS str TYPE string VALUE 'OBSOLETE'.
  DATA: IT_LINE TYPE TABLE OF TLINE WITH HEADER LINE,
        itab TYPE TABLE OF string WITH HEADER LINE.

  CALL FUNCTION 'READ_TEXT'
    EXPORTING
*     CLIENT                        = SY-MANDT
      ID                            = 'GRUN'
      LANGUAGE                      = sy-langu
      NAME                          = p_matnr
      OBJECT                        = 'MATERIAL'
*     ARCHIVE_HANDLE                = 0
*     LOCAL_CAT                     = ' '
*   IMPORTING
*     HEADER                        =
    TABLES
      LINES                         = IT_LINE
   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.
    LOOP AT IT_LINE.
      IF IT_LINE-TDLINE cs str.
        SPLIT IT_LINE-TDLINE AT space INTO TABLE itab.
        EXIT.
      ENDIF.
    ENDLOOP.

    LOOP AT itab INTO p_return.
    ENDLOOP.
    WRITE: / p_return.
  ENDIF.
ENDFORM.                    "zz_get_matnr_for_replacement&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I ran my program, a short dump CALL_FUNCTION_CONFLICT_TYPE appeared. It said that the input material number (p_matnr) is conflict type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khanh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 02:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955582#M1336839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T02:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error when calling READ_TEXT FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955583#M1336840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes&lt;/P&gt;&lt;P&gt;p_matnr should have "THEAD-TDNAME" type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 02:53:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955583#M1336840</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2009-08-21T02:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error when calling READ_TEXT FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955584#M1336841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi abapuser,&lt;/P&gt;&lt;P&gt;I knew that, I searched and saw that somewhere.&lt;/P&gt;&lt;P&gt;Could you please guide me how to convert from vbap-matnr to THEAD-TDNAME type?&lt;/P&gt;&lt;P&gt;If I use matnr as a hard code, it works fine. For exam, I call:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM zz_get_matnr_for_replacement USING '27-10125-00'
                                     CHANGING tmp_matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khanh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 03:00:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955584#M1336841</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T03:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error when calling READ_TEXT FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955585#M1336842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare vatiable like below :&lt;/P&gt;&lt;P&gt;DATA : l_f_name  like thead-tdname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass your material name p_matnr to l_fname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and pass l_fname in the FM&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;            id                      = l_c_textid&lt;/P&gt;&lt;P&gt;            language              = l_f_langu&lt;/P&gt;&lt;P&gt;            name                    = l_f_name&lt;/P&gt;&lt;P&gt;            object                  = l_c_objtid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 03:04:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955585#M1336842</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T03:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error when calling READ_TEXT FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955586#M1336843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you all for your help.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 03:21:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-when-calling-read-text-fm/m-p/5955586#M1336843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T03:21:42Z</dc:date>
    </item>
  </channel>
</rss>

