Download ALV output to EXCEL

Hi gurus,
   Cany anybody explain what is the procedure to download the alv output to EXCEL sheet?
Marks will be awarded
Thanks in Advance
Ravi

Hi
when display the ALV . select from PF-STATUS menu bar select download option then SPEADSHEET. Thats all.
Reward all the helpful answers..
With Regards
Navin Khedikar

Similar Messages

  • Download ALV output to excel with formatting

    Hi All,
    i want to download ALV output to excel sheet and the uneditable fields in ALV oputput should be locked (uneditable) in excel also.
    Can you please tell me approach to achieve this functionality?
    Thanks in advance.

    Thanks Vamsi. Your Suggestion was helpful.
    I have used excel integration and used SET PROPERTY OF (COLUMN) 'LOCKED' = 1.
    For more details refer below mentioned link.
    http://webcache.googleusercontent.com/search?q=cache:SoY6hFC17PoJ:wiki.sdn.sap.com/wiki/display/Snippets/Download%2BData%2Binto%2BMultiple%2BSheet%2BExcel%2BDocument%2Bwith%2BNon%2BEditable%2BColumns%2B(Password%2Bprotected)%2BUsing%2BABAP%2BOLESetPropertynoteditableexcelsapABAP&cd=1&hl=en&ct=clnk&gl=in&source=www.google.co.in (http://webcache.googleusercontent.com/search?q=cache:SoY6hFC17PoJ:wiki.sdn.sap.com/wiki/display/Snippets/Download%2BData%2Binto%2BMultiple%2BSheet%2BExcel%2BDocument%2Bwith%2BNon%2BEditable%2BColumns%2B%28Password%2Bprotected%29%2BUsing%2BABAP%2BOLESetPropertynoteditableexcelsapABAP&cd=1&hl=en&ct=clnk&gl=in&source=www.google.co.in

  • Getting ERROR when downloading alv output to Excel

    Hello All,
    I get a error message when I try to use the standard funtionality to download the alv output to excel.
    The current statement only supports character-type data objects.
    What happened?
    The current ABAP/4 program "SAPLKKBL " had to be terminated because
    one of the statements could not be executed.
    This is probably due to an error in the ABAP/4 program.
    Error analysis
    In statement
       "STRLEN( obj )..."
    the argument "obj" can only take a character-type data object.
    Source code extract
    038620   *   ansonsten entspricht sich min. Ausgabelänge und Ausprägungslänge
    038630       else.
    038640         if gs_fc-tech_form ne 99.
         >           gs_out-hlplen = strlen(  ).
    038660         endif.
    038670       endif.
    In this case, the operand "obj" has the non-character type "I".
    Please can anyone put some light on this. It is veru difficult to go through the whole std functionality to download.
    Thanks for all support guys!
    Sri.

    Hi srikanth,
    This error comes because the values present in any one of the displayed coloums containing special character like * present before or after the number....  i.e  instead of 4 ...**4.
    While displaying in the screen it is of no problem. since both *4 are converted into char format (internally) and gets displayed.
    But while you download the same throu the EXCEL functionality SAP will intenally convert the same into NUMERIC format. Since 4 is number.
    So in that case *4 will cause dump.
    *So find out the place in which the value appearing like this *4 and try to correct it.
    *Surely it is of Field LENGTH problem. Try to increase the length of the field 4.
    It Should WORK.!!!..  else post ur query here.
    REWARD POINTS IF USEFUL
    ~Lakshmiraj~

  • Problem in downloading ALV output in excel

    Dear Abapers,
                           I am facing a problem while downloading alv output in spreadsheet. Report headers and data headings are coming in excle but contents are missing instead of that No Data is displaying on excel sheet. I have debug that and observed the deep structure name T_OUTTAB using by the FM ALV_DATA_EXPORT is empty, It should contain the contents of my output data.
    Below I am giving my code. 
    ***********************************************declaration****************
          BEGIN OF d_file_out,
            index           TYPE i,                      "Index no
            msg             TYPE string,              "Message
            msgtyp(1)       TYPE c,                 "Message type
           END OF d_file_out,
    DATA:t_file_out       TYPE TABLE OF d_file_out.
    DATA:wa_file_out          TYPE d_file_out.
    Display Error Logs
    PERFORM display_logs USING text-006.
    FORM display_logs USING p_text TYPE string.
      CONSTANTS:  c_count    TYPE char5 VALUE 'INDEX',
                  c_mestyp   TYPE char6 VALUE 'MSG',
                  c_message  TYPE char7 VALUE 'MSGTYP'.
    *Field catalog
      PERFORM: z_field_catalog USING c_count   text-010,  "Record number
               z_field_catalog USING c_mestyp  text-011,  "Message type
               z_field_catalog USING c_message text-012.  "Message
    *Top of page event
      PERFORM z_event USING t_events.
    wa_layout-colwidth_optimize = c_x.
    ALV grid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
         i_buffer_active          = 'X'
           i_callback_program = sy-repid
         is_layout          = wa_layout
         I_STRUCTURE_NAME   = wa_file_out
          it_fieldcat        = t_field
          it_events          = t_events
        TABLES
          t_outtab           = t_file_out
        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.
    ***********************************Fieldcatalog**********************************************
    FORM z_field_catalog USING p_field TYPE any
                                                p_name  TYPE any.
      wa_field-fieldname = p_field.
      wa_field-seltext_l = p_name.
      IF p_field = 'INDEX'.
        wa_field-outputlen = '14'.
        wa_field-col_pos = 1.
      ELSEIF p_field = 'MSG'.
        wa_field-outputlen = '120'.
        wa_field-col_pos = 2.
      ELSEIF p_field = 'MSGTYP'.
        wa_field-outputlen = '08'.
        wa_field-col_pos = 3.
      ENDIF.
      APPEND wa_field TO t_field.
      CLEAR wa_field.
    ENDFORM. 
    Here I have given my code, which contain the building of field catalog and Calling ALV Grid. I have already checked the excel micros settings. Other programs are working fine on my system and downloading in excel is also working.
    Hope to get reply soon.
    Regards,
    Himanshu

    Hi ,
    use this to down load to xcel
    v_file = lv_file.
      DATA:  BEGIN OF s_head OCCURS 0,
             head(40) TYPE c ,
             END OF s_head.
      s_head-head = text-015."'Sales price'.   * for header
      APPEND s_head.
      s_head-head = text-016."'Purchase price'.   * for header
      APPEND s_head.
      s_head-head = text-017."'Listing Procedure'.   * for header
      APPEND s_head.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_file
         filetype                        = 'ASC'
         write_field_separator           = '#'
        TABLES
          data_tab                        = it_output1[]
          fieldnames                      = s_head[]
       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.

  • Problem in Download ALV Output to Excel

    Hi All,
    When iam going to Download the ALV ( Grid ) Output to Excel, all columns are not coming in Output.
    But the ALV Output Contains 140 Columns.
    How to solve this issue.
    Points Rewarded.
    Thanks & Regards,
    Kiran . I

    Hi,
    You can download the report by going to menu option
    List->export->local file.. in this select spreadsheet and give the name for this to download.
    You can view all the columns here in xls sheet.
    Regards,
    Ram Mohan
    Pls reward poins if useful...

  • Problem in downloading ALV output to Excel

    Here are the details of short dump.
    Run time Error OBJECTS_NOT_CHARLIKE
    The current statement only supports character-type data objects.
    What happened?
    Error in ABAP application program.
    The current ABAP program "SAPLKKBL" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    What can you do?
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    Error analysis
    In statement
       "STRLEN( obj )..."
    the argument "obj" can only take a character-type data object.
    In this case, the operand "obj" has the non-character type "P".

    Declare another variable of same length as 'obj' let us say its obj1 , then move 'obj' to 'obj1', now findout the length of 'obj1', which wil be the same value.
    MOVE obj TO obj1.
    STRLEN(obj1).
    Hope ur dump wil not trigger again.
    Regards,
    Sujatha.

  • To download alv output to two excel sheets because of large data

    Hi all,
    I want to download alv output to excel sheet,I know how to do,but the no of record is very large and can not be accomodated in one sheet.
    can anyone please tell how to download it into two sheets or some other way.
    I want excel format only.
    Regards,
    sudha

    hi sudha yadav,
    right now i am working on the same issue.
    what right i am doing is that,
    i want to download an internal table it is containing more than 2 lakhs records but excel can accomidate 60000 records, so
    before call gui download i am sending first 60000 records into another internal table with same time, by using append statemen and indexs,
    that new internal table i am downloading
    again i am repeating the same thing by using sy-tabix,
    finally i am creating more than one excel file
    by using oops concepts we can also create in one excel file no of work sheets
    but its lengthy process so i am right now creating no of excel files only
    if it is useful , pls rewards points to this answer

  • Displaying alv output into excel with delimeter

    Hai,
          am downloading alv output to excel :
    1. in that output   one field is long text field with # delimeter at the  end of sting .
         while exporting  this outout to excel it is not  showing # and one empty column is adding after that field.

    Hi Satya,
    Can you try out this piece of code below. It creates a demo Internal table to store some string with '#' as the final delimiter.
    TYPES : BEGIN OF l_ty_demo,
              data TYPE string,
            END OF l_ty_demo.
    DATA   : l_i_demo TYPE STANDARD TABLE OF l_ty_demo.
    DATA : l_wa_demo TYPE l_ty_demo.
    DATA : l_v_i TYPE sy-tabix.
    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.
    WHILE l_v_i < 10.
      l_wa_demo-data = 'Welcome to the world of computers#'.
      APPEND l_wa_demo TO l_i_demo.
      l_v_i = l_v_i + 1.
    ENDWHILE.
    * start Excel
    CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    PERFORM err_hdl.
    SET PROPERTY OF h_excel  'Visible' = 1.
    PERFORM err_hdl.
    * 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.
    LOOP AT l_i_demo INTO l_wa_demo.
      h = sy-tabix + 1.
      PERFORM fill_cell USING h 1 0 l_wa_demo-data.
    ENDLOOP.
    *&      Form  FILL_CELL
    *       text
    *      -->I          text
    *      -->J          text
    *      -->BOLD       text
    *      -->VAL        text
    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.                    "FILL_CELL
    *&      Form  ERR_HDL
    *       text
    FORM err_hdl.
      IF sy-subrc <> 0.
        WRITE: / 'Fehler bei OLE-Automation:'(010), sy-subrc.
        STOP.
      ENDIF.
    ENDFORM.                    "ERR_HDL
    Please refer to the following Demo ABAP Code for a complete reference.
    RSDEMO01.
    Hope this helps.
    Thanks,
    Samantak.

  • Downloading of ALV output to excel by asking the password

    Hi all,
               I need to down load the ALV output into the excel sheet. But the thing is that before going to download the output into excel sheet, the system has to prompt for password.once it happens then the user will enter the password and it should validate. if the validation is successful then the output should download to the excel sheet. This is the requirement, can anybody help me out regarding this.Please provide the function module names and sample code.
    Thanks & Regards.
    Laxman.P
    B'lore.

    Hi,
    Check this thread,
    Make excel sheet password protected through ABAP codeu0085
    Regards,
    Omkar.

  • ALV Output to Excel file

    Hi All,
    I am downloading the ALV output to Excel file.I am making use of  LIST--->EXPORT--->SPREADSHEET option.
    My list is having Header, Footer, sub totals and totals.When i transfer the list i am facing following problems
    1.Even i am getting the empty columns betweeen my output.
    2.In the Place of sub totals i am getting astericks
    3.On the top of the records downloaded,"DYNAMIC LIST DISPLAY" is found.I want to avoid this text on the top
    Thanks,
    Ravee...

    Hello Vinod,
    1.I am getting the empty columns betweeen my output.
    I am having 16 columns in the ALV output,but i got 19 columns in my excel file.
    2.In the Place of sub totals i am getting astericks.
    Generally there is no possibility to download the sub totals.i am using LIST->EXPORT->SPREADSHEET.
                     I am having the sub totals in my output.
    *You would have noticed the' * ' for sub total and ' ** ' for grand totals values.*These sub total & total values are not downloaded but these asterisks are carried to excel file.
    3.On the top of the records downloaded,"DYNAMIC LIST DISPLAY" is found.I want to avoid this text on the top.
    I am using the application tool bar icon only.Still i am getting the same.
    Thanks,
    Ravee...

  • Alv output to Excel with numeric fields as numeric fields only and not char

    Hi,
    When we download the alv output to excel format in the locat file using the toolbar button provided in the ALV, the numeric fields get converted to character format. Is there any other way or settings in ALV so that the numeric fields will be get saved as numeric fields only and not character?
    Rgds,
    MAdhuri

    any idea for above problem is welcome

  • 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 Download displayed output to Excel Using Bsp Application

    Hi Experts,
    please give me some idea because I am New In BSP.
    How to Download displayed output to Excel Using Bsp Application.
    If any sample code please do send me.
    In my condition I am getting data in  2-3 table view formats on one page and i want download that in Excel.
    please help me.
    Regards & Thanks,
    Yogesh

    Hi,
    This is more a question for the BSP forum.
    Anyway, as such it's realy easy since you can use HTML in order to import to Excel. All you need to do is add
    runtime->server->response->set_header_field( name = 'Contnet-Type'
    value = 'application/vnd.ms-excel' ).
    runtime->server->response->delete_header_field( name = 'Cache-Control' ).
    runtime->server->response->delete_header_field( name = 'Expires' ).
    runtime->server->response->delete_header_field( name = 'Pragma' ).
    Also check threads like
    Download BSP data into Excel
    export bsp-table to excel
    Export BSP Table to Excel
    Eddy
    PS. Reward useful answers and earn points yourself

  • Dump in prodcution server while downloading ALV report to excel sheet

    HI ALL,
    ALV report is working fine in bother DEV and PROD servers....but in production while downloading report to excel sheet it is going to dump.
    "dump is below:
    Short text
    Field symbol has not yet been assigned.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLKKBL" had to be terminated because it has
        come across a statement that unfortunately cannot be executed. "
    But in development this problem is not there, iam able to download ALV report to EXCEL sheet.
    Any help experts......
    Thanks in advance
    Ram

    Hi,
    I had the same problem,
    Run a consistency check for your ALV and you will find out. See if you havent passed any unnecessary parameter to FM.
    /people/rainer.hbenthal/blog/2009/09/25/sos--my-alv-report-is-not-working
    Dump while printing ALV (field symbol not assigned)
    Sumit

  • Procedure/sample code to download alv output in HTM format & mail to user.

    Hello Experts,
    I've a requirement to run the Alv report at background. But i need to download the alv output in HTM fomat because it has subtotal values & look wise downloaded HTM format will be same as that of ALV output. Then send the attachment through mail to users. I'm not intersted in  downloading  internal table dierctly to HTM format.
    Will the code for alv display & downloading in HTM format & forwarding via email  is all done in one single  program or in 2 differnt programs . pls guide me on this.
    I'm using FM REUSE_ALV_GRID_DISPLAY to display output with subtotals.
    Pls anyone there suggest me the steps to download ALV output in HTM format & the forward the same  to user ID through Lotus notes.
    Regards
    Devika.S

    Hi,
    This can be achieved without coding .
    Fore ground Scenario:
    1. Downloading as HTM . In foreground you can do this by using Export---> Local file
    option in ALV grid.
    Background Scenario:
    2. In background while sending mail , You have to achieve the same through customisation settings as wexplained below.
    In SM36 -- > Spool List Recipient, give the reciepient id and click on copy. Now when the Background job will be finished,
    the reciepient mentioned above will recieve the mail , but in ALI format.
    To convert the same to HTM format, you need to do customisation changes in SCOT
    goto SCOT>Expant the node INT>Double click on Email-->Beside Internet we have SET tab , click on that -->
    select the radio button " all formats except the following ">In the near by box type ALI>then click on the tick Mark.
    Then go to SCOT>Settings>Conversion Rules-->there
    create a new row with, Format->ALI , To Format->HTM , Ranking 1, FM -> SX_OBJECT_CONVERT_ALI_HTM.
    Now when the mail will be sent, it will not go in ALI, but in HTM format.
    Hope this helps you out.

Maybe you are looking for

  • How can I use 3D function in Photoshop CS6 (student package)?

    Please let me know how can I use 3D function in Photoshop CS6 (student package)? Thanks,

  • MSI GT70 0NC 494 - Samsung 840 Evo Problem

    I recently brought a Samsung 840 Evo 500GB to replace the WD Black HDD on my MSI GT70-0NC-494 laptop. OS is Windows 8. Im going type out pretty much how I ended up to where I am right now in hopes that maybe someone could catch where I went wrong. So

  • Creating a banner in Flash

    Hello all, I am thinking of creating a banner in flash.. What are some of the advantages or options I would have versuses just creating a banner in fireworks.. -One I know I could fade in and out for effects.. -Two I can create movement.. -Is there a

  • Delete memory Id when the session is still active

    Hi all, Can anyone tell me how to clear the Memory Id when the session is still active. I am getting the amount value through Memory Id from import and export parameter when I am posting the check. Again if I reprint the check without closing the ses

  • JDBC and ABAP proxy

    Hello guys , need help with the following scenario : ZTable as sender through Xi to db. i have never worked on this type before . Need some help in any blogs or scenarios dealing with the same . Interfacing ztable through a abap proxy. I am also conf