<?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: Function module to from sap to excel in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524770#M847887</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;1. WS_EXCEL : It will display on screen not download .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 &lt;/P&gt;&lt;P&gt; CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   filename = 'C:\TEMP\DATA.XLS'&lt;/P&gt;&lt;P&gt;   WRITE_FIELD_SEPARATOR = 'X'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;   data_tab = itab "Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Feb 2008 04:15:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-29T04:15:35Z</dc:date>
    <item>
      <title>Function module to from sap to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524767#M847884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,,&lt;/P&gt;&lt;P&gt;I wanted to know what are all the functiona module available to download sap data to excel sheet from internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewarded if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 18:43:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524767#M847884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-28T18:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to from sap to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524768#M847885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Moni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try FM WS_EXCEL.  Not sure if you are displaying the data in a screen, if you are, you could also use an ALV GRID to display it .  ALV functionality already has the excel download in it.    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Leticia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 21:18:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524768#M847885</guid>
      <dc:creator>leticia_chee</dc:creator>
      <dc:date>2008-02-28T21:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to from sap to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524769#M847886</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;refer to the thread.&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="4949410"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer to this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:&lt;/P&gt;&lt;P&gt;  sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;header data................................&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA :&lt;/P&gt;&lt;P&gt;  header1 LIKE gxxlt_p-text VALUE 'Suresh',&lt;/P&gt;&lt;P&gt;  header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for holding the SFLIGHT data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA BEGIN OF t_sflight OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE sflight.&lt;/P&gt;&lt;P&gt;DATA END   OF t_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for holding the horizontal key.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA BEGIN OF  t_hkey OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE gxxlt_h.&lt;/P&gt;&lt;P&gt;DATA END   OF t_hkey .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for holding the vertical key.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA BEGIN OF t_vkey OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE gxxlt_v.&lt;/P&gt;&lt;P&gt;DATA END   OF t_vkey .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for holding the online text....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA BEGIN OF t_online OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE gxxlt_o.&lt;/P&gt;&lt;P&gt;DATA END   OF t_online.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table to hold print text.............&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA BEGIN OF t_print OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE gxxlt_p.&lt;/P&gt;&lt;P&gt;DATA END   OF t_print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table to hold SEMA data..............&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA BEGIN OF t_sema OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE gxxlt_s.&lt;/P&gt;&lt;P&gt;DATA END   OF t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Retreiving data from sflight.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT * FROM sflight&lt;/P&gt;&lt;P&gt;         INTO TABLE t_sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Text which will be displayed online is declared here....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;t_online-line_no    = '1'.&lt;/P&gt;&lt;P&gt;t_online-info_name  = 'Created by'.&lt;/P&gt;&lt;P&gt;t_online-info_value = 'SURESH KUMAR PARVATHANENI'.&lt;/P&gt;&lt;P&gt;APPEND t_online.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Text which will be printed out..........................&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;t_print-hf     = 'H'.&lt;/P&gt;&lt;P&gt;t_print-lcr    = 'L'.&lt;/P&gt;&lt;P&gt;t_print-line_no = '1'.&lt;/P&gt;&lt;P&gt;t_print-text   = 'This is the header'.&lt;/P&gt;&lt;P&gt;APPEND t_print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_print-hf     = 'F'.&lt;/P&gt;&lt;P&gt;t_print-lcr    = 'C'.&lt;/P&gt;&lt;P&gt;t_print-line_no = '1'.&lt;/P&gt;&lt;P&gt;t_print-text   = 'This is the footer'.&lt;/P&gt;&lt;P&gt;APPEND t_print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Defining the vertical key columns.......&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;t_vkey-col_no   = '1'.&lt;/P&gt;&lt;P&gt;t_vkey-col_name = 'MANDT'.&lt;/P&gt;&lt;P&gt;APPEND t_vkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_vkey-col_no   = '2'.&lt;/P&gt;&lt;P&gt;t_vkey-col_name = 'CARRID'.&lt;/P&gt;&lt;P&gt;APPEND t_vkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_vkey-col_no   = '3'.&lt;/P&gt;&lt;P&gt;t_vkey-col_name = 'CONNID'.&lt;/P&gt;&lt;P&gt;APPEND t_vkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_vkey-col_no   = '4'.&lt;/P&gt;&lt;P&gt;t_vkey-col_name = 'FLDATE'.&lt;/P&gt;&lt;P&gt;APPEND t_vkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Header text for the data columns................&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_hkey-row_no = '1'.&lt;/P&gt;&lt;P&gt;t_hkey-col_no = 1.&lt;/P&gt;&lt;P&gt;t_hkey-col_name = 'PRICE'.&lt;/P&gt;&lt;P&gt;APPEND t_hkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_hkey-col_no = 2.&lt;/P&gt;&lt;P&gt;t_hkey-col_name = 'CURRENCY'.&lt;/P&gt;&lt;P&gt;APPEND t_hkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_hkey-col_no = 3.&lt;/P&gt;&lt;P&gt;t_hkey-col_name = 'PLANETYPE'.&lt;/P&gt;&lt;P&gt;APPEND t_hkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_hkey-col_no = 4.&lt;/P&gt;&lt;P&gt;t_hkey-col_name = 'SEATSMAX'.&lt;/P&gt;&lt;P&gt;APPEND t_hkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_hkey-col_no = 5.&lt;/P&gt;&lt;P&gt;t_hkey-col_name = 'SEATSOCC'.&lt;/P&gt;&lt;P&gt;APPEND t_hkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_hkey-col_no = 6.&lt;/P&gt;&lt;P&gt;t_hkey-col_name = 'PAYMENTSUM'.&lt;/P&gt;&lt;P&gt;APPEND t_hkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populating the SEMA data..........................&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;t_sema-col_no  = 1.&lt;/P&gt;&lt;P&gt;t_sema-col_typ = 'STR'.&lt;/P&gt;&lt;P&gt;t_sema-col_ops = 'DFT'.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 2.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 3.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 4.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 5.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 6.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 7.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 8.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 9.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_sema-col_no = 10.&lt;/P&gt;&lt;P&gt;t_sema-col_typ = 'NUM'.&lt;/P&gt;&lt;P&gt;t_sema-col_ops = 'ADD'.&lt;/P&gt;&lt;P&gt;APPEND t_sema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'XXL_FULL_API'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATA_ENDING_AT          = 54&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DATA_STARTING_AT        = 5&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   filename                = 'TESTFILE'&lt;/P&gt;&lt;P&gt;   header_1                = header1&lt;/P&gt;&lt;P&gt;   header_2                = header2&lt;/P&gt;&lt;P&gt;   no_dialog               = 'X'&lt;/P&gt;&lt;P&gt;   no_start                = ' '&lt;/P&gt;&lt;P&gt;    n_att_cols              = 6&lt;/P&gt;&lt;P&gt;    n_hrz_keys              = 1&lt;/P&gt;&lt;P&gt;    n_vrt_keys              = 4&lt;/P&gt;&lt;P&gt;   sema_type               = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SO_TITLE                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data                    = t_sflight&lt;/P&gt;&lt;P&gt;    hkey                    = t_hkey&lt;/P&gt;&lt;P&gt;    online_text             = t_online&lt;/P&gt;&lt;P&gt;    print_text              = t_print&lt;/P&gt;&lt;P&gt;    sema                    = t_sema&lt;/P&gt;&lt;P&gt;    vkey                    = t_vkey&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   cancelled_by_user       = 1&lt;/P&gt;&lt;P&gt;   data_too_big            = 2&lt;/P&gt;&lt;P&gt;   dim_mismatch_data       = 3&lt;/P&gt;&lt;P&gt;   dim_mismatch_sema       = 4&lt;/P&gt;&lt;P&gt;   dim_mismatch_vkey       = 5&lt;/P&gt;&lt;P&gt;   error_in_hkey           = 6&lt;/P&gt;&lt;P&gt;   error_in_sema           = 7&lt;/P&gt;&lt;P&gt;   file_open_error         = 8&lt;/P&gt;&lt;P&gt;   file_write_error        = 9&lt;/P&gt;&lt;P&gt;   inv_data_range          = 10&lt;/P&gt;&lt;P&gt;   inv_winsys              = 11&lt;/P&gt;&lt;P&gt;   inv_xxl                 = 12&lt;/P&gt;&lt;P&gt;   OTHERS                  = 13&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sreelakshmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 04:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524769#M847886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T04:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Function module to from sap to excel</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524770#M847887</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;1. WS_EXCEL : It will display on screen not download .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 &lt;/P&gt;&lt;P&gt; CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   filename = 'C:\TEMP\DATA.XLS'&lt;/P&gt;&lt;P&gt;   WRITE_FIELD_SEPARATOR = 'X'&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;   data_tab = itab "Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 04:15:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-from-sap-to-excel/m-p/3524770#M847887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-29T04:15:35Z</dc:date>
    </item>
  </channel>
</rss>

