Download to Excel In the Background

Hi,
Our SAP server is in Windows operating system. Is it possible to download data in Excel file in the background mode?
Thanks
Lokman

1) One way is, using GUI_DOWNLOAD from your program and haedcoding the path to which it should be downloaded.
2) Check the link below for downloading excel in background... A demo program is also available.
http://www.sap-img.com/abap/download-in-background-in-excel-format.htm
Cheers,
Thomas.
Please mark points if you got solution.

Similar Messages

  • Download  to multiple sheet excel in the background

    Hi,
    I am trying to download data into multiple excel sheets in the background. I was able to create comma delimited csv file in the server, which can be opened as excel file. This is good when it does not have more that one worksheets.
    I have three internal table and to send these internal tables in different worksheets in the same excel file.
    Is it possible to have multiple sheets excel file from the csv file?
    Thanks,
    Lokman

    Hi Lokman,
    <b>1</b>.
    Yes it is Possible.
    <b>2</b>.
    Am sending one example program .That is clear to understand .
    REPORT zvenkat_head MESSAGE-ID zvenkat .
    INCLUDE ole2incl. " Include for OLE object
    DATA: application TYPE ole2_object,
          workbook    TYPE ole2_object,
          sheet       TYPE ole2_object,
          cells       TYPE ole2_object,
          h_f         TYPE ole2_object.            " font
    *Structure for users deleted
    DATA:   BEGIN OF itab_yb001_udel OCCURS 0,
              bname     LIKE yb001-bname,
              name_text LIKE addr3_val-name_text,
            END OF itab_yb001_udel.
    DATA:   BEGIN OF itab_yb001_tadd OCCURS 0.
            INCLUDE STRUCTURE yb001.
    DATA:   name_text LIKE addr3_val-name_text,
            ttext LIKE tstct-ttext.
    DATA:   END OF itab_yb001_tadd.
    *Structure for Transactions deleted
    DATA:   BEGIN OF itab_yb001_tdel OCCURS 0.
            INCLUDE STRUCTURE yb001.
    DATA:   name_text LIKE addr3_val-name_text,
            ttext LIKE tstct-ttext.
    DATA:   END OF itab_yb001_tdel.
    DATA:   BEGIN OF itab_yb001_uadd OCCURS 0,
            bname LIKE yb001-bname,
            name_text LIKE addr3_val-name_text,
            END OF itab_yb001_uadd.
    PARAMETERS: p_fname LIKE rlgrap-filename. " File name to download
    PERFORM download_file.
    FORM - DOWNLOAD_FILE
    FORM download_file.
      DATA index TYPE i.
      CREATE OBJECT application 'excel.application'.
      SET PROPERTY OF application 'visible' = 0.
      CALL METHOD OF application 'Workbooks' = workbook.
      CALL METHOD OF workbook 'Add'.
      CALL METHOD OF application 'Worksheets' = sheet.
      CALL METHOD OF sheet 'Add'.
    Create 1 Excel sheet
      CALL METHOD OF application 'Worksheets' = sheet
        EXPORTING #1 = 1.
      SET PROPERTY OF sheet 'Name' = 'Transactions Added'.
      CALL METHOD OF sheet 'Activate'.
      PERFORM f_xl_theader.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text   = text-m03
        EXCEPTIONS
          OTHERS = 1.
      LOOP AT itab_yb001_tadd.
        index = sy-tabix + 1. " 1 - column name
        PERFORM fill_cell USING index 1 0 itab_yb001_tadd-bname.
        PERFORM fill_cell USING index 2 0 itab_yb001_tadd-tcode.
        PERFORM fill_cell USING index 3 0 itab_yb001_tadd-name_text.
        PERFORM fill_cell USING index 4 0 itab_yb001_tadd-ttext.
        PERFORM fill_cell USING index 5 0 itab_yb001_tadd-agr_name.
      ENDLOOP.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text   = text-m03
        EXCEPTIONS
          OTHERS = 1.
    Create 2 Excel sheet
      CALL METHOD OF application 'Worksheets' = sheet
        EXPORTING #1 = 2.
      SET PROPERTY OF sheet 'Name' = 'Transactions Deleted'.
      CALL METHOD OF sheet 'Activate'.
      PERFORM f_xl_theader.
      LOOP AT itab_yb001_tdel.
        index = sy-tabix + 1. " 1 - column name
        PERFORM fill_cell USING index 1 0 itab_yb001_tdel-bname.
        PERFORM fill_cell USING index 2 0 itab_yb001_tdel-tcode.
        PERFORM fill_cell USING index 3 0 itab_yb001_tdel-name_text.
        PERFORM fill_cell USING index 4 0 itab_yb001_tdel-ttext.
        PERFORM fill_cell USING index 5 0 itab_yb001_tdel-agr_name.
      ENDLOOP.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text   = text-m04
        EXCEPTIONS
          OTHERS = 1.
    Create 3 Excel Sheet
      CALL METHOD OF application 'Worksheets' = sheet
        EXPORTING #1 = 3.
      CALL METHOD OF sheet 'Activate'.
      SET PROPERTY OF sheet 'Name' = 'Users Added'.
      PERFORM f_xl_uheader.
      LOOP AT itab_yb001_uadd.
        index = sy-tabix + 1. " 1 - column name
        PERFORM fill_cell USING index 1 0 itab_yb001_uadd-bname.
        PERFORM fill_cell USING index 2 0 itab_yb001_uadd-name_text.
      ENDLOOP.
    Create 4 Excel sheet
      CALL METHOD OF application 'Worksheets' = sheet
        EXPORTING #1 = 4.
      SET PROPERTY OF sheet 'Name' = 'Users Deleted'.
      CALL METHOD OF sheet 'Activate'.
      PERFORM f_xl_uheader.
      LOOP AT itab_yb001_udel.
        index = sy-tabix + 1. " 1 - column name
        PERFORM fill_cell USING index 1 0 itab_yb001_udel-bname.
        PERFORM fill_cell USING index 2 0 itab_yb001_udel-name_text.
      ENDLOOP.
    Save excel speadsheet to particular filename
      CALL METHOD OF sheet 'SaveAs'
                      EXPORTING #1 = p_fname     "filename
                                #2 = 1.          "fileFormat
      PERFORM err_hdl.
    Closes excel window, data is lost if not saved
      SET PROPERTY OF application 'visible' = 0.
    Close the file
      CALL METHOD OF workbook 'CLOSE'.
    Quit the file
      CALL METHOD OF application 'QUIT'.
      FREE OBJECT application.
    ENDFORM.                    "DOWNLOAD_FILE
    *&      Form  F_XL_THEADER
          Header for XL sheet
    -->  p1        text
    <--  p2        text
    FORM f_xl_theader .
    output column headings to active Excel sheet
      PERFORM fill_cell USING 1 1 1 text-t01.
      PERFORM fill_cell USING 1 2 1 text-t02.
      PERFORM fill_cell USING 1 3 1 text-t03.
      PERFORM fill_cell USING 1 4 1 text-t04.
      PERFORM fill_cell USING 1 5 1 text-t05.
    ENDFORM.                    " F_XL_THEADER
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM fill_cell USING i j bold val.
      CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = i #2 = j.
      PERFORM err_hdl.
      SET PROPERTY OF cells 'Value' = val .
      PERFORM err_hdl.
      GET PROPERTY OF cells 'Font' = h_f.
      PERFORM err_hdl.
      SET PROPERTY OF h_f 'Bold' = bold .
      PERFORM err_hdl.
    ENDFORM.                    "FILL_CELL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM err_hdl.
      IF sy-subrc <> 0.
        WRITE: / 'Fehler bei OLE-Automation:'(010), sy-subrc.
        STOP.
      ENDIF.
    ENDFORM.                    " ERR_HDL
          Header for XL sheet
    -->  p1        text
    <--  p2        text
    FORM f_xl_uheader .
      PERFORM fill_cell USING 1 1 1 text-t01.
      PERFORM fill_cell USING 1 2 1 text-t03.
    ENDFORM.                    " F_XL_UHEADER
    Please try to understand first and replicate to ur requirement.
    Please let me know if u have any problem.
    <b>Thanks,
    Venkat.O</b>

  • Urget::How to download in excel format  in Background

    hi,
            i was using GUI_DOWNLOAD  in a program to download into excel format. but now the user wants to run this in background mode .But gui_download doesn't support the background .can u suggest me any other way to download in background mode into excel format.
    it's urgent .please help.
    Thanks in advance .

    Hi Rasmi,
    In background you can only download it to application server and not on your PC.
    If its ok then you can use OPEN DATASET....CLOSE DATASET to do that.
    Once its downloaded to Application server you can download that into your PC.
    Hope This helps you.
    Thanks,
    Arun

  • Download an excel file in background mode

    Hi All,
    I need to download a file from a ABAP  report to the local workstation in background mode. I tried GUI_DOWNLOAD but it is failing in the background.
    Is there any way to download the excel file in the background. I am thinking of generating the spool.
    Please let me know if anybody has worked on the same requirement. Any help would be highly appreciated.
    Thanks a lot.
    Regards,
    Priti

    You be able to use the function "WS_DONLOAD" ?
    parameters: p_fnam like  rlgrap-filename memory id fnam obligatory.
    data: begin of t_registro occurs 0,
            registro(1000),
          end of t_registro.
          describe table t_registro lines sy-tfill.
          if sy-tfill gt 0.
            l_tam = strlen( p_fnam ).
            call function 'WS_DOWNLOAD'
                 exporting
                      filename                = p_fnam
                 tables
                      data_tab                = t_registro
                 exceptions
                      file_open_error
                      file_write_error
                      invalid_filesize
                      invalid_type
                      no_batch
                      unknown_error
                      invalid_table_width
                      gui_refuse_filetransfer
                      customer_error.
            if sy-subrc <> 0.
              open dataset p_fnam for output in text mode.
              if sy-subrc = 0.
                loop at t_registro.
                  transfer t_registro to p_fnam.
                endloop.
                close dataset p_fnam.
                write:/ 'Se genero el archivo:', p_fnam(l_tam).
              else.
                write:/ 'No se pudo generar el archivo:', p_fnam(l_tam).
              endif.
              close dataset p_fnam.
            else.
              write:/ 'Se genero el archivo:', p_fnam(l_tam).
            endif.
       endif.
    I hope this works for you.
    See ya.
    Ar@

  • Downloading into excel file , the is alignment is out

    The  reports when downloading into excel file is not what we usually getting. The alignment is out.

    Hi Basavaraj,
    When you are creating dynamic internal table(itab1) and fields of internal table, at the same time in the same way  create one more internal table(itab2) resrict this up to 10 columns.
    now
    DATA : num type i,
           FNAME(255) TYPE C
               VALUE '/data/sapdata/filename'.
    CONSTANTS : C_COMMA TYPE C VALUE ','.
    DATA : BEGIN OF I_DISPLAY OCCURS 0,
            REC(400),
           END OF I_DISPLAY.
    loop at itab1
    num = num + 1.
      if num le 100.
       move-corresponding fields to itab2
      else.
        exit.
      endif.
    endloop.
      Give column headings
            itab2-col1 =  'name1'
            itab2-col2 =  'name2'
            itab2-col3 =  'name3'
            itab2-col4 =  'name4'
            itab2-col5 =  'name5'
            itab2-col6 =  'name6'
            itab2-col7 =  'name7'
            itab2-col8 =  'name8'
            itab2-col9 =  'name9'
            itab2-col10 =  'name10'
          INSERT itab2 INDEX 1.
          CLEAR itab2.
    loop itab2.
       CONCATENATE
            itab2-col1
            itab2-col2
            itab2-col3
            itab2-col4
            itab2-col5
            itab2-col6
            itab2-col7
            itab2-col8
            itab2-col9
            itab2-col10
               into I_DISPLAY-REC SEPARATED BY C_COMMA.
         APPEND I_DISPLAY.
         CLEAR I_DISPLAY.
      ENDLOOP.
    OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE.
          LOOP AT I_DISPLAY.
            TRANSFER I_DISPLAY TO  FNAME.
          ENDLOOP.
        CLOSE DATASET FNAME.
    endloop.

  • Downloading Document Files in the Background

    Hello,
    I have two questions regarding downloading document files to a Windows server in the background.
    <u>First Question:</u>
    My company is currently on SAP R/3 4.6B. We have several programs that use function module WS_DOWNLOAD to download documents to a Windows directory (C drive, network server, etc.). However, WS_DOWNLOAD will only work when run in the foreground, since there is no connection to the presentation server when run in the background. Our work around for this has been to create a UNIX file and then FTP it to the Windows server, which can all be done in the background. Is there another way to download directly from SAP to a Windows server in the background with 4.6B.
    <u>Second Question:</u>
    We have an upgrade to mySAP ERP 2004 scheduled in the near future. Is it possible to do what I've asked above in mySAP ERP 2004?
    Thanks,
    Jamey

    for your first question
    Well you can do it in two ways.
    1: instead of using FTP from unix, you can use it from within SAP using ftp function modules. for durther details and examples you can check development class SFTP in se80 for function modules and demo programs.
    The advantage of this technique is that if FTP fails for some reason, you abap code can generate a proper error message or log so that user can see that file is not transfered.
    2: you can run sap supplied program RFCEXEC.exe on your windows server thus making it as an RFC server, that create an RFC destination pointing to this server in SAP (Transaction code SM59) and use this destination to call RFC function modules to create a file on destination from an internal table. you can use the RFC function RFC_REMOTE_FILE
    example: your data is in table outtab
      CALL FUNCTION 'RFC_REMOTE_FILE'
         DESTINATION p_dest
         EXPORTING
             file = file
             write = write
         TABLES
             filedata = outtab
         EXCEPTIONS
           communication_failure = 1 MESSAGE msg_text
           system_failure        = 2 MESSAGE msg_text.
    cheers

  • Does the "auto-download" feature run in the background?

    I would like new episodes to download automatically in the middle of the night or early morning, without opening the app or refreshing anything. So then, on way to work, the new episodes are already downloaded first time I open up the iPad on train. I've heard about 3rd party apps that do allow for this. True? Thanks for the help!

    But did you test it so that it downloaded it automatically or did you force the download by clicking the button in the application?
    The 3G and Wifi switch so far as I'm aware only effects auto downloads, etc.

  • Why is the spreadsheet empty when users download to Excel from ALV grid?

    Users are seeing SAP GUI transaction results display in the ALV Grid when running an SAP Report; however, when they click the Download to Excel icon the spreadsheet is empty.  When they use List...Export...Spreadsheet, the spreadsheet is filled.
    This seems to only be happening with 'Z' transactions.  Standard delivered transactions are OK.
    Using SAP GUI for Windows and Excel 2003.

    Hi All,
    I also have same Problem I my case when i click on 'Microsoft Excel' it does nothing. It does not even open a sheet.
    Please suggest,
    regards,
    Vinit

  • Downloading podcasts in the background causes iTunes to become unresponsive

    This problem with iTunes downloading podcasts in the background is causing me fits in my well-behaved, rock-solid iMac environment.
    Inevitably, while iTunes is automatically downloading one of my subscribed podcasts, iTunes will become unresponsive and freeze. This requires me to Force Quit iTunes, causing file system errors that need to be repaired with Disk Utility. The file system errors usually consist of these:
    "Missing thread record"
    "Incorrect number of thread records"
    "Invalid volume file count"
    "Missing directory record ID"
    Luckily, Disk Utility can recover the damage without me losing any data. But it chaffs me to no end that I have to shut down my iMac, reboot with my SL DVD, dig up my wireless Mighty Mouse (since the SL DVD doesn't load drivers for my Magic Trackpad), repair my boot disk, reboot, then endure several minutes of "Checking the iTunes library" when I start up iTunes again. Not including the significant time it takes for me to re-establish my working environment.
    The reason why I know it's a podcast that's causing the problem is that as soon as iTunes starts up, the podcast resumes downloading. I've never had iTunes freeze on me while downloading a podcast while I had iTunes in focus. This problem only occurs when iTunes is downloading a podcast in the background. I've checked the log, and the only messages I'm getting is from Automator saying that some actions are not compatible with my current version of iTunes.
    This problem occurs with iTunes 10.0.1, but I've had it happen with iTunes 9.x . My iTunes library is on a Netgear ReadyNAS NV+, accessed by my iMac via 802.11n on my Airport Extreme.
    Is anyone else experiencing freezes or beachballs when downloading podcasts? I'm about ready to shut off auto-download and just do it manually (in fact, I'm surprised that I haven't done this already ).

    iTunes froze again while an podcast was being downloaded (in the Dock, the iTunes icon says "Force Quit"). I waited 10 minutes for iTunes to become responsive again, but it didn't. I tried Cmd-tab to the iTunes window, but it wouldn't come up. I was ready to Force Quit and repair my HD again, when I decided to try one more thing.
    I used Expose to show all the open windows, then picked the frozen iTunes window. Doing this showed the window (why Cmd-tab wouldn't, I don't know), where it listed the partially downloaded podcast in the activity bar. I then went to get my SL DVD. When I got back, iTunes was unfrozen and the podcast download had completed!
    I have no idea why the podcast wouldn't download while iTunes was hidden, and why Cmd-tab wouldn't restore the iTunes session to activity. But now I know that Expose can wake iTunes from the dead, preventing me from killing iTunes with the inevitable HD corruption.

  • Can you fix , the fact that If you leave the firefox update window open for a long period (say 20 minutes in the background), then close all other windowns, then choose to install, it uses this extra time to estimate the download?

    Can you fix , the fact that If you leave the firefox UPDATE window open for a long period (say 20 minutes in the background), then close all other windows, then choose to download update, it uses this extra time to estimate the download? (Mine said, 12 Hours to start with, but took under 2 minutes!)
    == This happened ==
    Not sure how often
    == When you install update to 3.6.4 (Possibly for every update?)

    The download should happen in the background (before you get an update window). I wonder why that didn't happen for you...\
    Did you manually check for updates?

  • Reg: ALV output download using excel option

    Hi Team,
    I  created  a report using ALV Function modules, I want to download in  Excel sheet the  output list. i am trying to download but i am not getting proper values. I am populating around 50 fileds.
    is there any settings for these download.
    <<removed by moderator>>
    Thanks & Regards,
    Mahendar patha.

    hi mahendra;
    use this step-by-step procedure it will help u a lot:
    Firstly export  the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Hope it will help you
    Regards
    Rahul sharma
    Edited by: RAHUL SHARMA on Nov 4, 2008 1:22 PM

  • Download to Excel Function in ALV

    Hai Friends,
    I am using the following methods to download the report to an Excel Sheet from ALV.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
    CALL FUNCTION 'GUI_DOWNLOAD'
    The report is downloaded to Excel but the Column names are not displayed. It is displaying as F1, F2, F3..................
    How can i solve this?.

    Hi,
        Please check with the sample code below:
    *"Excel sheet header
        CLEAR e_excel.
        MOVE text-001 TO e_excel-var1.
        MOVE text-002 TO e_excel-var2.
        APPEND e_excel TO t_excel.
        CLEAR e_excel.
        UNASSIGN <fs_t_final>.
        REFRESH t_excel.
        LOOP AT t_final
        ASSIGNING <fs_t_final>.
          CHECK <fs_t_final> IS ASSIGNED.
    *"Data continued after the header part
            MOVE <fs_t_final>-var1 TO e_excel-var1.
            MOVE <fs_t_final>-var2 TO e_excel-var2.
            APPEND e_excel TO t_excel.
            CLEAR e_excel.
    data: w_savetitle TYPE string,
            w_filname  TYPE string,
            w_filename TYPE string,
            w_path      TYPE string,
            w_fpath      TYPE string.
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
          EXPORTING
            window_title         = w_savetitle
          CHANGING
            filename             = w_filname
            path                 = w_path
            fullpath             = w_fpath
          EXCEPTIONS
            cntl_error           = 1
            error_no_gui         = 2
            not_supported_by_gui = 3
            OTHERS               = 4.
    CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename                = w_filename
            filetype                = ASC
            write_field_separator   =
            codepage                =
          TABLES
            data_tab                = t_excel
          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.

  • Download to Excel not working in Transaction iview in Quality

    Dear All,
    I have a transaction iview in EP Quality Server which is transported from the development Server.This iview represents a transaction which displays some data (report output) and has an button for download to excel. The problem is that the ALV download functionality is working fine in the EP development Server's iview but I am not able to download from EP Quality though the output of the report is coming fine.
    Awaiting for the reply.
    Regards,
    Samir

    Hi,
    Try it once in laptop instead of desktop.
    May be the screen resolution or some thing is causing this,because I have encountered the issue previously.
    Create new iview in quality and try.Do you activate the transaction in SICF if it is custom one.
    Thanks and Regards,
    gopal.sattiraju

  • ALV / Download to Excel - columns transposed

    A developer on my team has this problem:
    We have a ALV report that gives the user the option to download to excel.
    The report has columns.
    A,B,C,D (for example)
    but when the user exports to excel ("List > Export > Spreadsheet > Table")
    they get
    A, <b>C, B</b>, D
    Dose anyone know why this happens? We have checked various sites and found OSS note 358644.
    Are we on the right track? Or is there an easy answer to this.
    Thanks in advance.

    Hi Kyle,
      I too faced the same problem lon back. But what we
      found is for currency, date and amount fields it is
      moving to last.
      You also checl the standard program BCALV_GRID_01.
      If you download you can see the same thing happens
      here also.
      Check in your case whether B is date, amout or numeric field.
    Thanks & Regards,
    Siri.
    Kindly award points if the answer is useful.

  • Hi friends, Problems with Special Characters in Table download to Excel.

    Hi friends,
    I am using Binary Cache method to download to excel. The problem is that there are certain fields in the back end R/3  that has special characters in it eg : & * £ # etc.
    As a result, the download is not working for these rows. Please can any of you tell me how to get rid of this. As an example let's say I wan to replace the "&" with "and".
    Please help.
    Thank You.
    Avik

    hi,
    Hope you find tgis of some help !!
    public void ReplaceMethod( )
        //@@begin ReplaceMethod()
        // get the string value of the cell (for you from the table cell, for eg, Pinki & Rakesh)
        test = wdContext.currentTestStringConversionElement().getInput();
        // calculate the total length of the String
        n=test.length ();
        if(n!=0)
                for(i=1;i<=n;i++)
    // catching each character from the String
                            c = test.charAt (i-1);
            // checking if any character within the String (eg, Pinki & Rakesh)  is “&”            
                               if (c=='&')
                                                                wdContext.currentTestStringConversionElement().setOutput(Character.toString(c));
                                                                no=i;
                                                                break;
                String val = Integer.toString(no);
                               //wdContext.currentTestStringConversionElement().setNo(val);
                // breaking the String and adding “ and” in place of “&”            
                            sub1=   test.substring(0,i-1);
                            sub2= "  and  ";
                            sub3= test.substring(i,n);
                      //Concatenating the String   
                            test1 = sub1sub2sub3;
                      //Printing the String  
                            wdContext.currentTestStringConversionElement().setOutput(test1);

Maybe you are looking for

  • Office Word 2008 crashes when trying to open a local stored document ONLY if network connection is down

    Sorry to bother you all but I have a situation I can't find a solution for: on a MBP 2009, running Mac OS X 10.6.8 and MS Office 2008 (up to date), if I open a local stored document AND the unit is connected to the network everything works fine. As s

  • Moving some rolls to an external drive to save disk space

    I use my own folder structure with iPhoto 6. Each roll is in one folder on my powerbook hard-drive. As I am running out of space I would like to move the oldest rolls/folders to an external drive without losing my edits. Is there any utility that wil

  • How can I get a full print screen of a website

    Hi, Is it possible to make a full printscreen of a webpage and insert this screenshot in Photoshop? I want to make a print screen of http://www.witshirtonline.nl and import the file into Photoshop so I can make some adjustments. Is this possible and

  • Command line arguments to Captive Runtime Air App

    I am having problems passing command line arguments to my Captive Runtime Air App on Mac OS X.  Argument handling occurs perfectly when running in ADL, via the InvokeEvent.INVOKE event.  However, when running the native executable, it seems that no c

  • Using external mouse with Macbook Pro

    Hi, I'm using an external Dell USB keyboard and mouse with my Macbook Pro. They work ok, but there seems to be a bit of 'drag' when I use the mouse. It's difficult to describe, but when I move the mouse slowly the pointer seems to drag, or slip...it'