Alv report download

hai to all,
I am trying to download the alv report to excel file by using the push button which is availabe in APPLICATION TOOL BAR.
But i not able to perform the same , i am getting empty excel file. What will be the problem, please tell me where iam missing.
regards
vijay.j

hi ,
   do this way..
  go to system->List->save->local file  here select SPread sheet and give file name..
Regards
Ashok P

Similar Messages

  • Reg: ALV report download to excel currency columns

    Hi All,
    While downloading the alv report to excel, currency fields with negative sign(less than 0) is downloading without negative sign.
    And field catalog wad declared as 'CURR' field for that particular column, if I declared as 'CHAR', i am getting shortdump.
    Can any one tell me how to get the negative sign.
    Thanks in advance.

    Hi,
    Do you use ALV to excel standard functionality or your own code to excel?
    Please provide more information.
    Thanks,

  • Alv Report downloading problem

    Dear Experts,
                         I'm using one pushbutton for downloading the alv report,  into desktop
    1).  but in that file i need header information details also,
    2).  then my report contains 26 field but it is downloading upto some fields only,
    3).  then when my report contains null values for some columns that columns are not displaying in that file.
    share some sample codes,
    Thanks and Regards,
    Thirukumaran. R

    Hi,
    1. For header fields, you need to enable one of the field, so that it will recognige the first row as header.
    2. You should not consider only the field displayed at output, you should take all the values available in the internal table.
    3. First take the record type as STRING. Now CONCATENATE all the fields available in the internal table to this RECORD and append it to some internal table. Now pass this internal table to the GUI_DOWNLOAD function module.
    May be you can refer to the below code.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                  = p_file
          filetype                  = 'ASC'
          append                    = ' '
          write_field_separator     = ' '
          write_lf                  = 'X'
          confirm_overwrite         = 'X'
          ignore_cerr               = 'X'
          replacement               = '#'
          trunc_trailing_blanks_eol = 'X'
          write_lf_after_last_line  = 'X'
          show_transfer_status      = 'X'
        TABLES
          data_tab                  = lt_output_file
        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.
    Note: May be you need to modify few parameters.....
    Regards,
    Santhosh.

  • Alv report downloading

    Dear Experts,
                         I'm using one push button in alv report, for downloading., the report, when i click on that push button a popup should appear for saving that file.
    Thanks and Regards,
    Thirukumaran. R

    CASE lv_ucomm.
    WHEN '&DLOAD'. "Double Click line Item
      CALL METHOD cl_gui_frontend_services=>directory_browse
       EXPORTING
         window_title         = 'Select path for saving excel file'
         initial_folder       = 'c:\'
       CHANGING
         selected_folder      = filename.
    concatenate filename '\NEFT_Report.txt' INTO filename.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        filename                        = filename"'d:\test2.xls'"
       FILETYPE                        = 'DAT'
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
         tables
        data_tab                        = it_final_1.

  • Export option in ALV report downloades first two columns blank

    Hi ,
    Before posting this query I searched the solution in SDN but I did't find the solution.
    My problem is  After displaying report in ALV format ,if I press Export --> Local file --->spreadsheet ;  file will downloaded to excel sheet but first two columns(only heading no data ) will be blank  and next two columns with proper data.
    I checked field catalog defination it seems to be ok,  any other mistake ?
    Please suggest.
    Narayan

    Hi
    It's the option you have in the path System->List->Save->Local file
    I means it's the standard option to export an abap list into a local file, so you should try this path too and check if the resul it's the same
    I think you should choose  Export --->spreadsheet: here before saving the file an excel document will be open
    Max

  • ALV report Download to excel from portal

    Hi,
    We have a standard SAP ALV reprot (CATS_DA) which we have brouht onto the portal. We are not abel to download this report in excel foramt. This is not giving any errors. The option is just not working at all. HAs anybody come across thsi issue?
    regards
    Raj

    Hi Raj,
    are you using DOWNLOAD function?
    I am also having the same problem. It is working fine in LAPTOP and not working in Desktop.
    There may be some system settings or javascript issues.
    I will try that in desktop.
    Thanks and regards,
    gopal

  • Doubt on ALV report download to EXCEL

    Hi All,
    i have written a report with ALV_GRID FM, by default we get the option to download the output to excel. But when we click on the download to excel, it displays the output
    in the frist page, but it also opens so many pages like
    format, header, pivot,sub1,sub1....etc.
    Pls. check the SAP standard report BCALV_TEST_FULLSCREEN, does the same thing when we do download to excel.
    How can i avoid opening so many pages in excel?
    Thanks for the help.
    Sekar

    Hi ,
    prabhu here , i think check the FM wheather u r passing all these to FM. for Excel keep export.param: --> i_save only and check.
    regards
    prabhu

  • Avoid splitting of columns ALV report while download output to Excel sheet

    Hi friends,
                  I have 170 columns in my ALV report
    while downloading the report to Excel sheet
    the column descriptions and values are splitting in two lines.
    How can i avoid the problem.
    before calling REUSE_ALV_GRID_DISPLAY function module in my code
    for the Layout i assigned LS_LAYOUT-MAX_SIZE = 1023.
    but still the problem is not solved.
    Please help me in this Issue.
    Thanks in Advance,
    Ganesh

    Hi friends,
    I dont want to use and Keyboard shiftcntrl....
    or dont want to change any code in ALV report
    by simply assigning some value to any of the export parameter in ALV function module
    can we achieve the functionality
    Thanks in Advance,
    Ganesh

  • Download alv report using layout variant in background

    Hi All,
    I want to download an Alv report using layout varaint in background job.
    can any one please help me.
    i.e...
    I am facing a problem in downloading a text file to the Application server.
    My requirement is, when the user downloads a file with the layout variant, the file should have only the columns which was selected in the variant.
    Will rewards to helpfull ans
    regards
    Chetan

    hey seshu,
    I am facing a problem in downloading a text file to the Application server.
    My requirement is, when the user downloads a file with the layout variant, the file should have only the columns which was selected in the variant.

  • Download alv report in excel format in Linux

    Hi All,
    I am working on SAP GUI for Java in Linux PC. I have installed
    Open Office.
    After executing an alv report there is no spreadsheet option
    to download the report in excel format .
    Also, when doing Save as Local File -> Spreadsheet ,
    the report is not downloaded in proper format.
    So, how to download the alv reports in excel format ?

    Hi Vinod ,
    Save as Local File -> Spreadsheet
    It will ask for Directory and file name with .xls format . Give proper name e.g. test.xls and save, and after saving file right click on the file and click on Open with "OpenOffice.org calc".
    It will definetly work.
    Abhijeet

  • Download a ALV report without repetitive headers and footers.

    Hi,
    I have an ALV report with header and footer. When I download the report into excel, after every 30 (approx) records there is a header and a footer. But I do not need it.
    I need header only once and footer only once in the excel sheet. Please let me know how to achieve it.
    Thanks
    Krishna

    Hi Manish,
    if sy-pagno EQ 1 or sy-batch = 'X'.
      Call the top-of-page event code.
    endif.
    I don't think it can work as it calls the top-of-page at each page in batch mode. Better code should be something like :
    if sy-pagno EQ 1.
      Call the top-of-page event code.
    endif.
    Note : for a generic solution, I think the page number is not automatically page number 1 (for example, if we use a cover page or have printed something else before). So we'd should better use a global variable (first_time) set to 'X' just before CALL FUNCTION 'REUSE_ALV_LIST...' :
    IF first_time = 'X'.
      Call the top-of-page event code.
      CLEAR first_time.
    ENDIF.
    To All,
    I really made a big confusion in my previous answers, which were in fact about column headings (how to print them only once). Sorry about that.
    Sandra

  • Download ALV report to PDF with Lights

    Hi,
    I have a requirement wherein, when i download ALV report to PDF which has Lights in the first column.  My problem is these lights are not displayed instead i get the following in the PDF
    PDF o/p:
    XOO RED SIGNAL
    OXO YELLOW SIGNAL
    OOX GREEN SIGNAL
    Please let me know how to get the lights in the PDF o/p
    Thanks & Regards,
    Sandhya

    Hi Sandhya,
    U can convert any type of display(SF,ALV) to PDF.....
    User Program rstxpdft4 to convert it first the O/P need to be converted into spool.
    cheers,
    Naveen.

  • Print or download ALV report with sort options

    Dear friends,
    How i can download into excel or print ALV report with sort options, like customer name column with similar values should not repeat in the print out or download file.
    Regards,
    Praveen Lobo

    Hi Praveen,
    Use this code, its working:-
    *FOR SORTING DATA
    DATA : it_sort TYPE slis_t_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    *          SORT W.R.T. CUSTOMER NAME
      wa_sort-spos = 1.
      wa_sort-fieldname = 'NAME1'. "field customer name
      wa_sort-tabname = 'IT_KNA1'. "internal table with records
      wa_sort-up = 'X'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    "this will sort the ALV o/p for customer with same name
    "now the name will not be repeated
    "records with same name will be grouped
    *          DISPLAY RECORDS IN ALV GRID
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program                = sy-repid "report id
        it_fieldcat                       = it_field "field catalog
        it_sort                           = it_sort "sort info
      TABLES
        t_outtab                          = it_kna1 "internal table
      EXCEPTIONS
        program_error                     = 1
        OTHERS                            = 2.
      IF sy-subrc <> 0.
      ENDIF.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir
    Edited by: Tarun Gambhir on Dec 31, 2008 1:13 PM

  • Problem while downloading a ALV report to excel

    Hi experts,
    I have an ALV report which took long time to extract records from various table. So while there is some restriction the report can be executed well in foreground. And the report can be extracted well to excel sheet. But while there is hudge records, i have to execute the report in backgroung. And then from spool i generally prefers to download the report to excel.
    There is a field UOM where it contains value ' " ' for some records. And also there may be possiblity that other fields can also contain the same.
    Now my problem is: while download to excel... When ever there is a value ' " ' from this point to the next value ' " '. It is treating as one record. and keep that in a same position in the excel sheet.
    But i want to keep all the values in there respective fields. Can you please how can i do that? Please give me some solution...
    regards,
    charles.

    If anybody have any solution please send me....

  • Download the ALV Report output into excel sheet or notepad

    Hi,
    how to downlaod the alv report out into excel sheet or notepad in a proper manner. program contain large number records....
    Thanks in advance!!!!
    Regards,
    kranthi.

    Hi
    Download a report to excel with format (border, color cell, etc) 
    Try this program...it may help you to change the font ..etc.
    Code:
    REPORT ZSIRI NO STANDARD PAGE HEADING.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          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 H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          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
    Please note that this example maybe slow at filling the excel table
    (perhaps four fields per second on a 900 MHz machine - almost 30 seconds
    for a short example).
    To get the data on properties and methods - there is a bit of smoke and mirrors
    going on here; they are EXCEL properties and methods, not sap ones - so you need
    to look at excel help to determine how a particular function is structured. then
    build the block in sap, as shown in the example.
    If you only want to transfer the data to Excel like when you transfer the data from
    ALV to Excel simply use the Function Modules:
    XXL_SIMPLE_API
    If you want more modifications when you transfer it to Excel use:
    XXL_FULL_API

Maybe you are looking for