Execute in background but download the data into excel file

I would like to know if it is possible to exceute the report in background but generate the output in excel file instead of to spool request.

Hi
      It is possible.You can use Open_Dataset to do this.Also you can use
"Set_Function_Code" also to do this. I think to download to excel the function code is "%EXCEL". Try this..
Hope this willl solve your query.
Reward All Helpfull Answers.......

Similar Messages

  • Download the data into excel sheet

    hello experts,
    I am using the GUI_DOWNLOAD fm to download the data in to excell sheet on to the desktop but here i am getting some problem
    For some of the fields i put constant values like '004' or '001' when it is downloaded the data into to .xls its removing the leading zeros.. and just downloading the values as 4 or 1
    can anyone guide me how to hold those leading zeros
    its bit urgent plz

    These are XL Issue ,you can use diffrenet logic
    Check the below logic :
    REPORT ZTEST3 line-size 400.
    <b>DATA : V_CHAR(1) TYPE C VALUE ''''.</b>
    data : v_field(12) type c.
    data : begin of itab occurs 0,
           fld1(12) type c,
           end of itab.
    start-of-selection.
    v_field = '0000012345'.
    CONCATENATE V_CHAR  V_FIELD  INTO V_FIELD.
    itab-fld1 = v_field.
    append itab.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE                  = ' '
      CODEPAGE                      = ' '
        FILENAME                      =
        'C:\Documents and Settings\smaramreddy\Desktop\fff.xls'
       FILETYPE                      = 'ASC'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      TABLES
        DATA_TAB                      = itab
      FIELDNAMES                    =
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_WRITE_ERROR              = 2
       INVALID_FILESIZE              = 3
       INVALID_TYPE                  = 4
       NO_BATCH                      = 5
       UNKNOWN_ERROR                 = 6
       INVALID_TABLE_WIDTH           = 7
       GUI_REFUSE_FILETRANSFER       = 8
       CUSTOMER_ERROR                = 9
       OTHERS                        = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    I have used one field here ,i am not sure for many fields in internal table.
    Thanks
    Seshu

  • Downloading the data into excel sheet , how can i maintain page numbers

    I need some information. In output screen pagenumber is displayed.
    when i am downloading the data from se38 into excel sheet.
    How can i write the code to display the page number in excel sheet . waiting for your response

    Hi
    Please see below code for ur requirement.
    DATA: BEGIN OF li_field OCCURS 0,
              field(16) TYPE c,
           END OF li_field.
      CLEAR li_field[].
      REFRESH li_field.
      li_field-field = text-t01.
      APPEND li_field.
      CLEAR  li_field.
      li_field-field = text-006.
      APPEND li_field.
      CLEAR  li_field.
      li_field-field = text-t04.
      APPEND li_field.
      CLEAR  li_field.
      li_field-field = text-t05.
      APPEND li_field.
      CLEAR  li_field.
      CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          file_name                 = file_path
        TABLES
          data_tab                  = data_table
          fieldnames                = li_field
        EXCEPTIONS
          file_not_exist            = 1
          filename_expected         = 2
          communication_error       = 3
          ole_object_method_error   = 4
          ole_object_property_error = 5
          invalid_pivot_fields      = 6
          download_problem          = 7
          OTHERS                    = 8.
    please reward points if helpful

  • Material num truncated while downloading the data into excel in ALV GRID

    Hi,
    I developed a report with ALV GRID display. The reoport is having Material number as one of the column. The report shows the total 10 digit material number. When i tried to downlaod the report into an excel sheet or a TXT file, material number in the text file shows only the last two digits.
    Please let me know if you have any solution for this.
    URGENT

    Hi,
    I developed a report with ALV GRID display. The reoport is having Material number as one of the column. The report shows the total 10 digit material number. When i tried to downlaod the report into an excel sheet or a TXT file, material number in the text file shows only the last two digits.
    Please let me know if you have any solution for this.
    URGENT

  • Background processing and downloading the data into File

    Hi ,
    Can you please let me know how to find out the Programname whic is downloadng the data into Excel sheet from application server...
    thanks

    Hi Ramreddy,
    You can use: CG3Y : Transactions for uploading from application server to
                                     Presentation server
                          CG3Z : Transactions for uploading from Presentation server- to
                                     Application server
    In both the cases u can put the path to spreadsheet to download to excel...
    Reward if found useful....
    Message was edited by:
            Susanth Swain

  • Downloading table data into Excel sheet - Webdynpro Java

    Hi All,
    We have developed a custom webdynpro application that executes an RFC and displays data in Table UI element. We have provided a button to download the data in excel sheet. When data is huge like, total number of rows filled up in the table are around 11,000 & columns are 32, and when user tries to download whole 11000 rows in excel sheet, the timeout occurs after 20 mins due to huge data. But when I apply filtering on the same table data and then try to download some 700 rows out of 11000 into excel, it took me around 3.36 mins.
    If anyone encountered such scenario in past, please guide in this regard to speed-up the download to excel functionality or suggest any other alternative.
    We are using 7.3 Portal and tableUtilities java class for export to excel functionality.
    Thanks,
    Amol.

    hi monica ,
    sorry im not able to understand properly ,
    The server don't restarts automatically when we uploading a huge data, onlly we open the file instead of save the file.
    If we save the file the problem is that when we try to open this, the process can take hours and sometimes excel is blocked
    you mean that after saving the file to your desktop , having huge data you are not able to open the file i.e the excel file. your file gets blocked or consumes more time to open the file ,
    or else when you are prompted for saving or opening , on click of opening  you are facing the problem ?
    let me be clear with your part , here your application deals with uploading the data from webdynpro table to excel sheet and allowing the end user to save or open the file  right .
    Regards
    Govardan Raj S

  • Some problem of download BSP data into excel using  cl_bsp_utility= download

    Hello Experts,
    I have read the blog of thomas.jung for download bsp data into excel, and it's working correct, and after some try and error, now I can download the excel with multi sheets.It's all cool except one thing.....when I add a button on the standard screen of the supplier qualification of the slc to download the excel file, after the popinp up screen, the standard screen can't do any operation at all......there are no any error message and the downloaded file is all correct .
    Does any one know what can I do?

    any ideas?
    By the way, after some research, maybe the issue was caused by the setup of the button, but I don't know how to fix it...0rz
    the standard code for buttton is
    lv_id = mv_id && '>display'.
    lo_edit_display_button = cl_thtmlb_button=>factory( id       = lv_id
                                                       text     = lv_button_text
                                                   tooltip  = lv_button_text
                                                   enabled  = 'TRUE'
                                                  onclick  = lv_button_action ).
    WHILE io_page_context->element_process( element = lo_edit_display_button ) = if_bsp_element=>co_element_continue.
    ENDWHILE.
    so I copy it and modify like this:
    lv_id = mv_id && '>download'.
        lo_download_excel_button = cl_thtmlb_button=>factory( id       = lv_id
                                                            text     = w_text
                                                        tooltip  = w_text
                                                        enabled  = 'TRUE'
        onclick  = /srmsm/if_ql_ext_ui_c=>ZC_ACTION_DOWNLOAD_EXCEL
    WHILE io_page_context->element_process( element = lo_download_excel_button ) = if_bsp_element=>co_element_continue.
    ENDWHILE.

  • Downloading the data in excel format

    Hi All,
       I am downloading the data in excel format using FM CONVERT_SAP_TO_XLS_FORMAT and able to open the file in my machine since my machine is having EXCEL 2003 version. In some other machines i tried to download and open,  but after downloading the data in some machines we couldnt open the file since those machines are having the excel2007 versions. but my requirement is i need to open in 2007 version also, please tell me solution.
    With Regards,
    Prasad.

    Hi Lalit,
    Thank you for your information,
    but this function modules EXCEL_OLE_STANDARD_DAT, RH_START_EXCEL_WITH_DATA   cant help to solve my issue,  my requirement is i need to download sap data in excelformat, problem comes here, if i download internal table, in that any text that starts with double cotes and ending with not double cotes, the data is not downloading properly and all the data cramped into one cell. To solve this issue i have used functinal module SAP_CONVERT_TO_XLS_FORMAT and i am able to download without any problem,  but in clients machines they are able to download and they are not able to open as they are having EXCEL 2007 in their machines.
    if is there any solution, please update me.
    Thanks in Advance
    Prasad
    Edited by: bs prasad on Mar 28, 2009 8:03 AM
    Edited by: bs prasad on Mar 28, 2009 8:05 AM

  • Download BSP data into Excel

    Hello all,
    I want create a BSP page, with 2 radio buttons,
    If 1st selected I want read 2 tables and display data other BSP page.
    If 2nd one selected I want download 2 tables data into excel file.
    Any one can help how to download data into excel file and display data into other bsp page.
    Thanks,
    Regards,
    Venkat

    For downloading to a spread sheet:
    Convert your fetched data to a string and convert to XSTRING format and finally download to a spread sheet.
    Sample: I selected data from vbak say vbeln and kunnr in an internal table.
    data : v_string type string, v_xstring type xstring.
    <header portion - to have the heading in the spread sheet>
    concatenate 'Order Number' 'Customer'
       cl_abap_char_utilities=>cr_lf into v_string
       separated by cl_abap_char_utilities=>horizontal_tab.
    <Line item entries from my internal table say i_vbak>
    loop at i_vbak into wa_vbak.
      concatenate v_string wa_vbak-vbeln wa_vbak-kunnr
       cl_abap_char_utilities=>cr_lf into v_string
       separated by cl_abap_char_utilities=>horizontal_tab.
    endloop.
    All the data is now in string format. Calling the FM to convert to XSTRING
      call function 'SCMS_STRING_TO_XSTRING'
        exporting
          text     = v_string
          mimetype = 'APPLICATION/MSEXCEL; charset=utf-16le' (probably create this in a variable and call here)
        importing
          buffer   = v_xstring.
    concatenate cl_abap_char_utilities=>byte_order_mark_little v_xstring into v_xstring in byte mode.
    Now we have it in XSTRING format - this can be downloaded to a spread sheet.
    v_appl = 'APPLICATION/MSEXCEL; charset=utf-16le'.
    runtime->server->response->set_header_field( name = 'content-type' value = v_appl ).
    Eliminating the cache problems when loading Excel Format
    runtime->server->response->delete_header_field( name = if_http_header_fields=>cache_control ).
    runtime->server->response->delete_header_field( name = if_http_header_fields=>expires ).
    runtime->server->response->delete_header_field( name = if_http_header_fields=>pragma ).
    Start excel in a separate window
    runtime->server->response->set_header_field( name = 'content-disposition' value = 'attachment; filename=Order_list.xls' ).
    Displaying the data in excel.
    v_len = xstrlen( v_xstring ).
    runtime->server->response->set_data( data = v_xstring length = v_len ).
    navigation->response_complete( ).
    All the above code can be written in onInputprocessing event (probably your loop/selection can be in a method of your appl class).
    I believe you are triggering the event based on a click (say radio button or a button after selecting the radiobutton).
    In the other screen you can use tableview to display your data - probably two sub screens(page fragment) to display each table.
    Regds,
    Krish

  • Download the output into Excel...(List- export- spreadsheet)

    Dear friends,
    I want to download the output into Excel...
    I am using all SAP standards and using the ALV Block list
    Ex: List->export->local file.. is anable from here i can download to excell .....but the same there is anothere option : List->export->spreadsheet...( this one inactive.)
    I want to activate the List->export->spreadsheet option.
    how to do this???
    Thanks,
    Sridhar.

    Hi
       Use the Function Module:
    EXCEL_OLE_STANDARD_DAT
    For your purpose.
    But by default you can get the option to download into several formats including your desired one.
    Regards,
    Sreeram

  • How to extract the data into Excel / PDF from SAP

    Hi,
    We have spool number of a report output.
    We want to extract the data into Excel / PDF from SAP directly...
    Plz guide...

    Hi ,
    Please check this [Thread|HOW TO DOWNLOAD SAP OUTPUT TO EXCEL FILE;. Hope your problem will be solved.
    You can check [this also.|http://wiki.sdn.sap.com/wiki/display/sandbox/ToConvertSpoolDataintoPDFandExcelFormatandSenditinto+Mail]
    Thanks,
    Abhijit

  • Update the data into excel sheet .

    Hi Friends..
    If I run the program it want to store the data into  excel sheet(first few lines) , if i run the program again I want to store the next result in the same excel sheet after that data(first time data).
    is it any solution available to store the data in the same excel sheet again again in different row of that excel sheet.
    Thanks
    Gowrishankar

    Hi,
    I am not sure which FM u r using for downloading. The FM GUI_DOWNLOAD will work for your requirement. Set the parameter Append to value 'A'. Every time it will append the data to ur file.
    Check below code.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                  =
        filename                      = l_file
      FILETYPE                      = 'ASC'
       APPEND                        = 'A'
      WRITE_FIELD_SEPARATOR         = ' '
      HEADER                        = '00'
      TRUNC_TRAILING_BLANKS         = ' '
      WRITE_LF                      = 'X'
      COL_SELECT                    = ' '
      COL_SELECT_MASK               = ' '
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = i_tab
    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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks,
    Vinod.

  • Problem in Downloading the data in Excel..

    Hi all,
    In my report program iam getting output. In the output iam having one push button to download the data in excel-sheet.so here when i was download the data in excel sheet in one perticular column(assume D column) iam getting invoice text.
    ex: Invoice text: This is good.
    But that text is coming properly for some orders and for some orders it was not coming properly.(This is g).
    Can any body Please tell me the way..
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 21, 2008 1:05 PM

    Hi ,
    Here i told know for some orders iam getting the invoice text:This is g.
    when i click on this cell lots more data records all within that one cell. This is for only some orders.
    Is there any way to resolve this problem.

  • Downloading the data to XML file (Event driven )

    Hi ,
    Whenever there is any change or updation in HR master data i need to download the data to XML file. I have written a program to download the data to XML file but i need to trigger this program only when there is a change in HR master data.
    Could somebody tell me how to go about this. Reward points are assured.
    Best Regards
    Bhagat.

    Hi Bhagat,
    isn't it possible to use change pointers for this?
    Then in partner profile use an XML file port and it should be done!
    Probably this blog could help you:
    <a href="/people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm">Collecting IDocs without using BPM</a>, have a look at the part where it explains how to write Idoc as XML.
    Hope it helps,
    Kind Regards,
    Sergio

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

Maybe you are looking for

  • Can I save my files to a flash drive?

    How can I save my files to a thumb drive?

  • Error occurred at recursive SQL level %s

    Hi masters, I am using Oracle Client 8.1.6 and Oracle Server 8.1.7 on WINNT Workstation 4.0 SP6a. My application uses Microsoft ODBC Driver for Oracle Ver 3.520.5303.2 to connect to the Database. In a multi user scenario of about 7-8 users, I keep ge

  • Flash CS3 Strange IDE Problem

    Hi -- I am having a totally bizarre issue with the Flash CS3 IDE in that my "Output" window is always blank. This just started happening to me today. I have tried creating a new Flash movie and putting in a single line of Actionscript: trace("Hi") Wh

  • Duplicate invoice for third-party IR order

    The order items are 3rd party, IR, nonstock materials. The first invoice was created overnight on 04/28/2007 and that's before the invoice from the vendor was received (05/07/2007). The receive of the vendor's invoice triggered the second invoice on

  • Can i retrieve all my iPhone pictures?

    Hello, I recently broke my iPhone 4s, however before it broke I backed it up to my laptop (windows7) and to iCloud.... My phone would not even turn on so I could not access anything on it, I now have a galaxy s4, and i really want my photos off my iP