<?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: what is header text in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620195#M601656</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;For most of the application documents Texts are maintained at Both HEADER and ITEM level.&lt;/P&gt;&lt;P&gt;We can write some big 10 line text notes if needed at this place&lt;/P&gt;&lt;P&gt;These texts are created using CREATE_TEXT and SAVE_TEXT and edited using EDIT_TEXT fun modules&lt;/P&gt;&lt;P&gt;These texts are stored in STXH and STXL tables with the 4 parameters like OBJECT,ID, OBJECTNAME and LANGUAGE .&lt;/P&gt;&lt;P&gt;to fetch these texts into our reports we have to use &amp;lt;b&amp;gt;READ_TEXT&amp;lt;/b&amp;gt; function module by passing the above 4 parameters &lt;/P&gt;&lt;P&gt;see the doc of READ_TEXT&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;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2007 07:51:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-07T07:51:08Z</dc:date>
    <item>
      <title>what is header text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620194#M601655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls give detailed explanation. and how to read this in alvs &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;header text for sales orders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 07:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620194#M601655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T07:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: what is header text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620195#M601656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;For most of the application documents Texts are maintained at Both HEADER and ITEM level.&lt;/P&gt;&lt;P&gt;We can write some big 10 line text notes if needed at this place&lt;/P&gt;&lt;P&gt;These texts are created using CREATE_TEXT and SAVE_TEXT and edited using EDIT_TEXT fun modules&lt;/P&gt;&lt;P&gt;These texts are stored in STXH and STXL tables with the 4 parameters like OBJECT,ID, OBJECTNAME and LANGUAGE .&lt;/P&gt;&lt;P&gt;to fetch these texts into our reports we have to use &amp;lt;b&amp;gt;READ_TEXT&amp;lt;/b&amp;gt; function module by passing the above 4 parameters &lt;/P&gt;&lt;P&gt;see the doc of READ_TEXT&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;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 07:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620195#M601656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T07:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: what is header text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620196#M601657</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;you just go to sales order transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;click goto-&amp;gt; header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;note down the object id , formname , etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use FM read_text into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and display that in alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward points if helpful &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 07:51:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620196#M601657</guid>
      <dc:creator>Vijay</dc:creator>
      <dc:date>2007-08-07T07:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: what is header text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620197#M601658</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 fun module READ_TEXT to fetch the Header and Item text of Sales order&lt;/P&gt;&lt;P&gt;double click on the long text and it takes you to a text ediotr&lt;/P&gt;&lt;P&gt;from menu GOTO-&amp;gt; header &lt;/P&gt;&lt;P&gt;you will see the 4 parameters for header these parameters are&lt;/P&gt;&lt;P&gt;HEADER&lt;/P&gt;&lt;P&gt;OBJECT = VBBK&lt;/P&gt;&lt;P&gt;ID = Note down this ID&lt;/P&gt;&lt;P&gt;OBJECTNAME = Sales order Number (10 char) &lt;/P&gt;&lt;P&gt;Language = sy-langu (en)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ITEM text&lt;/P&gt;&lt;P&gt;OBJECT = VBBP&lt;/P&gt;&lt;P&gt;ID = notedown the ID&lt;/P&gt;&lt;P&gt;OBJECTNAME = Concatenation of Sales order number and Item No (VBELN + POSNR of VBAP table)&lt;/P&gt;&lt;P&gt;LANGUAGE = EN (sy-langu)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you have to pass these 4 parameters and to fetch the long text into an internal table using READ_TEXT fun module see the doc&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;&lt;/P&gt;&lt;P&gt;If u want alv template Check this sample alv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZALV                                                        *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
Report  ZALV  .

TABLES:     ekko.

type-pools: slis.                                 "ALV Declarations
*Data Declaration
*----------------
TYPES: BEGIN OF t_ekko,
 ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
  statu TYPE ekpo-statu,
  aedat TYPE ekpo-aedat,
  matnr TYPE ekpo-matnr,
  menge TYPE ekpo-menge,
  meins TYPE ekpo-meins,
  netpr TYPE ekpo-netpr,
  peinh TYPE ekpo-peinh,
 END OF t_ekko.

DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_ekko TYPE t_ekko.

*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid,
      gt_events     type slis_t_event,
      gd_prntparams type slis_print_alv.


************************************************************************
*Start-of-selection.
START-OF-SELECTION.

perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  BUILD_FIELDCATALOG
*&amp;amp;---------------------------------------------------------------------*
*       Build Fieldcatalog for ALV Report
*----------------------------------------------------------------------*
form build_fieldcatalog.

* There are a number of ways to create a fieldcat.
* For the purpose of this example i will build the fieldcatalog manualy
* by populating the internal table fields individually and then
* appending the rows. This method can be the most time consuming but can
* also allow you  more control of the final product.

* Beware though, you need to ensure that all fields required are
* populated. When using some of functionality available via ALV, such as
* total. You may need to provide more information than if you were
* simply displaying the result
*               I.e. Field type may be required in-order for
*                    the 'TOTAL' function to work.

  fieldcatalog-fieldname   = 'EBELN'.
  fieldcatalog-seltext_m   = 'Purchase Order'.
  fieldcatalog-col_pos     = 0.
  fieldcatalog-outputlen   = 10.
  fieldcatalog-emphasize   = 'X'.
  fieldcatalog-key         = 'X'.
*  fieldcatalog-do_sum      = 'X'.
*  fieldcatalog-no_zero     = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'EBELP'.
  fieldcatalog-seltext_m   = 'PO Item'.
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'STATU'.
  fieldcatalog-seltext_m   = 'Status'.
  fieldcatalog-col_pos     = 2.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'AEDAT'.
  fieldcatalog-seltext_m   = 'Item change date'.
  fieldcatalog-col_pos     = 3.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'MATNR'.
  fieldcatalog-seltext_m   = 'Material Number'.
  fieldcatalog-col_pos     = 4.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'MENGE'.
  fieldcatalog-seltext_m   = 'PO quantity'.
  fieldcatalog-col_pos     = 5.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'MEINS'.
  fieldcatalog-seltext_m   = 'Order Unit'.
  fieldcatalog-col_pos     = 6.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'NETPR'.
  fieldcatalog-seltext_m   = 'Net Price'.
  fieldcatalog-col_pos     = 7.
  fieldcatalog-outputlen   = 15.
  fieldcatalog-datatype     = 'CURR'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'PEINH'.
  fieldcatalog-seltext_m   = 'Price Unit'.
  fieldcatalog-col_pos     = 8.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
endform.                    " BUILD_FIELDCATALOG


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  BUILD_LAYOUT
*&amp;amp;---------------------------------------------------------------------*
*       Build layout for ALV grid report
*----------------------------------------------------------------------*
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
*  gd_layout-totals_only        = 'X'.
*  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
*                                         "click(press f2)
*  gd_layout-zebra             = 'X'.
*  gd_layout-group_change_edit = 'X'.
*  gd_layout-header_text       = 'helllllo'.
endform.                    " BUILD_LAYOUT


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_ALV_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       Display report using ALV grid
*----------------------------------------------------------------------*
form display_alv_report.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
            i_callback_user_command = 'USER_COMMAND'
*            i_grid_title           = outtext
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
*            it_special_groups       = gd_tabgroup
            it_events               = gt_events
            is_print                = gd_prntparams
            i_save                  = 'X'
*            is_variant              = z_template
       tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.
  if sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.
endform.                    " DISPLAY_ALV_REPORT


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DATA_RETRIEVAL
*&amp;amp;---------------------------------------------------------------------*
*       Retrieve data form EKPO table and populate itab it_ekko
*----------------------------------------------------------------------*
form data_retrieval.

select ebeln ebelp statu aedat matnr menge meins netpr peinh
 up to 10 rows
  from ekpo
  into table it_ekko.




endform.                    " DATA_RETRIEVAL


*-------------------------------------------------------------------*
* Form  TOP-OF-PAGE                                                 *
*-------------------------------------------------------------------*
* ALV Report Header                                                 *
*-------------------------------------------------------------------*
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
      wa_header type slis_listheader,
      t_line like wa_header-info,
      ld_lines type i,
      ld_linesc(10) type c.

* Title
  wa_header-typ  = 'H'.
  wa_header-info = 'EKKO Table Report'.
  append wa_header to t_header.
  clear wa_header.

* Date
  wa_header-typ  = 'S'.
  wa_header-key = 'Date: '.
  CONCATENATE  sy-datum+6(2) '.'
               sy-datum+4(2) '.'
               sy-datum(4) INTO wa_header-info.   "todays date
  append wa_header to t_header.
  clear: wa_header.

* Total No. of Records Selected
  describe table it_ekko lines ld_lines.
  ld_linesc = ld_lines.
  concatenate 'Total No. of Records Selected: ' ld_linesc
                    into t_line separated by space.
  wa_header-typ  = 'A'.
  wa_header-info = t_line.
  append wa_header to t_header.
  clear: wa_header, t_line.

  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
            it_list_commentary = t_header.
*            i_logo             = 'Z_LOGO'.
endform.


*------------------------------------------------------------------*
*       FORM USER_COMMAND                                          *
*------------------------------------------------------------------*
*       --&amp;gt; R_UCOMM                                                *
*       --&amp;gt; RS_SELFIELD                                            *
*------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
                  rs_selfield TYPE slis_selfield.

* Check function code
  CASE r_ucomm.
    WHEN '&amp;amp;IC1'.
*   Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'EBELN'.
*     Read data table, using index of row user clicked on
      READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
*     Set parameter ID for transaction screen field
      SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
*     Sxecute transaction ME23N, and skip initial data entry screen
      CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDCASE.
ENDFORM.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  BUILD_EVENTS
*&amp;amp;---------------------------------------------------------------------*
*       Build events table
*----------------------------------------------------------------------*
form build_events.
  data: ls_event type slis_alv_event.

  call function 'REUSE_ALV_EVENTS_GET'
       exporting
            i_list_type = 0
       importing
            et_events   = gt_events[].
  read table gt_events with key name =  slis_ev_end_of_page
                           into ls_event.
  if sy-subrc = 0.
    move 'END_OF_PAGE' to ls_event-form.
    append ls_event to gt_events.
  endif.

    read table gt_events with key name =  slis_ev_end_of_list
                           into ls_event.
  if sy-subrc = 0.
    move 'END_OF_LIST' to ls_event-form.
    append ls_event to gt_events.
  endif.
endform.                    " BUILD_EVENTS


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  BUILD_PRINT_PARAMS
*&amp;amp;---------------------------------------------------------------------*
*       Setup print parameters
*----------------------------------------------------------------------*
form build_print_params.
  gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
  gd_prntparams-no_coverpage = 'X'.
endform.                    " BUILD_PRINT_PARAMS


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  END_OF_PAGE
*&amp;amp;---------------------------------------------------------------------*
form END_OF_PAGE.
  data: listwidth type i,
        ld_pagepos(10) type c,
        ld_page(10)    type c.

  write: sy-uline(50).
  skip.
  write:/40 'Page:', sy-pagno .
endform.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  END_OF_LIST
*&amp;amp;---------------------------------------------------------------------*
form END_OF_LIST.
  data: listwidth type i,
        ld_pagepos(10) type c,
        ld_page(10)    type c.

  skip.
  write:/40 'Page:', sy-pagno .
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 07:52:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620197#M601658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T07:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: what is header text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620198#M601659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;call function modules read_text.&lt;/P&gt;&lt;P&gt;passthis parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HEADER&lt;/P&gt;&lt;P&gt;OBJECT = VBBK&lt;/P&gt;&lt;P&gt;ID = Note down this ID&lt;/P&gt;&lt;P&gt;OBJECTNAME = ''&lt;/P&gt;&lt;P&gt;Language = sy-langu &lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3857509"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 07:53:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-header-text/m-p/2620198#M601659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T07:53:51Z</dc:date>
    </item>
  </channel>
</rss>

