<?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: Read Text/ Long Text in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417461#M1049373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anshuman,&lt;/P&gt;&lt;P&gt;  Use this logic. Though this sample code is for sales document, but you can use READ_TEXT function module to fetch material text. This program will show those sales document for which text hasn't been maintained.&lt;/P&gt;&lt;P&gt;Now apply this logic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT z_sdn.

TABLES:
  vbak.

DATA:
  w_line TYPE i,
  w_idx TYPE i VALUE 1,
  w_name  TYPE thead-tdname.

DATA:
  BEGIN OF fs_tline,
    tdformat TYPE tline-tdformat,      " Tag column
    tdline    TYPE tdline,             " Text Line
  END OF fs_tline.


DATA:
  i_tline LIKE
    TABLE OF
          fs_tline.

SELECT-OPTIONS:
  s_vbeln FOR vbak-vbeln.

PARAMETERS:
  p_textid TYPE thead-tdid.

DATA:
  BEGIN OF fs_vbak,
    vbeln TYPE vbak-vbeln,             " Sales Document
  END OF fs_vbak.

DATA:
  i_vbak LIKE
  TABLE OF
        fs_vbak.
DATA:
  i_vbak1 LIKE
    TABLE OF
          fs_vbak.

START-OF-SELECTION.

  SELECT vbeln                       " Sales Document
    FROM vbak
    INTO TABLE i_vbak
   WHERE vbeln IN s_vbeln.

  DESCRIBE TABLE i_vbak LINES w_line.

  DO w_line TIMES.
    READ TABLE i_vbak INTO fs_vbak INDEX w_idx.
    w_name = fs_vbak-vbeln.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        client                  = sy-mandt
        id                      = p_textid
        language                = sy-langu
        name                    = w_name
        object                  = 'VBBK'
      TABLES
        lines                   = i_tline
      EXCEPTIONS
        id                      = 1
        language                = 2
        name                    = 3
        not_found               = 4
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7.
    IF sy-subrc NE 0.
      APPEND fs_vbak TO i_vbak1.
    ENDIF.
    w_idx = w_idx + 1.
  ENDDO.

  CLEAR fs_vbak.

  LOOP AT i_vbak1 INTO fs_vbak.
    WRITE: / fs_vbak-vbeln.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhijeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2008 08:52:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-17T08:52:35Z</dc:date>
    <item>
      <title>Read Text/ Long Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417456#M1049368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually i want to list out all the material whose long text is not maintained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i ??? Plz give me solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye &amp;amp; Thanx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 08:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417456#M1049368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T08:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text/ Long Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417457#M1049369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Call the READ_TEXT function module in loop for all the materials and check whether TLINES is having value.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;MD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 08:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417457#M1049369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T08:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text/ Long Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417458#M1049370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx but,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;through read text it is mandatory to pass all the required values, like ID, Object, name, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suppose i want to find out all material in Production server without passing material number through read text function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can this possible through Read Text?????????????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 08:38:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417458#M1049370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T08:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text/ Long Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417459#M1049371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the function module 'READ_TEXT' to extract the text of the material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Khushboo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 08:39:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417459#M1049371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T08:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text/ Long Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417460#M1049372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First Select all Materials and then Query on STXH table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass the material number to a variable of type tdname , concatenate '%' at the end.&lt;/P&gt;&lt;P&gt;it should look like this..&lt;/P&gt;&lt;P&gt;v_tdname = '0023423423%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from stxh
  up to 1 rows
       into wa_stxh
       where tdname like v_tdname.
endselect.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Check the sy-subrc then accordingly you can write the report or collect the material for which the long text not maintained.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 08:43:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417460#M1049372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T08:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text/ Long Text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417461#M1049373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anshuman,&lt;/P&gt;&lt;P&gt;  Use this logic. Though this sample code is for sales document, but you can use READ_TEXT function module to fetch material text. This program will show those sales document for which text hasn't been maintained.&lt;/P&gt;&lt;P&gt;Now apply this logic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT z_sdn.

TABLES:
  vbak.

DATA:
  w_line TYPE i,
  w_idx TYPE i VALUE 1,
  w_name  TYPE thead-tdname.

DATA:
  BEGIN OF fs_tline,
    tdformat TYPE tline-tdformat,      " Tag column
    tdline    TYPE tdline,             " Text Line
  END OF fs_tline.


DATA:
  i_tline LIKE
    TABLE OF
          fs_tline.

SELECT-OPTIONS:
  s_vbeln FOR vbak-vbeln.

PARAMETERS:
  p_textid TYPE thead-tdid.

DATA:
  BEGIN OF fs_vbak,
    vbeln TYPE vbak-vbeln,             " Sales Document
  END OF fs_vbak.

DATA:
  i_vbak LIKE
  TABLE OF
        fs_vbak.
DATA:
  i_vbak1 LIKE
    TABLE OF
          fs_vbak.

START-OF-SELECTION.

  SELECT vbeln                       " Sales Document
    FROM vbak
    INTO TABLE i_vbak
   WHERE vbeln IN s_vbeln.

  DESCRIBE TABLE i_vbak LINES w_line.

  DO w_line TIMES.
    READ TABLE i_vbak INTO fs_vbak INDEX w_idx.
    w_name = fs_vbak-vbeln.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        client                  = sy-mandt
        id                      = p_textid
        language                = sy-langu
        name                    = w_name
        object                  = 'VBBK'
      TABLES
        lines                   = i_tline
      EXCEPTIONS
        id                      = 1
        language                = 2
        name                    = 3
        not_found               = 4
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7.
    IF sy-subrc NE 0.
      APPEND fs_vbak TO i_vbak1.
    ENDIF.
    w_idx = w_idx + 1.
  ENDDO.

  CLEAR fs_vbak.

  LOOP AT i_vbak1 INTO fs_vbak.
    WRITE: / fs_vbak-vbeln.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhijeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 08:52:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-long-text/m-p/4417461#M1049373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T08:52:35Z</dc:date>
    </item>
  </channel>
</rss>

