<?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: data download. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710572#M1453712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can do it without setting PF-STATUS also..............after display of your output,you can save the output from LIST-&amp;gt;SAVE/SEND-&amp;gt;FILE....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If ALV report then you can save it from LIST-&amp;gt;Export-&amp;gt;Local File.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Mar 2010 05:17:24 GMT</pubDate>
    <dc:creator>sarbajitm</dc:creator>
    <dc:date>2010-03-10T05:17:24Z</dc:date>
    <item>
      <title>data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710565#M1453705</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;i want to display through a report.in the output i want to keep one push button &lt;/P&gt;&lt;P&gt;if i select that pushbutton,the data need to download into the text file format.&lt;/P&gt;&lt;P&gt;please help me how to do this.&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;swami.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 03:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710565#M1453705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T03:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710566#M1453706</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;Create on PF-Status with one button. Set this PF-Status in your report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Behind this button, code the functionality to download the internal table using various methods/FM's given by SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710566#M1453706</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2010-03-10T04:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710567#M1453707</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;for this you have to create the PF-STATUS in which you define all you custom button functionality and on the click of the custom which you define say DOWNLOAD, write code to download the data need to download into the text file format.&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;Regards&lt;/P&gt;&lt;P&gt;RItesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:45:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710567#M1453707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T04:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710568#M1453708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WHEN 'DOWNLOAD'.&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                        = 'C:\FILE1.TXT'&lt;/P&gt;&lt;P&gt;   FILETYPE                        = 'ASC'&lt;/P&gt;&lt;P&gt;   APPEND                          = 'X'&lt;/P&gt;&lt;P&gt;   WRITE_FIELD_SEPARATOR           = ';'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = ITAB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:50:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710568#M1453708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T04:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710569#M1453709</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;After including your button in the pf status of your program,&lt;/P&gt;&lt;P&gt;in the user command event of your report you can check the&lt;/P&gt;&lt;P&gt;function code of that button included and call function module:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GUI_DOWNLOAD&lt;/STRONG&gt; to download text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&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;Mansi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710569#M1453709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T04:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710570#M1453710</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 declare radio buttons in the selection screen like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen : begin of block b2 with frame title text-to2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : p_r1 radiobutton group g1,&lt;/P&gt;&lt;P&gt;p_r2 radiobutton group g1,&lt;/P&gt;&lt;P&gt;p_r3 radiobutton group g1,&lt;/P&gt;&lt;P&gt;p_path type rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen: end of block b2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;per example if customer selects p_r1 radio button and execute the report then u need to write code for alv display.&lt;/P&gt;&lt;P&gt;if customer selects p_r2 radio button and execute the report then u need to write code for grid display.&lt;/P&gt;&lt;P&gt;if customer selects p_r3 radio button and execute the report then u need to write code for normal display.&lt;/P&gt;&lt;P&gt;if customer gives p_path and execute the report then u need to write code for downloading the data created to specific location in the format like .txt, .xls etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful. please get back to me if you need any assistance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lokeswari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710570#M1453710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T04:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710571#M1453711</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 are using ALV for output display then do the below things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 Create a new PF status ---&amp;gt; SET PF-STATUS '' STATUSNAME" (Name Mention here)&lt;/P&gt;&lt;P&gt;2. In the REUSE_ALV FM in the Exporting Parameters STATUS = '' Mention Your Status".&lt;/P&gt;&lt;P&gt;3. When the output is displayed check your button will appear.&lt;/P&gt;&lt;P&gt;4. When you click the button using the AT USER-COMMAND event build your logic.&lt;/P&gt;&lt;P&gt;5 . For download use the below FM&lt;/P&gt;&lt;P&gt;           CALL Function gui_download&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            filename = gd_file&lt;/P&gt;&lt;P&gt;            filetype = 'DAT'&lt;/P&gt;&lt;P&gt;          CHANGING&lt;/P&gt;&lt;P&gt;            data_tab = ITAB&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            OTHERS   = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using normal list display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the evenet AT USER-COMMADN&lt;/P&gt;&lt;P&gt;Call the FM to download.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 04:57:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710571#M1453711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T04:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710572#M1453712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can do it without setting PF-STATUS also..............after display of your output,you can save the output from LIST-&amp;gt;SAVE/SEND-&amp;gt;FILE....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If ALV report then you can save it from LIST-&amp;gt;Export-&amp;gt;Local File.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 05:17:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710572#M1453712</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2010-03-10T05:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710573#M1453713</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;In program you can do like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;top-of-page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    format color 6.&lt;/P&gt;&lt;P&gt;    write:  '  &amp;gt;&amp;gt;Click here to Download... &amp;lt;&amp;lt;' hotspot on.&lt;/P&gt;&lt;P&gt;    format color off.&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;at line-selection.&lt;/P&gt;&lt;P&gt;data : fid(20) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get cursor field fid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if fid = ' '.&lt;/P&gt;&lt;P&gt;          perform generate_l_file_xl.&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;3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form generate_l_file_xl .&lt;/P&gt;&lt;P&gt;      call function 'GUI_FILE_SAVE_DIALOG'&lt;/P&gt;&lt;P&gt;        exporting&lt;/P&gt;&lt;P&gt;          default_extension = 'txt'&lt;/P&gt;&lt;P&gt;        importing&lt;/P&gt;&lt;P&gt;          filename          = filename&lt;/P&gt;&lt;P&gt;          path              = path&lt;/P&gt;&lt;P&gt;          fullpath          = fullpath&lt;/P&gt;&lt;P&gt;          user_action       = user_action.&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                        = filename&lt;/P&gt;&lt;P&gt;      filetype                        = 'ASC'&lt;/P&gt;&lt;P&gt;     write_field_separator           = 'X'&lt;/P&gt;&lt;P&gt;      trunc_trailing_blanks           = 'X'&lt;/P&gt;&lt;P&gt;     trunc_trailing_blanks_eol       = 'X'&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      data_tab                        =  ITAB&lt;/P&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;P&gt;     message id sy-msgid&lt;/P&gt;&lt;P&gt;        type sy-msgty&lt;/P&gt;&lt;P&gt;      number sy-msgno&lt;/P&gt;&lt;P&gt;        with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    message s071(dmee) with filename.&lt;/P&gt;&lt;P&gt;  endif.&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;Nehruu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 06:44:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710573#M1453713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T06:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710574#M1453714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a FAQ. Please SEARCH in SCN before posting&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 07:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710574#M1453714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T07:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: data download.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710575#M1453715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swami&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code for download data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use SET-PF STATUS  to create pushbutton, and assign this code to pushbutton function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: P_FILE TYPE  RLGRAP-FILENAME."file upload path
DATA: IT_EXCEL TYPE TRUXS_T_TEXT_DATA. "for move data to in_raw to main internal table
DATA : G_FILENAME TYPE STRING.


CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME  = SYST-CPROG
      DYNPRO_NUMBER = SYST-DYNNR
    IMPORTING
      FILE_NAME     = P_FILE.


CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                =  P_FILE " EXCEL FILE PATH
        FILETYPE                = 'ASC'
        WRITE_FIELD_SEPARATOR   = 'X'
        APPEND                  = 'X'
      TABLES
        DATA_TAB                = IT_DATA[]
      EXCEPTIONS
        FILE_WRITE_ERROR        = 1
        NO_BATCH                = 2
        GUI_REFUSE_FILETRANSFER = 3
        INVALID_TYPE            = 4
        NO_AUTHORITY            = 5
        UNKNOWN_ERROR           = 6
        HEADER_NOT_ALLOWED      = 7
        SEPARATOR_NOT_ALLOWED   = 8
        FILESIZE_NOT_ALLOWED    = 9
        HEADER_TOO_LONG         = 10
        DP_ERROR_CREATE         = 11
        DP_ERROR_SEND           = 12
        DP_ERROR_WRITE          = 13
        UNKNOWN_DP_ERROR        = 14
        ACCESS_DENIED           = 15
        DP_OUT_OF_MEMORY        = 16
        DISK_FULL               = 17
        DP_TIMEOUT              = 18
        FILE_NOT_FOUND          = 19
        DATAPROVIDER_EXCEPTION  = 20
        CONTROL_FLUSH_ERROR     = 21
        OTHERS                  = 22.
    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      MESSAGE 'A file could not be written' TYPE 'I'.
    ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will work.&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;Abhilash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 12:44:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-download/m-p/6710575#M1453715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T12:44:54Z</dc:date>
    </item>
  </channel>
</rss>

