<?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: internal table to excel in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154060#M118324</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;try this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MS_EXCEL_OLE_STANDARD_DAT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this FM, the header can also be given separately. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maheshwari.V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jan 2006 13:11:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-09T13:11:41Z</dc:date>
    <item>
      <title>internal table to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154055#M118319</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;See the below code and can any one pls tell me what is that i writing wrong here. What i want to do is If the check box is checked, i want to download the data to excel sheet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also tell me if there are any other parameters to be filled in the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: v_file type string.

DATA : BEGIN OF it_excelhead OCCURS 0,
         colname(40),
        END OF it_excelhead.

PARAMETER:  p_check AS CHECKBOX DEFAULT ' ',
            p_file LIKE rlgrap-filename DEFAULT 'c:'.



  IF p_check = 'X'.
    PERFORM prepare_excel_header.
    MOVE p_file TO v_file.

    CONCATENATE p_file '.xls' INTO v_file.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename                        = v_file
   FILETYPE                        = 'ASC'
  tables
    data_tab                        = i_final1
    FIELDNAMES                      = it_excelhead.
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.
endif.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2006 12:57:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154055#M118319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-09T12:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: internal table to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154056#M118320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please change &amp;lt;b&amp;gt;the 'ASC' to 'BIN'.&amp;lt;/b&amp;gt;Hope This Info Helps YOU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Reward Points If It Helps YOU.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghav&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF p_check = 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM prepare_excel_header.&lt;/P&gt;&lt;P&gt;    MOVE p_file TO v_file.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    CONCATENATE p_file '.xls' INTO v_file.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                        = v_file&lt;/P&gt;&lt;P&gt;   FILETYPE                        = 'BIN'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab                        = i_final1&lt;/P&gt;&lt;P&gt;    FIELDNAMES                      = it_excelhead.&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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" 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;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2006 13:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154056#M118320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-09T13:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: internal table to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154057#M118321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;you have build a flat file,&lt;/P&gt;&lt;P&gt;try to put a txt extension and open it with a txt editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for creating an excel  file there is a fm.&lt;/P&gt;&lt;P&gt;As soon as i put it there,&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;enzo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2006 13:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154057#M118321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-09T13:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: internal table to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154058#M118322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you use fm XXL_SIMPLE_API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fo XL files this is the best&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2006 13:05:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154058#M118322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-09T13:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: internal table to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154059#M118323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;    Please use below FM to download data &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              FILE_NAME                 = LV_FILE1&lt;/P&gt;&lt;P&gt;              DATA_SHEET_NAME           = 'SUMMARY'&lt;/P&gt;&lt;P&gt;         TABLES&lt;/P&gt;&lt;P&gt;              DATA_TAB      = IT_EXCEL_SUMMARY&lt;/P&gt;&lt;P&gt;                            &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_FILENAME          = 6&lt;/P&gt;&lt;P&gt;              INVALID_PIVOT_FIELDS      = 7&lt;/P&gt;&lt;P&gt;              DOWNLOAD_PROBLEM          = 8&lt;/P&gt;&lt;P&gt;              OTHERS                    = 9.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points If information is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2006 13:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154059#M118323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-09T13:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: internal table to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154060#M118324</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;try this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MS_EXCEL_OLE_STANDARD_DAT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this FM, the header can also be given separately. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maheshwari.V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2006 13:11:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154060#M118324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-09T13:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: internal table to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154061#M118325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i dont think using gui_download is a good option for handling Excel file.&lt;/P&gt;&lt;P&gt;Try this one out: &amp;lt;b&amp;gt;SAP_CONVERT_TO_XLS_FORMAT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2006 13:24:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154061#M118325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-09T13:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: internal table to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154062#M118326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Pass the exporting parameter WRITE_FIELD_SEPARATOR as 'X' for GUI_DOWNLOAD and it should work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2006 14:19:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-to-excel/m-p/1154062#M118326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-09T14:19:32Z</dc:date>
    </item>
  </channel>
</rss>

