cancel
Showing results for 
Search instead for 
Did you mean: 

Download dynamic internal table to local desktop in abap webdynpro

sreekanth_n2
Active Participant
0 Kudos

Hi All,

  I have a dyamic structure and internal table.

  Field labels are in dynamic structure and data in the dynamic internal table.

  How to download this internal table as file(.txt/.xls./,pdf) to my local desktop.

  I want to mention path and the file should download in that path.

  In SDN, moslty i see the links related to upload of file.

Sree

Accepted Solutions (1)

Accepted Solutions (1)

sreekanth_n2
Active Participant
0 Kudos

Tried to ZIP, but data format issue.

hence loaded the key data into sap table, written pgm in sap gui to fetch records and used gui_download to download the records to local desktop.

Answers (1)

Answers (1)

sreekanth_n2
Active Participant
0 Kudos

Able to acheive with the following code . but only last file is downloaded.

      cl_fdt_xl_spreadsheet=>if_fdt_doc_spreadsheet~create_document(

            EXPORTING

              itab         = lt_result

              iv_call_type = 1

*              columns      = lt_column

            RECEIVING

              xdocument    = lv_content ).

      CALL METHOD cl_wd_runtime_services=>attach_file_to_response

        EXPORTING

          i_filename      = lv_filename

          i_content       = lv_content

          i_mime_type     = lv_ctype

*          i_in_new_window = abap_true "ABAP_FALSE

*         i_inplace       =     ABAP_FALSE .