<?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 help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416192#M539294</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Jun 2007 05:02:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-30T05:02:24Z</dc:date>
    <item>
      <title>read_text help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416189#M539291</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;   can anyone plz tell me how to use read_text in sap script. i have used as follows in my print program.how can i define my field in sap script. can anyone help me out when i am using this code i get run time error where is the correct location i have to use in my code i am using it with my select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: BEGIN OF CLITEXT OCCURS 0.      &lt;/P&gt;&lt;P&gt;            INCLUDE STRUCTURE TLINE.&lt;/P&gt;&lt;P&gt; DATA: END OF CLITEXT.&lt;/P&gt;&lt;P&gt; DATA : W_CLITEXT LIKE TLINE-TDLINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR W_CLITEXT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;                EXPORTING&lt;/P&gt;&lt;P&gt;                 CLIENT                        = SY-MANDT&lt;/P&gt;&lt;P&gt;                  ID                            = '0004'&lt;/P&gt;&lt;P&gt;                  LANGUAGE                      = SY-LANGU&lt;/P&gt;&lt;P&gt;                  NAME                          = SY-UNAME&lt;/P&gt;&lt;P&gt;                  OBJECT                        = 'VBBP'&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                ARCHIVE_HANDLE                = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                LOCAL_CAT                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;              IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                HEADER                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;                TABLES&lt;/P&gt;&lt;P&gt;                  LINES                         = CLITEXT&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;              EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                ID                            = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                LANGUAGE                      = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                NAME                          = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                NOT_FOUND                     = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                OBJECT                        = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                REFERENCE_CHECK               = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                WRONG_ACCESS_TO_ARCHIVE       = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;                OTHERS                        = 8&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;                        .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;              ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          MOVE CLITEXT-TDLINE TO W_CLITEXT .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 10:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416189#M539291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T10:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: read_text help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416190#M539292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You are passing Name  = SY-UNAME which is wrong&lt;/P&gt;&lt;P&gt;If it is Header text pass the Sales order number if it is Item text concatenate Order number and Item number and pass it to OBJECTNAME field instead of SY-UNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ_TEXT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ_TEXT provides a text for the application program in the specified work areas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;OBJECT = ?...&lt;/P&gt;&lt;P&gt;NAME = ?...&lt;/P&gt;&lt;P&gt;ID = ?...&lt;/P&gt;&lt;P&gt;LANGUAGE = ?...&lt;/P&gt;&lt;P&gt;ARCHIVE_HANDLE = 0&lt;/P&gt;&lt;P&gt;IMPORTING HEADER =&lt;/P&gt;&lt;P&gt;TABLES LINES = ?...&lt;/P&gt;&lt;P&gt;EXCEPTIONS ID =&lt;/P&gt;&lt;P&gt;LANGUAGE =&lt;/P&gt;&lt;P&gt;NAME =&lt;/P&gt;&lt;P&gt;NOT_FOUND =&lt;/P&gt;&lt;P&gt;OBJECT =&lt;/P&gt;&lt;P&gt;REFERENCE_CHECK =&lt;/P&gt;&lt;P&gt;WRONG_ACCESS_TO_ARCHIVE =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export parameters:&lt;/P&gt;&lt;P&gt;CLIENT&lt;/P&gt;&lt;P&gt;Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference field: SY-MANDT&lt;/P&gt;&lt;P&gt;Default value: SY-MANDT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECT&lt;/P&gt;&lt;P&gt;Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference field: THEAD-TDOBJECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAME&lt;/P&gt;&lt;P&gt;Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference field: THEAD-TDNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference field: THEAD-TDID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LANGUAGE&lt;/P&gt;&lt;P&gt;Enter the language key of the text module. The system accepts only languages that are defined in table T002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference field: THEAD-TDSPRAS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_HANDLE&lt;/P&gt;&lt;P&gt;If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value '0' indicates that you do not want to read the text from the archive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference field: SY-TABIX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Default value: 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import parameters:&lt;/P&gt;&lt;P&gt;HEADER&lt;/P&gt;&lt;P&gt;If the system finds the desired text, it returns the text header in this parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Structure: THEAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINES&lt;/P&gt;&lt;P&gt;The table contains all text lines that belong to the text read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Structure: TLINE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions: &lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LANGUAGE&lt;/P&gt;&lt;P&gt;The parameter LANGUAGE contains a language key that does not exist in table T002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAME&lt;/P&gt;&lt;P&gt;The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possible errors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field contains only blanks.&lt;/P&gt;&lt;P&gt;The field contains the invalid characters &amp;#145;*&amp;#146; or &amp;#145;,&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECT&lt;/P&gt;&lt;P&gt;The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOT_FOUND&lt;/P&gt;&lt;P&gt;The system did not find the specified text module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFERENCE_CHECK&lt;/P&gt;&lt;P&gt;The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRONG_ACCESS_ TO_ARCHIVE&lt;/P&gt;&lt;P&gt;The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Anji Reddy Vangala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 10:06:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416190#M539292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T10:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: read_text help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416191#M539293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;   i have defined my read_text in this manner but still i m not getting the value, now i am not getting the error but value is not displayed.please find the code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF IT_HEADER OCCURS 0,&lt;/P&gt;&lt;P&gt;          LRTEXT LIKE TLINE-TDLINE,&lt;/P&gt;&lt;P&gt;          END OF IT_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : TEXTNAME LIKE STXH-TDNAME.&lt;/P&gt;&lt;P&gt;  DATA: ITEXT LIKE TLINE OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; TEXTNAME = IT_HEADER-VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   LOOP AT IT_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        PERFORM READ_TEXT TABLES ITEXT USING '0004' 'VBBK' TEXTNAME.&lt;/P&gt;&lt;P&gt;        READ TABLE ITEXT INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;            IT_HEADER-LRTEXT = ITEXT-TDLINE.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM READ_TEXT TABLES ITEXT STRUCTURE TLINE&lt;/P&gt;&lt;P&gt;                         USING P_ID P_OBJ P_NAME.&lt;/P&gt;&lt;P&gt;          REFRESH ITEXT.&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;          CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;          ID = P_ID&lt;/P&gt;&lt;P&gt;          LANGUAGE = SY-LANGU&lt;/P&gt;&lt;P&gt;          NAME = P_NAME&lt;/P&gt;&lt;P&gt;          OBJECT = P_OBJ&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;          LINES = ITEXT&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;          ID = 1&lt;/P&gt;&lt;P&gt;          LANGUAGE = 2&lt;/P&gt;&lt;P&gt;          NAME = 3&lt;/P&gt;&lt;P&gt;          NOT_FOUND = 4&lt;/P&gt;&lt;P&gt;          OBJECT = 5&lt;/P&gt;&lt;P&gt;          REFERENCE_CHECK = 6&lt;/P&gt;&lt;P&gt;          WRONG_ACCESS_TO_ARCHIVE = 7&lt;/P&gt;&lt;P&gt;          OTHERS = 8.&lt;/P&gt;&lt;P&gt; ENDFORM. " READ_TEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2007 08:16:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416191#M539293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-22T08:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: read_text help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416192#M539294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 05:02:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-help/m-p/2416192#M539294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T05:02:24Z</dc:date>
    </item>
  </channel>
</rss>

