Trigger event of Excel download in ALV

From my menu bar on the screen can i trigger the alv
excel download feature.

Hi Kaushik,
Check out the function module ALV_XXL_CALL.
Srinivas

Similar Messages

  • Excel download from ALV not working inproduction

    Hi all,
    I am using "set_table_for_first_display" for alv display. the excel download from alv is woking fine in development and quality stystem but in production only first 3-4 rows are getting downloaded. Other rows donot appear in excel.
    Any Idea !!!
    Thanks
    Madhu

    Hi Experts,
    I have noticed that same problem is occuring in development system also with same set of data . The ascii file created has some missing rows. I guess its due to some special characters though i am not able to see any special character . Any solution for this.
    Regs
    madhu

  • Excel download from ALV grid, for characters more than 1020

    Hi,
    When i am trying to download the report which is having character more than 1020, it is coming in two rows. I want all fields in one row. Please give solutions.
    I am using below field catalog.
    Car Eligibility
      CLEAR lw_fieldcat.
      lw_fieldcat-fieldname = text-001.
      lw_fieldcat-reptext_ddic = text-011.
      lw_fieldcat-tabname = text-021
      APPEND lw_fieldcat TO gt_fieldcat.
    I am using below FM.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = gt_layout
          it_fieldcat        = gt_fieldcat[]
          it_sort            = gt_sort[]
          it_events          = gt_events[]
        TABLES
          t_outtab           = gt_data
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    Thanks in Advance,
    Ravi Kumar

    ravi,
    its not about how you have used your field catalog or how you called ALV FM. its excel download functionality,
    what you need to do is:
    set pf-status '<<some value>>' -> you can find where to pass in ALV FM call.
    then add a application toolbar button though this pf status.
    then at  use_command event, check sy-ucomm and if its the same as your new icons fcode then use the method to download it in excel.

  • Issue in Excel download from ALV output

    Dear Experts,
    I have generated an ALV Output using FM "REUSE_ALV_GRID_DISPLAY". When i try to download the ALV Output in Excel spreadsheet, I am not getting the data in Excel sheet. Kindly help me in this regard.
    Thanks in advance,
    Regards,
    Ramesh Manoharan

    hi ramesh,
    Please try below options.
    after getting the ALV disply , Go to Menu  LIST->Export->Spreadsheet.or microsoft excel view (Cntrl + Shift + F7)
    It will give some options to see the data in spread sheet format, hope you can save this to local desktop also.
    or
    please check the extension, it should be .XLS not .XLSX  .some times .XLSX format wont be supported
    regards,
    pradeep
    Edited by: Pradeep Kandgal on Aug 4, 2010 6:54 PM
    Edited by: Pradeep Kandgal on Aug 4, 2010 6:54 PM

  • Excel Download to ALV report

    Hi Guys,
    I’m facing a peculiar problem.
    When I try to download an ALV report in excel format using (list ->export -> local file-> soread sheet )I’m not able to download complete set of records.
    Same is happening with ws_download,  even though the internal table contains all the record; the number of downloaded records are not same.
    Any one faced same problem. Pls. help me out.
    Regards,
    Sumit

    looks strange!!!!!!!!!!!
    change these in excel sheet and check out if it works
    Change the macro settngs in your excel sheet and checkout if it works
    Open empty excel sheet
    In menu Tools>Macros>Security , change the radiobutton to medium
    And also
    In the Same popup , goto the second tab Trusted Publishers and check the checkbox Trust access to visual basic Project

  • Problem in excel download of ALV report

    Hi All,
    I have created an ALV report with 87 fields in it. Whenever I am trying to download that report into excel the number of column breaks into 2 rows. In this case, The downloaded file contains 57 Columns in 1 row and remaining 29 Columns in second row. Can anyone please help me in understanding why this is happening while downloading this report into excel file and what will be the solution to correct it.
    To download the file I am using the icon placed at application toolbar or ( Cntrl + Shift + F9 ).
    Waiting for your response.
    Regards.
    Pravesh

    HI Parvesh,
          If you want to download the ALV result to you local file however you can follow the below coding.
    DATA:  l_filename    TYPE string,
           l_filen       TYPE string,
           l_path        TYPE string,
           l_fullpath    TYPE string,
           l_usr_act     TYPE I.
    l_filename = SPACE.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
      EXPORTING
        DEFAULT_FILE_NAME    = l_filename
      CHANGING
        FILENAME                     = l_filen
        PATH                 = l_path
        FULLPATH             = l_fullpath
        USER_ACTION          = l_usr_act
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        others               = 4.
    IF sy-subrc = 0
          AND l_usr_act <>
          CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                        = l_fullpath
       FILETYPE                        = 'ASC'
      TABLES
        DATA_TAB                        = T_DOWNL
    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.
    ENDIF.

  • Regarding excel download from ALV report tree

    Hi Experts,
    I have a ALV report tree program. In that i need the functionality to download report output in excel file.
    Can any body suggest how can i achieve download to excel functionality in it.
    Any useful suggestion will be appreciated.
    Thanks in advance,
    Akash

    The data for the tree exist in the NODE table in a different format. So, even you download that table, it will not be downloaded in the TREE format. So, the user will not be able to understand the data unlike the case of a ALV GRID.
    Whether it is a TREE / GRID, ultimately its the data of a internal table, that gets downloaded. But in case a TREE, we don't have the data in a straight forward way . i thnk it is not possible . i am not sure too for this .

  • Excel Download of ALV with one column containing leading zeros

    Hello Experts,
    I have the requirement in which the first column is of type company code (T001-BUKRS). So if the company code is '0061', then on the ALV display its displayed as '0061', but when it is downloaded to Excel sheet, it shows '61' in place of '0061'.
    Is there any way we can display in the downloaded Excel as 0061?
    Any pointers could help.
    Regards,
    Mansi.

    Hi Mansi,
    I think its because of excel property.You can format cell of excel to category 'special'.
    regards
    vivek

  • Excel download for ALV Block report (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 Sridhar,
    there is already an option to download in spreadsheet format when saving to local file...then why do you want to activate List->export->spreadsheet ????
    regards,
    madhu

  • Excel download in ALV list

    Hi All,
    I am displaying a list using FM, "REUSE_ALV_GRID_DISPLAY". In the list when I press the Excel icon, an excel file opens without any data in it. Do I need to take care of data download in my User command during the FM call? If yes, how do I do that?
    Thanks.
    Pankaj.

    Hi,
    Look at the following sample code...........
    CALL FUNCTION <b>'REUSE_ALV_GRID_DISPLAY'</b>
    EXPORTING
    i_callback_program = i_repid
    i_callback_user_command = 'USER_COMMAND_PERNR'
    it_fieldcat = header
    is_layout = gt_layout
    i_callback_top_of_page = 'TOP-OF-PAGE1'
    i_grid_title = text-t06
    it_sort = gt_sort[]
    i_default = 'X'
    i_save = 'U'
    is_variant = gt_variant
    it_events = gt_events
    TABLES
    t_outtab = ITAB.
    clear itab.
    endif.
    Form TOP-OF-PAGE1
    form top-of-page1.
    data: header type slis_t_listheader,
    wa type slis_listheader. "infield like wa-info, nline type n.
    wa1 type slis_listheader,
    wa2 type slis_listheader.
    TITLE AREA
    wa-typ = 'S'.
    wa-info = text-t04.
    append wa to header.<<<----Header text
    ******Here you can fill it***********
    wa-typ = 'S'.
    wa1-typ = 'S'.
    wa2-typ = 's'.
    write <your field-low> to wa1-info.
    write <your field-high> to wa2-info.
    concatenate 'Date' wa1-info 'to' wa2-info into wa-info separated by space.
    append wa to header.<<<<---Date range i think
    wa-typ = 'S'.
    concatenate text-t02 sy-UNAME into wa-info separated by space.
    append wa to header.<<<--User name
    wa-typ = 'S'.
    concatenate text-t01 sy-repid into wa-info separated by space.
    append wa to header.<<<<---Report name
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = header
    i_logo = 'ENJOYSAP_LOGO1'.<<<<---LOGO if needed
    endform.
    You can check the below links also......
    http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    Cheers
    ALfred
    If this helps you reward with points.

  • How to enable excel downloading in ALV grid report.

    Hi all,
    How to enable excal downing in ALV grid report?
    Thanks in Advance.
    Siva Sankar.

    hi
    check the following code
    Example of a Simple ALV Grid Report
    REPORT  ZTUFI091                                .
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    *REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you  more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
                  I.e. Field type may be required in-order for
                       the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
               i_logo             = 'Z_LOGO'.
    endform.
          FORM USER_COMMAND                                          *
          --> R_UCOMM                                                *
          --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
      Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
        Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
        Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
        Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
          Build events table
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events[].
      read table gt_events with key name =  slis_ev_end_of_page
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
        read table gt_events with key name =  slis_ev_end_of_list
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
          Setup print parameters
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
    *&      Form  END_OF_PAGE
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  END_OF_LIST
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    hope it will help you
    regards
    sreelatha gullapalli

  • Excel download from ALV OOPS , columns rearranged

    Hi ,
      When I am downloading the data using the Export button - option Spreadsheet few of the columns are getting re-arranged. I am using OOPS ALV using Custom container.I even specified the column position in the field catalogue.
    Can anyone help me to have the columns in the same order as displayed in SAP.
    Many Thanks
    Supriya

    hi,
    for this problem u need to create a varient layout. here u customize the output.
    while seeing the output u can use this layout.
    hence your output will be similar as u seen in the system.
    try and let me know...
    pradeep.

  • How to handle blank time value in excel download in ALV. Please help

    Hi Experts,
       I have a ABAP webdynpro report which contains a ALV grid output. The ALV table has a time field (create_time of type tims).
       The problem is when the create_time value is initial (00:00:00 by default) it displays 00:00:00 in the ALV.
       When I export the contents to excel then there it shows the same value as 12:00:00 AM.
       How can I avoid this programmatically? Actually when time is initial then I want to display as blank instead of 00:00:00.
       For this if I change the data type of this field to CHAR08 then it displays the value as 0 (if initial) and 140523 (if time has some value or its not initial) instead if 14:05:23.
       I don't know if there is any better way to handle this.
    Please help.
    Thanks & Regards
    Gopal

    My suggestion is that you make the context attribute a type string. Then when you populate the data into the internal table that is bound to the context you perform a write statement on the date field. Here is some psydo-code.
    if <ls_data>-time is initial.
      clear <ls_output>-time.
    else.
      write <ls_data>-time to <ls_output>-time.
    endif.
    This way when the time is inital you can display nothing instead of the 00:00:00.  This should also keep Excel from knowing that this column is a time field. To Excel it will just be a string and it should display whatever text you placed into the field.
    Of course this means that filtering and sorting on this field won't work right.  Those operations will be befored without knowledge this is actually a time field.

  • Removing zeros on the excel download

    I wanted to know how we can remove zeros from the kebtr at the excel download through ALV without converting it to a type c. for now I am converting it to type c and then validating it this way :
    if tb_main-kebet = 0.
        tb_main1-kebtr = space.
      endif.
    But because of this the formats are not ok and user insists that it should be a numberic field for him.
    Thank you very much.

    Hello Kris,
    I am able to see the data properly in XLS File.
    Use fieldcatlog no_zero = 'X'.
    Now run the transaction -> click on XL Icon ( if you do not get the data properly using navigation),now see the results here.
    you can save same xls file into local machine too.
    Thanks
    Seshu

  • Problem in ALV to Excel Download

    Good Morning Experts,
      I am facing one issue related ALV to excel Download.
    I Developed one custom report the output is correct displaying.
    the output is like for example i am taking 3 columns (plant, material, amt).
    plant material amt
    1001  aaa     1000
    1001  bbb     2000
    while downloading to excel
    it displaying like
    plant
    material
    amt
    1001
    aaa
    1000
    1001
    bbb
    2000
    I dont know why its coming like that.
    this is my code
    DEFINE field_cat.
    wa_field-row_pos = &1.
    wa_field-fieldname = &2.
    wa_field-tabname = &3.
    wa_field-seltext_m = &4.
    wa_field-outputlen = &5.
    wa_field-currency = &6.
    wa_field-ref_fieldname = &7.
    wa_field-ref_tabname = &8.
    APPEND wa_field to it_field.
    clear wa_field.
    END-OF-DEFINITION.
    field_cat '1' 'BUKRS' 'IT_FINAL' 'Company Code' '6' '' '' ''.
    field_cat '2' 'BUTXT' 'IT_FINAL' 'Comp Descrip' '25' '' '' ''.
    field_cat '3' 'LIFNR' 'IT_FINAL' 'Vendor No' '10' '' '' ''.
    field_cat '4' 'NAME1' 'IT_FINAL' 'Vendor Name' '35' '' '' ''.
    field_cat '5' 'STRAS' 'IT_FINAL' 'Vendor Addres' '35' '' '' ''.
    field_cat '6' 'FDGRV' 'IT_FINAL' 'Nature Of Work' '30' '' '' ''.
    field_cat '7' 'DMBTR' 'IT_FINAL' 'Net Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
    field_cat '8' 'QBSHB' 'IT_FINAL' 'TDS Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
    field_cat '9' 'TOTAL' 'IT_FINAL' 'Total Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
    it_layout-zebra = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = sy-repid
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
       IS_LAYOUT                         = it_layout
       IT_FIELDCAT                       = it_field
       I_SAVE                            = 'X'
      TABLES
        t_outtab                          = it_final
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.                    " DISPLAY_ALV
    FORM TOP_OF_PAGE.
    REFRESH it_head. CLEAR it_head.
    wa_head-typ = 'H'.
    wa_head-info = 'Vendorwise Expense Details'.
    APPEND wa_head to it_head.
    wa_head-typ = 'S'.
    IF NOT s_MONAT-high is INITIAL.
      CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low ' to ' p_gjahr '.' s_MONAT-high INTO wa_head-info.
    ELSE.
      CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low INTO wa_head-info.
    ENDIF.
    APPEND wa_head to it_head.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        it_list_commentary       = it_head.
    ENDFORM.
    Regards,
    Dhina..

    Hi,
    You can also try in this way
    in the output screen
      click List (in app tool bar) -> Export -> Spreadsheet
    and save at your desired location.
    (It will be save in .mhtml format , just rightclick on it and you can open it with excel )
    Then you will be able to view in your required format.
    Regards,
    koolspy.

Maybe you are looking for

  • ICloud sync not working with BBQ10

    Hello. Having recently swapped my iPhone 5 to BBQ10 I have been hit by an enormous amount of hassle. The main thing being the ability to sync my contacts and calender from my Mac on to the Q10. I have followed the online instructions and it is not wo

  • Peovisioning multivalued attribute to a Detail table in SQL using GTC

    I have a trusted recon set up from Sun LDAP to OIM followed by auto provisioning to SQL's "MyUser" table using GTC. This works fine so far. Now the difficult part of the requirements. I have a multi-valued attribute called 'AppRoles' associated to Us

  • User exit to set  GR field in PO while creation

    Hi All, I have requirement where we have to tick check box for GR under delivery tab in line item details of Purchase order depending on some conditions. Say, if company code is 'X' and material group is 'Y' then only this check box should get ticked

  • Using ABAP memory during IDOC processing

    What are implications , issues of using ABAP memory in IDOC processing i.e. let say in inbound FM , I create implicit enhancement and I submit a report and return  and pass data to this report via abap memory. What are implications ? Is it recommende

  • ISync and third party software

    Having recently purchased a shiny new Intel Macbook (running Tiger 10.4.8), I was keen to get ISync (2.3) working with my Nokia N80. As usual I've picked a model that isn't supported by ISync. Bah! So to cut some corners until ISync is updated I have