<?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: Problem while down loading ALV list into excel sheet. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034326#M417771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why don't u use the grid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Mar 2007 17:01:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-27T17:01:32Z</dc:date>
    <item>
      <title>Problem while down loading ALV list into excel sheet.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034325#M417770</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;Iam facing problem while down loading the ALV list to Excel sheet by Choosing 'Spread sheet button' ( Ctrl + Shift + F7 ).&lt;/P&gt;&lt;P&gt; The order of the fields in my list and in my excel sheet are not matching. &lt;/P&gt;&lt;P&gt;All my date, quantity and currency fields are downloading at the last of excel sheet .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brahma Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 16:53:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034325#M417770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T16:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while down loading ALV list into excel sheet.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034326#M417771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why don't u use the grid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 17:01:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034326#M417771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T17:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while down loading ALV list into excel sheet.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034327#M417772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brahma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the way that SAP built the ALV grid's download.  You will find numerous threads about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to change this order, you must create soem custom functionality using OLE Automation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 17:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034327#M417772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T17:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while down loading ALV list into excel sheet.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034328#M417773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;can you tell me how to go about OLE automation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brahma Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 17:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034328#M417773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T17:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while down loading ALV list into excel sheet.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034329#M417774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Easiest way is not code the OLE automation directly... but let SAP do it for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would add a custom DOWNLOAD button to your screen and implement this code with (note - you can get much fancier output by creating the OLE Automation yourself - but much more work):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZR_DOWNLOAD_TO_EXCEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of lt_data_tab occurs 0,&lt;/P&gt;&lt;P&gt;        vbeln like vbak-vbeln,&lt;/P&gt;&lt;P&gt;        kunnr like vbak-kunnr,&lt;/P&gt;&lt;P&gt;        ernam like vbak-ernam,&lt;/P&gt;&lt;P&gt;       end of lt_data_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_filename type STRING.&lt;/P&gt;&lt;P&gt;data: outname type RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;data: sname type RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;data: begin of col_headers occurs 0,&lt;/P&gt;&lt;P&gt;        text(10),&lt;/P&gt;&lt;P&gt;      end of col_headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK ONE WITH FRAME TITLE TEXT-001.&lt;/P&gt;&lt;P&gt;  selection-screen: skip 1.&lt;/P&gt;&lt;P&gt;  parameters: cb_hdrs as checkbox.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK ONE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select vbeln kunnr ernam up to 50 rows&lt;/P&gt;&lt;P&gt;    from vbak into table lt_data_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move 'c:\excel_demo' to outname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if cb_hdrs = 'X'.&lt;/P&gt;&lt;P&gt;    move 'Order #' to col_headers-text.&lt;/P&gt;&lt;P&gt;    append col_headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move 'Sold-to #' to col_headers-text.&lt;/P&gt;&lt;P&gt;    append col_headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move 'Created By' to col_headers-text.&lt;/P&gt;&lt;P&gt;    append col_headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        file_name                       = outname&lt;/P&gt;&lt;P&gt;        data_sheet_name                 = sname&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       data_tab                        = lt_data_tab&lt;/P&gt;&lt;P&gt;       fieldnames                      = col_headers&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       file_not_exist                  = 1&lt;/P&gt;&lt;P&gt;       filename_expected               = 2&lt;/P&gt;&lt;P&gt;       communication_error             = 3&lt;/P&gt;&lt;P&gt;       ole_object_method_error         = 4&lt;/P&gt;&lt;P&gt;       ole_object_property_error       = 5&lt;/P&gt;&lt;P&gt;       invalid_pivot_fields            = 6&lt;/P&gt;&lt;P&gt;       download_problem                = 7&lt;/P&gt;&lt;P&gt;       OTHERS                          = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     MESSAGE s000(zz) WITH 'Export to Excel failed.'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        file_name                       = outname&lt;/P&gt;&lt;P&gt;        data_sheet_name                 = sname&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       data_tab                        = lt_data_tab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      fieldnames                      = col_headers&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       file_not_exist                  = 1&lt;/P&gt;&lt;P&gt;       filename_expected               = 2&lt;/P&gt;&lt;P&gt;       communication_error             = 3&lt;/P&gt;&lt;P&gt;       ole_object_method_error         = 4&lt;/P&gt;&lt;P&gt;       ole_object_property_error       = 5&lt;/P&gt;&lt;P&gt;       invalid_pivot_fields            = 6&lt;/P&gt;&lt;P&gt;       download_problem                = 7&lt;/P&gt;&lt;P&gt;       OTHERS                          = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     MESSAGE s000(zz) WITH 'Export to Excel failed.'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2007 17:12:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-down-loading-alv-list-into-excel-sheet/m-p/2034329#M417774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-27T17:12:07Z</dc:date>
    </item>
  </channel>
</rss>

