<?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: header in text file. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264167#M779992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can try doing as mentioned above&lt;/P&gt;&lt;P&gt;however, in some cases, the datatype of the internal table may not allow you to entire the text header string that you need&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in such cases you can use this method&lt;/P&gt;&lt;P&gt;what i have done here, is to make a simple internal table with text values to insert the text&lt;/P&gt;&lt;P&gt;i used that table with the FM first&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then i called the function module again and passed the data&lt;/P&gt;&lt;P&gt;in the second call, i set the append parameter to 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
types: begin of header_type,
  field1(20),
  field2(20),
  field3(20),
 end of header_type.
data: it_header type header_type occurs 0 with header line.

it_header-field1 = 'field_1'.
it_header-field2 = 'field_2'.
it_header-field3 = 'field_3'.
append it_header.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename              = 'c:\test_xls.xls'
    filetype              = 'ASC'
    write_field_separator = 'X'
    DAT_MODE              = 'X'
    TRUNC_TRAILING_BLANKS = 'X'
  TABLES
    data_tab              = it_header.


CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename              = 'c:\test_xls.xls'
    filetype              = 'ASC'
    append                = 'X'
    write_field_separator = 'X'
    DAT_MODE              = 'X'
    TRUNC_TRAILING_BLANKS = 'X'
  TABLES
    data_tab              = itab.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jan 2008 09:12:49 GMT</pubDate>
    <dc:creator>former_member189059</dc:creator>
    <dc:date>2008-01-08T09:12:49Z</dc:date>
    <item>
      <title>header in text file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264165#M779990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert,&lt;/P&gt;&lt;P&gt;wn i m downloading a text file into presentation server , hw can i add header there for heading of the particular fieds which is showing in file.plz suggest.&lt;/P&gt;&lt;P&gt; thanx and regards...&lt;/P&gt;&lt;P&gt;sunil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2008 08:58:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264165#M779990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-08T08:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: header in text file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264166#M779991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you want to add header details for the records at the time of downloading it to presentation server, Just add the Header Values as the first Row of your internal table and then append other records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use your internal table in 'GUI_DOWNLOAD' FM to download it to presentation server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps your requirement.&lt;/P&gt;&lt;P&gt;Award points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ananth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2008 09:06:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264166#M779991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-08T09:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: header in text file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264167#M779992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can try doing as mentioned above&lt;/P&gt;&lt;P&gt;however, in some cases, the datatype of the internal table may not allow you to entire the text header string that you need&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in such cases you can use this method&lt;/P&gt;&lt;P&gt;what i have done here, is to make a simple internal table with text values to insert the text&lt;/P&gt;&lt;P&gt;i used that table with the FM first&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then i called the function module again and passed the data&lt;/P&gt;&lt;P&gt;in the second call, i set the append parameter to 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
types: begin of header_type,
  field1(20),
  field2(20),
  field3(20),
 end of header_type.
data: it_header type header_type occurs 0 with header line.

it_header-field1 = 'field_1'.
it_header-field2 = 'field_2'.
it_header-field3 = 'field_3'.
append it_header.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename              = 'c:\test_xls.xls'
    filetype              = 'ASC'
    write_field_separator = 'X'
    DAT_MODE              = 'X'
    TRUNC_TRAILING_BLANKS = 'X'
  TABLES
    data_tab              = it_header.


CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename              = 'c:\test_xls.xls'
    filetype              = 'ASC'
    append                = 'X'
    write_field_separator = 'X'
    DAT_MODE              = 'X'
    TRUNC_TRAILING_BLANKS = 'X'
  TABLES
    data_tab              = itab.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2008 09:12:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264167#M779992</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2008-01-08T09:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: header in text file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264168#M779993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare the header fields as the character types, before moving the internal table data to the final internal table which will display data to the output try to move the header details to the particular internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2008 09:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/header-in-text-file/m-p/3264168#M779993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-08T09:23:10Z</dc:date>
    </item>
  </channel>
</rss>

