<?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 REUSE_ALV_LIST_DISPLAY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347508#M174834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Franis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you manually add a line to the table for headings, there is not much we can do about it using GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A work around would be to try and use the DOI / OLE methods and see if its possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 May 2006 02:04:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-11T02:04:21Z</dc:date>
    <item>
      <title>function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347502#M174828</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've written some program using the function 'REUSE_ALV_LIST_DISPLAY' and make use of the standard function provided by the ALV table create by this function to export the data to Excel. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I noticed that the export function will automatically reshuffle the columns so that all the text columns comes first and then followed by the columns with numberic field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be grateful if you guys have any idea how I can keep the columns in the exported excel file in the same sequence as what is displayed in the alv table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;Francis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 13:09:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347502#M174828</guid>
      <dc:creator>Francis417</dc:creator>
      <dc:date>2006-05-10T13:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347503#M174829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Francis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have do that manually using the GUI_DOWNLOAD method of CL_GUI_FRONTEND_SERVICES. Add a button and you can do that in there. You can hide the standard one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The standard will reshuffle the columns like you said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 13:13:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347503#M174829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T13:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347504#M174830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii&lt;/P&gt;&lt;P&gt;try this one &lt;/P&gt;&lt;P&gt;REPORT  zupload_excel_to_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: truxs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE  rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_datatab,&lt;/P&gt;&lt;P&gt;      col1(30)    TYPE c,&lt;/P&gt;&lt;P&gt;      col2(30)    TYPE c,&lt;/P&gt;&lt;P&gt;      col3(30)    TYPE c,&lt;/P&gt;&lt;P&gt;      END OF t_datatab.&lt;/P&gt;&lt;P&gt;DATA: it_datatab type standard table of t_datatab,&lt;/P&gt;&lt;P&gt;      wa_datatab type t_datatab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_raw TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;At selection screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      field_name = 'P_FILE'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name  = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    I_FIELD_SEPERATOR        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      i_line_header            =  'X'&lt;/P&gt;&lt;P&gt;      i_tab_raw_data           =  it_raw       " WORK TABLE&lt;/P&gt;&lt;P&gt;      i_filename               =  p_file&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_converted_data     = it_datatab[]    "ACTUAL DATA&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;      conversion_failed        = 1&lt;/P&gt;&lt;P&gt;      OTHERS                   = 2.&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;***********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  LOOP AT it_datatab INTO wa_datatab.&lt;/P&gt;&lt;P&gt;    WRITE:/ wa_datatab-col1,&lt;/P&gt;&lt;P&gt;            wa_datatab-col2,&lt;/P&gt;&lt;P&gt;            wa_datatab-col3.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks n Regards &lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 13:14:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347504#M174830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T13:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347505#M174831</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;if you want always download then you can use GUI_DOWNLOAD before calling the ALV FM. or else you can place one button and call gui_download when you press that.&lt;/P&gt;&lt;P&gt;this will not alter your file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 13:21:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347505#M174831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T13:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347506#M174832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Francis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You put the data to be downloaded to the excel file into an internal table , say , itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then call function module GUI_Download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code :&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BIN_FILESIZE                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    filename                        = &amp;lt;b&amp;gt;'D:\test2.xls'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;   filetype                        = 'ASC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  APPEND                          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WRITE_FIELD_SEPARATOR           = 'I'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER                          = '00'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   trunc_trailing_blanks           = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WRITE_LF                        = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  COL_SELECT                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  COL_SELECT_MASK                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DAT_MODE                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONFIRM_OVERWRITE               = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_AUTH_CHECK                   = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CODEPAGE                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IGNORE_CERR                     = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   replacement                     = 'E'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WRITE_BOM                       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TRUNC_TRAILING_BLANKS_EOL       = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILELENGTH                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab                        = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELDNAMES                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   file_write_error                = 1&lt;/P&gt;&lt;P&gt;   no_batch                        = 2&lt;/P&gt;&lt;P&gt;   gui_refuse_filetransfer         = 3&lt;/P&gt;&lt;P&gt;   invalid_type                    = 4&lt;/P&gt;&lt;P&gt;   no_authority                    = 5&lt;/P&gt;&lt;P&gt;   unknown_error                   = 6&lt;/P&gt;&lt;P&gt;   header_not_allowed              = 7&lt;/P&gt;&lt;P&gt;   separator_not_allowed           = 8&lt;/P&gt;&lt;P&gt;   filesize_not_allowed            = 9&lt;/P&gt;&lt;P&gt;   header_too_long                 = 10&lt;/P&gt;&lt;P&gt;   dp_error_create                 = 11&lt;/P&gt;&lt;P&gt;   dp_error_send                   = 12&lt;/P&gt;&lt;P&gt;   dp_error_write                  = 13&lt;/P&gt;&lt;P&gt;   unknown_dp_error                = 14&lt;/P&gt;&lt;P&gt;   access_denied                   = 15&lt;/P&gt;&lt;P&gt;   dp_out_of_memory                = 16&lt;/P&gt;&lt;P&gt;   disk_full                       = 17&lt;/P&gt;&lt;P&gt;   dp_timeout                      = 18&lt;/P&gt;&lt;P&gt;   file_not_found                  = 19&lt;/P&gt;&lt;P&gt;   dataprovider_exception          = 20&lt;/P&gt;&lt;P&gt;   control_flush_error             = 21&lt;/P&gt;&lt;P&gt;   OTHERS                          = 22&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 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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kunal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 13:34:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347506#M174832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T13:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347507#M174833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now I encounter another problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using the function provided from ALV, I now call GUI_DOWNLOAD to download the file, however, the column heading cannot be exported as in the case when I'm exporting from the ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any means to export the content of the internat table, containing both text and numeric columns, to an excel file with column heading? I want to keep the number column as numeric, not text, in the excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many many thanks for your help in advance,&lt;/P&gt;&lt;P&gt;Francis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 01:38:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347507#M174833</guid>
      <dc:creator>Francis417</dc:creator>
      <dc:date>2006-05-11T01:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347508#M174834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Franis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you manually add a line to the table for headings, there is not much we can do about it using GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A work around would be to try and use the DOI / OLE methods and see if its possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 02:04:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347508#M174834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T02:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347509#M174835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it be possible if you can share some code sample showing me how to use the DOI/OLE methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Francis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 02:08:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347509#M174835</guid>
      <dc:creator>Francis417</dc:creator>
      <dc:date>2006-05-11T02:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347510#M174836</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 have not done this myself, so I am pointing you to couple of blogs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/rich.heilman2/blog/2005/09/12/manipulate-excel-with-ole-abap&lt;/P&gt;&lt;P&gt;/people/sap.user72/blog/2006/02/07/downloading-data-into-excel-with-format-options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look and see if they are of any use to you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ravikumar Allampallam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 02:26:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347510#M174836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T02:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: function REUSE_ALV_LIST_DISPLAY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347511#M174837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;copy the code given below and run it. I have used the fm 'EXCEL_OLE_STANDARD_DAT' to download data and its heading into the excel file . The d/b table i have used is table Zkunal1 with fields MANDT , FNAME , LNAME and PLACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZKUN_FILE4                                                  *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZKUN_FILE4                              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: USR03,DD02L,zkunal1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ZX030L LIKE X030L.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA BEGIN OF ZDFIES OCCURS 0.&lt;/P&gt;&lt;P&gt;     INCLUDE STRUCTURE DFIES.&lt;/P&gt;&lt;P&gt;DATA END OF ZDFIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF FLDITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;      FLDNAME(11) TYPE C,&lt;/P&gt;&lt;P&gt;      END OF FLDITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA ITABUSR03 LIKE USR03 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA ITABUSR03 LIKE zkunal1 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA TNAME LIKE DD02L-TABNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*SELECT * FROM USR03 INTO TABLE ITABUSR03.&lt;/P&gt;&lt;P&gt;SELECT * FROM zkunal1 INTO TABLE ITABUSR03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*TNAME = 'USR03'.&lt;/P&gt;&lt;P&gt;TNAME = 'zkunal1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM GETFIELEDS.&lt;/P&gt;&lt;P&gt;PERFORM SHOW123.&lt;/P&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;P&gt;FORM GETFIELEDS.&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'GET_FIELDTAB'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;          LANGU              = SY-LANGU&lt;/P&gt;&lt;P&gt;          ONLY               = SPACE&lt;/P&gt;&lt;P&gt;          TABNAME            = TNAME&lt;/P&gt;&lt;P&gt;          WITHTEXT           = 'X'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;          HEADER             = ZX030L&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;          FIELDTAB           = ZDFIES&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;          INTERNAL_ERROR      = 01&lt;/P&gt;&lt;P&gt;          NO_TEXTS_FOUND      = 02&lt;/P&gt;&lt;P&gt;          TABLE_HAS_NO_FIELDS = 03&lt;/P&gt;&lt;P&gt;          TABLE_NOT_ACTIV     = 04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CASE SY-SUBRC.&lt;/P&gt;&lt;P&gt;        WHEN 0.&lt;/P&gt;&lt;P&gt;          LOOP AT ZDFIES.&lt;/P&gt;&lt;P&gt;               FLDITAB-FLDNAME = ZDFIES-FIELDNAME.&lt;/P&gt;&lt;P&gt;               APPEND FLDITAB.&lt;/P&gt;&lt;P&gt;          ENDLOOP.&lt;/P&gt;&lt;P&gt;        WHEN OTHERS.&lt;/P&gt;&lt;P&gt;             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;              with  SY-SUBRC.&lt;/P&gt;&lt;P&gt;      ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;***********************************&lt;/P&gt;&lt;P&gt;FORM SHOW123.&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                 = 'C:\USR03.XLS'&lt;/P&gt;&lt;P&gt;          DATA_SHEET_NAME           = 'USER LIST'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;         DATA_TAB                  =  ITABUSR03&lt;/P&gt;&lt;P&gt;         FIELDNAMES                =  FLDITAB&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; 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;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kunal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 05:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-reuse-alv-list-display/m-p/1347511#M174837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T05:42:07Z</dc:date>
    </item>
  </channel>
</rss>

