<?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 Inserting Field Names as Header in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915530#M1330533</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;I am downloading few records from one internal table.But While downloading I want to add the filed names(to identify which record belongs to which field) too.Can anyone help me with some sample code for this?Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2009 10:27:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-14T10:27:20Z</dc:date>
    <item>
      <title>Inserting Field Names as Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915530#M1330533</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;I am downloading few records from one internal table.But While downloading I want to add the filed names(to identify which record belongs to which field) too.Can anyone help me with some sample code for this?Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 10:27:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915530#M1330533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-14T10:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Field Names as Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915531#M1330534</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;Before downloading the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First transfer all heading into one area and insert into u r internal table with index 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 10:29:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915531#M1330534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-14T10:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Field Names as Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915532#M1330535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Are you downloading the internal table to a excel sheet? Then use FM 'GUI_DOWNLOAD'.In that FM,in the TABLES parameter list,set the parameterFIELDNAMES. like the following way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_header,&lt;/P&gt;&lt;P&gt;          fieldname(100) TYPE c,&lt;/P&gt;&lt;P&gt;        END OF ty_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:it_head      TYPE TABLE OF ty_header,&lt;/P&gt;&lt;P&gt;wa_head      TYPE ty_header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then call a subroutine like the following one before calling the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form BUILD_HEADING .&lt;/P&gt;&lt;P&gt; CLEAR  wa_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_head-fieldname = 'PersonnelId'.&lt;/P&gt;&lt;P&gt;  APPEND wa_head TO it_head.&lt;/P&gt;&lt;P&gt;  CLEAR  wa_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_head-fieldname = 'StartDate'.&lt;/P&gt;&lt;P&gt;  APPEND wa_head TO it_head.&lt;/P&gt;&lt;P&gt;  CLEAR  wa_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_head-fieldname = 'EndDate'.&lt;/P&gt;&lt;P&gt;  APPEND wa_head TO it_head.&lt;/P&gt;&lt;P&gt;  CLEAR  wa_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_head-fieldname = 'Reason'.&lt;/P&gt;&lt;P&gt;  APPEND wa_head TO it_head.&lt;/P&gt;&lt;P&gt;  CLEAR  wa_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_head-fieldname = 'WageType'.&lt;/P&gt;&lt;P&gt;  APPEND wa_head TO it_head.&lt;/P&gt;&lt;P&gt;  CLEAR  wa_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_head-fieldname = 'NewHourlyRate'.&lt;/P&gt;&lt;P&gt;  APPEND wa_head TO it_head.&lt;/P&gt;&lt;P&gt;  CLEAR  wa_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wa_head-fieldname = 'NewAnnualSalary'.&lt;/P&gt;&lt;P&gt;  APPEND wa_head TO it_head.&lt;/P&gt;&lt;P&gt;  CLEAR  wa_head.&lt;/P&gt;&lt;P&gt;endform.                    " BUILD_HEADING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;finally call the FM where you have to set..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables&lt;/P&gt;&lt;P&gt;  FIELDNAMES = it_head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 10:35:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915532#M1330535</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2009-07-14T10:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Field Names as Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915533#M1330536</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 need to append the header names.&lt;/P&gt;&lt;P&gt;Check this Wiki&lt;/P&gt;&lt;P&gt;[https://wiki.sdn.sap.com/wiki/display/Snippets/download&lt;EM&gt;data&lt;/EM&gt;into&lt;EM&gt;excel&lt;/EM&gt;with+header]&lt;/P&gt;&lt;P&gt;Link &lt;SPAN __jive_macro_name="message" id="6930927"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sarves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 10:37:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915533#M1330536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-14T10:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Field Names as Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915534#M1330537</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;Thanks for the reply.But I am downloading one tab delimated file using cl_gui_frontend_services=&amp;gt;gui_download.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 10:56:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915534#M1330537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-14T10:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting Field Names as Header</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915535#M1330538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi, 
Do this way.
&amp;lt;li&amp;gt;Take headers in one table. Download that table using cl_gui_frontend_services=&amp;gt;gui_download. Here u need to set Append parameter as ' '.
&amp;lt;li&amp;gt;Take data in another table. Download that table using cl_gui_frontend_services=&amp;gt;gui_download. Here u need to set Append parameter as 'X'.
&amp;lt;li&amp;gt;When you call cl_gui_frontend_services=&amp;gt;gui_download method first time it creates file and keeps the header and when u call second time it appends to the existing file. File path should be same.

I hope that it solves your problem.

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 11:05:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-names-as-header/m-p/5915535#M1330538</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-07-14T11:05:38Z</dc:date>
    </item>
  </channel>
</rss>

