Export ALV to Excel and results in missing records/rows

Hi experts,
I'm a very beginner in ABAP programming. I've got a problem as below:
My ALV report is able to export to .MHTML file, but few rows/records missing when export to .XLS file (using the 'Local File...' button or Ctrl + Shift + F9). And I found that missing rows actually appended to a cell of a displayed row.
I've been searching solution for this issue quite sometimes and could not find any.
Please kindly advise how to solve this issue.
Thanks and regards,
AN

For more detail, the "Material Description" field contains some special characters as double-quote (") and comma (,)
Please kindly advise if you experience.
Thanks,
AN

Similar Messages

  • Workflow for exporting xml from Excel and importing into table in InDesign

    Hello,
    I have worked out how to get data from a .xlsx into a table in InDesign. However, the workflow is still a little clunky and I am looking for way to automate the process further. My current workflow is as follows (files can be download here: http://visual360.co.uk/xml.zip)
    xml is exported from .xlsx by mapping the schema (see what_I_get.xml)
    assign tags to table and individual cells in InDesign
    This is the clunky bit: edit the what_I_get.xml to:
    remove the indentation (this seems necessary as otherwise when I get to stage 4, all the imported text is also indented)
    add tag for table in InDesign (p10_table)
    add tags for individual cells (p10_c11 etc.)
    import the produced what_I_want.xml in the structure panel of InDesign.
    Can anyone point me in the direction of how to automate step 3 above?
    Thanks in advance,
    Nick

    Hi Mike,
    Thanks very much for the reply. I am not at all familiar with XSL/XSLT. I have given it a quick google and it seems like it could be quite a steep learning curve to master. Maybe if I explain the whole context here, it may allow you to point me in the direction of a tutorial that provides a step by step approach to achieve my final goal. Alternatively, you may be able to suggest a whole new workflow.
    I am in the process of updating this document: http://www.ncl.ac.uk/students/insessional/assets/documents/IS_Brochure_2014-15.pdf
    The tables on pages 10-21 contain lots and lots of repeated information. We want the layout to in this format so that each group of students has all the information relevant to them on a single double spread. However, the challenge of using this approach is that it is very high maintenance to ensure the duplicated information is kept in sync - even using a copy / paste approach.
    I was hoping to overcome this by using a single source of data (eg. a spreadsheet) which would then feed into the InDesign. This workflow seems to be overcomplicated by the apparent need to use xml as the "middle-man".
    Ideally, I would like to press the export button in Excel and get this information into the the correct cells in the tables on pages 10-21 without a significant amount of manual labour - after all, my reasons for investigating an automated approach in the first place was to avoid the manual entering of data ie. the scope for error...
    An alternative approach maybe to skip Excel altogether and just use .xml. However, I am not sure that this is possible as Indesign only seems to allow you to import each element once. Maybe you could correct me here...
    I am happy to invest a certain amount of time in developing this approach as once it is in place, it will save a huge of proof-reading time year after year, especially as inconsistencies still persist despite our best efforts to weed them out.
    If you could let me know your thoughts on this and maybe identify a tutorial that would help me, I would be extremely grateful.
    Thanks again!
    Nick

  • I just purchased Export PDF to Excel and it does not export anything usable. Your terminology should not be "export" but paste image, which is of no value. Please cancel my account and refund my money. What a shame you would advertise this as a product.

    I just purchased Export PDF to Excel and it does not export anything usable. Your terminology should not be "export" but paste image, which is of no value. Please cancel my account and refund my money. What a shame you would advertise this as a product.

    Hi pgrillo,
    I'm sorry that you're disappointed with your ExportPDF subscription. I checked your account, and see that the order is still processing. As such, I'm unable to cancel it for you myself. However, a Customer Care agent can take care of your cancelation/refund quickly. Here is the contact information: Contact Customer Care. Click Still Need Help? Contact Us at the bottom of the page to find both phone and chat support options.
    Best,
    Sara

  • ECC6: export ALV to 'Excel (in MHTML format)

    We have just upgraded to ECC6. When I try to export ALV to 'Excel (in MHTML format) I get a runtime error (GETWA_NOT_ASSIGNED). My list has 2 quantity fields. Tracing the error in the dump, i notice there is failure when processing quantity fields when the following SAP Standard method is called.
       >173      when if_salv_bs_c_data=>reffieldtype_quan.                 
       >174 *... get iso value for quantity value                              
       >           call method cl_alv_xslt_transform=>get_isonum_from_intnum
       >176             exporting                                              
       >177               i_value    = <l_data>                                
       >178               i_unit     = <l_reference>                           
       >179               i_decimals = ls_attribute-s_dfies-decimals           
       >180             importing                                              
       >181               e_value    = l_isovalue.    
    I have tried a few tricks with the FIELDCATALOG function without success. Does anyone know how I can overcome this.
    Regards.

    Hi.
    The quantity fields are coming from a table structure. I have tried making then character in the fieldcatalogue function but the runtime error was not eliminated.
    Regards.

  • Query results:every other record/row grey and white

    Hello guys,
    query results:every other record/row grey and white
    how would you make every other record/rows a different color
    just like the forums color. Lightest grey and white?
    <cfquery name="Myqueryname"
    datasource="#Request.MainDSN#">
    SELECT
    CompanyID,
    CompanyName,
    Address,
    City,
    State,
    ZipCode,
    Comments
    FROM
    Company
    ORDER BY
    CompanyName ASC
    </cfquery>
    <html>
    <head>
    <title>CF TUTORIALS</title>
    <link rel="stylesheet" href="styles.css">
    </head>
    <body>
    <h1>All CO Listings</h1>
    <table>
    <tr>
    <td><b>ID</b></td>
    <td><b>Name</b></td>
    <td><b>Address</b></td>
    <td><b>City</b></td>
    <td><b>State</b></td>
    <td><b>ZIP Code</b></td>
    <td> </td>
    </tr>
    <cfoutput query="Myqueryname">
    <tr>
    <td>#CompanyID#</td>
    <td>#CompanyName#</td>
    <td>#Address#</td>
    <td>#City#</td>
    <td>#State#</td>
    <td>#ZipCode#</td>
    <td>
    <a href=" ALL Emps.cfm?CompanyID=#CompanyID#">ALL
    Emps</a>
    <a href=" AddCO Form.cfm">AddCO</a>
    <a href="
    Editco.cfm?CompanyID=#CompanyID#">Editco</a>
    <a
    href="CoDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
    </td>
    </tr>
    </cfoutput>
    </table>
    </body>
    </html>

    There is a cool tool in Coldfusion called MOD
    This basically calculates the remainder of the row number
    when divided.
    I interpreted its use to something like this, which has
    worked for me.
    <cfoutput query="qry_requestedlist" maxrows="30"
    startrow="1">
    <cfset EvenRow=#CurrentRow# +1>
    <cfif CurrentRow Mod 2 IS 1>
    <tr>
    <th class="grey" CurrentRow#</th>
    <cfelse>
    <th class="white">#CurrentRow#</th>
    <tr>
    </cfif>
    </cfoutput>
    I doubt this is precisely what you want but this is the sort
    of thing.

  • Missing Header Row When Exporting Data to Excel and Program Runs Slow

    Hello all,
    I am new to programming. I’ve dabbled with VB.NET at times over the years but this is the first time I’m trying C#. Although, it’s been quite a while since I’ve done any type of programming other than writing SQL queries at work. For the sake of trying to
    learn I have given myself a project that is something I can actually use at work. Right now I'm doing it at home. I’m querying a database on SQL Server 2008 R2; putting the data from the DB into a DataViewGrid and then exporting the data into Excel and saving
    the file on my C:\ drive. On the form I have two buttons; one that queries the DB and the other to do the export. The code below does work but I have two issues that I need assistance with:
    All of the SQL table data goes into Excel properly with the exception of it is missing the header row.
    After I click the Export button it takes a long time to create the Excel file. It takes between 2.5 and 3 minutes. It is not a big file (only 447 rows and 125 KB in size) so I don’t know why it takes so long. Does it have anything to do with the number
    of times Microsoft.Office.Interop.Excel is being referenced? I read somewhere online that is an old COM method although I’m not familiar with what a COM method is
    and why it would make things run so slow.
    When I click the button to run the SQL query and load the DataGridView it runs immediately.
    I plan on taking this project further such as adding date parameters including validation on the dates and then maybe adding buttons that can be used to insert, update and delete records. But I don’t want to go any further until the two issues mentioned
    above are resolved. Any assistance / guidance will be greatly appreciated. Here’s the code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using Exccel = Microsoft.Office.Interop.Excel;
    using System.IO;
    namespace Bills_DB_DataGridView
        public
    partial
    class
    Form1 :
    Form
    SqlCommand sqlCMD;
    SqlDataAdapter sqlDA;
            SqlCommandBuilder sqlCB;
    DataSet sqlDS;
    DataTable sqlDT;
    public Form1()
    InitializeComponent();           
    private
    void btnExit_Click(object sender,
    EventArgs e)
    this.Close();
    private
    void btnLoad_Click(object sender,
    EventArgs e)
    string sqlCon =
    "Data Source = localhost\\DAVE_DB; Initial Catalog=Bills;Integrated security = true;";
    string sqlQry =
    "SELECT * FROM Acct ORDER BY Name, PaymentDate";
    SqlConnection connection =
    new
    SqlConnection(sqlCon);
    connection.Open();
    sqlCMD = new
    SqlCommand(sqlQry, connection);
    sqlDA = new
    SqlDataAdapter(sqlCMD);
           sqlCB = new
    SqlCommandBuilder(sqlDA);
    sqlDS = new
    DataSet();
    sqlDA.Fill(sqlDS, "Acct");
    sqlDT = sqlDS.Tables["Acct"];
    connection.Close();
    dataGridView1.DataSource = sqlDS.Tables["Acct"];
                dataGridView1.SelectionMode =
    DataGridViewSelectionMode.FullRowSelect;
    private
    void btnExport_Click(object sender,
    EventArgs e)
    Microsoft.Office.Interop.Excel.Application xlApp;
    Microsoft.Office.Interop.Excel.Workbook xlWorkBook;
    Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet;
    object misValue = System.Reflection.Missing.Value;
    Int32 i, j;
    xlApp = new Microsoft.Office.Interop.Excel.Application();        
    xlWorkBook = xlApp.Workbooks.Add(misValue);
    xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);          
    for (i = 0; i <= dataGridView1.RowCount - 2; i++)
    for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
    xlWorkSheet.Cells[i + 1, j + 1] = dataGridView1[j, i].Value.ToString();
    xlWorkSheet.Cells[1, 2].EntireColumn.NumberFormat = "@";
    //Format column 2 to text
    xlWorkSheet.Cells[1, 2].HorizontalAlignment = Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignRight;
    xlWorkBook.SaveAs(@"c:\Bills\Bills.xls", Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal,
    misValue, misValue, misValue, misValue, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
    xlWorkBook.Close(true, misValue, misValue);
    xlApp.Quit();
    releaseObject(xlWorkSheet);
    releaseObject(xlWorkBook);
    releaseObject(xlApp);
    private
    void releaseObject(object obj)
    try
    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
    obj = null;
    catch (Exception ex)
    obj = null;
    MessageBox.Show("Exception Occured while releasing object "
    + ex.ToString());
    finally
    GC.Collect();
    Thank you,
    Dave
    David Young

    Hello again Kristin,
    I tried the code snippet to include the headers in the Excel file but it didn't work for me. Maybe I put the code in the wrong place? Again I have put the code below including where I placed the snippet. I get no error message and the application runs. Am
    I doing something wrong?
    Thank you,
    Dave
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using Exccel = Microsoft.Office.Interop.Excel;
    using System.IO;
    namespace Bills_DB_DataGridView
        public partial class Form1 : Form
            SqlCommand sqlCMD;
            SqlDataAdapter sqlDA;
            SqlCommandBuilder sqlCB;
            DataSet sqlDS;
            DataTable sqlDT;
            public Form1()
                InitializeComponent();            
            private void btnExit_Click(object sender, EventArgs e)
                this.Close();
            private void btnLoad_Click(object sender, EventArgs e)
                string sqlCon = "Data Source = localhost\\DAVE_DB; Initial Catalog=Bills;Integrated security = true;";
                string sqlQry = "SELECT * FROM Acct ORDER BY Name, PaymentDate";
                SqlConnection connection = new SqlConnection(sqlCon);
                connection.Open();
                sqlCMD = new SqlCommand(sqlQry, connection);
                sqlDA = new SqlDataAdapter(sqlCMD);
                sqlCB = new SqlCommandBuilder(sqlDA);
                sqlDS = new DataSet();
                sqlDA.Fill(sqlDS, "Acct");
                sqlDT = sqlDS.Tables["Acct"];
                connection.Close();
                dataGridView1.DataSource = sqlDS.Tables["Acct"];
                dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            private void btnExport_Click(object sender, EventArgs e)
                Microsoft.Office.Interop.Excel.Application xlApp;
                Microsoft.Office.Interop.Excel.Workbook xlWorkBook;
                Microsoft.Office.Interop.Excel.Worksheet xlWorkSheet;
                object misValue = System.Reflection.Missing.Value;
                Int32 i, j;
                xlApp = new Microsoft.Office.Interop.Excel.Application();         
                xlWorkBook = xlApp.Workbooks.Add(misValue);
                // storing header part in Excel
                xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);  
                for (int h = 1; h < dataGridView1.Columns.Count + 1; h++)
                    if (dataGridView1.Columns[h - 1].Visible)
                        xlWorkSheet.Cells[1, h] = dataGridView1.Columns[h - 1].HeaderText;
                xlWorkSheet = (Microsoft.Office.Interop.Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);           
                for (i = 0; i <= dataGridView1.RowCount - 2; i++)
                    for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
                        xlWorkSheet.Cells[i + 1, j + 1] = dataGridView1[j, i].Value.ToString();
                        xlWorkSheet.Cells[1, 2].EntireColumn.NumberFormat = "@"; //Format column 2 to text
                        xlWorkSheet.Cells[1, 2].HorizontalAlignment = Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignRight;
                xlWorkBook.SaveAs(@"c:\Bills\Bills.xls", Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive,
    misValue, misValue, misValue, misValue, misValue);
                xlWorkBook.Close(true, misValue, misValue);
                xlApp.Quit();
                releaseObject(xlWorkSheet);
                releaseObject(xlWorkBook);
                releaseObject(xlApp);
            private void releaseObject(object obj)
                try
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
                    obj = null;
                catch (Exception ex)
                    obj = null;
                    MessageBox.Show("Exception Occured while releasing object " + ex.ToString());
                finally
                    GC.Collect();
    David Young

  • Error while exporting ALV to excel?

    Hi Gurus,
    I'm stuck at a weird error.
    For a particular Z report, when I'm exporting ALV report through Menu List->Export->Spreadsheet, and then selecting "Star Office 8 Calc / OpenOffice.orf 2.0 Calc", what is happening is that, sometimes the ALV downloads, sometimes it gives a dump (INTERNAL_ERROR, i've attached the short dump) and sometimes it gives an error while opening the downloaded excel.
    This error comes in OpenOffice, but I'm also unable to open the file in MS Excel.
    I'm using  REUSE_ALV_FIELDCATALOG_MERGE for preparing fieldcatalog. Earlier the fieldcatalog was prepared manually, but still the error was coming.
    Any suggestions please?
    Thanks!
    Bhuvan Paliwal

    Hello Bhuvan.
    it is visible in your message that error occurs at row 2 and column 6290106.
    If you check in the below link, the limit of columns is Openoffice 2.0 is 256.
    OpenOffice Calc - Simple English Wikipedia, the free encyclopedia
    So I guess there is some problem during the export to Openoffice 2.0.
    Might be there is some delimiter problem which leads to increase in column size.
    Please check from this point of view.
    Regards,
    Thanga

  • How to export alv into excel sheet without using toolbar button

    hi,
    i have developed ALV using FM methord on that i have created one button when user will click on that button
    hole ALV should export in to excel as it is and that ALV is Heaving top of page contain also i want that shuld
    also copy please help me for that please send me the sample code for that
    Edited by: ankita khare on Nov 3, 2008 9:42 AM

    Check this:
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'C:/test.xls'
          filetype                = 'ASC'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_output
    Regards.

  • Export data to excel and table column headers

    I noticed that with LV 2012 when I call the method "Export Data to Excel" for a table, the table headers (= column names) are not exported to excel.
    Am I right? I think that the column names should be exported too...
    As a matter of fact when you call the method "Export to simplified image" the column names are included
    How can I export the table column names to excel?
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

    In this document there is a full description of how to export data from LabVIEW to Excel.
    Using a table, the method "Export data to excel" should export the "currently selected data", and data can be programmatically selected using ActiveCell property (as described here).
    With ActiveCell I can select the column headers too (using negative numbers for row and/or column), and I do this.
    And so I expect that when I select "Export data to Excel", the column headers should be exported too (because I selected them!).
    I think that the actual behavior is a bug, rather that an expected behavior.
    Don't you agree?
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

  • How to export report to excel and to text file in previewer

    How to export report to excel?
    And, it takes long time for generate report to rtf or pdf file in previewer.
    How to speed up the process? or, it's better generate report to text file directly by Run_product?
    Please help!

    You can generate report to tab delimite format that can be imported to excel.
    As for the performance question, because reports can't specify what format when you run against previewer, so I don't know what previewer you are talking about. Generate to file is always faster than to your application previewer (assume) because you have one more step after output generated in the file: read from file and render it. Depends on the render and size of the output, it may have significant performance difference.
    Thanks,
    -Shaun

  • Exporting ALV to Excel

    Hi,
    I have a report in ALV and my problem is that the columns in Excel are in different sequence to the report if the Export->Spreadsheet route is taken.
    However, If i do it as Export->local file the columns in Excel appear in the same sequence as in report.
    Can any one explain me how to get the same sequence of columns via the Export->Spreadsheet also.
    Regards.

    instead of dat try doin dis..
    After ALV is displayed..press CtrlShiftF7
    ull b able 2 see the ALV in Spreadsheet n den u can save it..
    Hope dis helps..

  • Changing layout of ALV to excel and displaying the data there

    Dear All,
    My requirement is that I have to develop an ALV report, and also plot the graphs for the same.
    I need different types of graphs, so I have searched on SDN, and I found out a blg:-
    "Report with a Graph.. An Approach!"
    Here is what the person has done:-
    I developed a simple ABAP report using ALV and just dumped all my data on it.
    After this I downloaded the Standard Excel template available in the ALV.
    Defined my own worksheets in this template, wrote some macros to pick up the data from the “RawHeader” sheet, which is available by default and will contain the ALV data.
    I inserted 1 chart in this Excel template. In this chart I used the same chart type as was being used by the user for his graph. Just right clicked on the Graph area and made the changes in the source data and made it point to the sheet containing the final data.
    That’s it my job is almost done.
    After this uploaded this template back into the report output through
    the layout settings->Change Layout Tab.
    Save it as a variant and made it a default. (Do not default it if you have more than 1 user and more than 1 template…. Select the appropriate variant for the appropriate user and then display)
    Well, this also was not that easy as I had thought. I landed up into 1 trouble.
    In my report the number of columns displayed was not constant and kept changing based on the input. This fact was taken care by designing a variable field catalogue. But now I had gone past the simple ALV display and was giving the output in an Excel sheet using a pre-defined template. Well, I immediately found a solution to this with the set_frontend_fieldcatalogue method of CL_GUI_ALV_GRID class and fixed the field catalogue every time after calling the set_table_for_first_display method. This solved most of my problems, which were not many though.
    Now here are my issues:-
    I have developed the ALV report, and I have also changed the layout to excel.
    But, I am unable to get the ALV Report data in the RawHeader Sheet, which is available by default.
    Could anyone please guide me through this method??
    It is urgent.
    Points are assured for helpful answers.
    Thanks and regards,
    Prerna

    Hi Satya Priya,
    Do I have to create my own template, or the Standard ones available will do?
    HEre is what I do:-
    Once I get my ALV output, I goto Change LAyout->View tab.->Prefered view->Microsoft Excel.
    Here I get a list of available excel templates There are 2:-
    sap_mm.xls, and sap_om.xls
    I select one of these, and the excel spreadsheet is displayed on the ALV screen.
    But the re is another button, "Upload Document to BDS".
    Do I have to upload one of the above templated to BDS?
    And please tell me in detail, what is BDS???
    Thanks for your help, and waiting for reply,
    Prerna

  • Exporting ALV to excel(including row colors)

    Hai All,
        I have an ALV which contains column color.I wnt to export to excel including the colors .Is it possible???
    If yes, kindly let me know how to do that.
    Thanks & Regards,
    Kiran I

    hi
    try these links
    http://help.sap.com/saphelp_erp2005/helpdata/en/e3/41a138c4397a42e10000009b38f842/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/7d/fe9f638af411d3805e00c04f99fbf0/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/6f/31dfd4ac4ed84189a25d8e01f14af3/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/9f/53065cb77a364aa025a12a0af37c6e/frameset.htm
    regards
    Arun
    Message was edited by: arun a v

  • Export ALV to excel automatically???

    hi experts.
    i want to run my ALV report on daily shedule basis like 11:00 in night in background.now i want to also save it automatically after completion of background job..
    how can i save my ALV list to excel automatically on daily basis.????

    Hi,
    GUI_DOWNLOAD doesn't work in background use dataset. Refer below code.
    *--Local Variables
      DATA : l_erfile TYPE string.
    *--Clear file
      CLEAR : l_erfile.
      l_erfile = p_aefile.
    *--Open dataset for output mode to transfer the error log
      OPEN DATASET l_erfile FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc EQ c_ok.
        IF NOT it_erfile[] IS INITIAL.
          LOOP AT it_erfile INTO st_erfile.
            TRANSFER st_erfile TO l_erfile.
                 CLEAR : st_erfile.
          ENDLOOP.
    *--Error Log downloaded on given path
          MESSAGE i000 WITH text-005.
        ELSE.
    *--Legacy Data Created Successfully
          MESSAGE i000 WITH text-004.
        ENDIF.
      ENDIF.
    Regards,
    Prashant

  • Export alv to excl and send it via email

    Hi.
    My problem is not really to send an alv with xls format, the issue is that in the selection screen the user can enter a variant layout to generate the alv, so he wants the sent xls with the same layout.
    As of now, I was calling FM SO_NEW_DOCUMENT_ATT_SEND_API1 but creating the xls file using my internal table (including all fields, and without subtotals).
    Is it possible generate a xls with the same layout that user has entered?
    Thanks

    Hi Alberto,
    Are you trying to download the ALV after displaying, maybe by using a button ? Then you can try with method EXPORT_TO_SPREAD_SHEET of CL_GUI_ALV_GRID.
    And for FM you can use ALV_DATA_EXPORT.
    If you are trying to download before displaying the ALV grid then i think you might have to send the complete ALV list to XLS attachment in mail.
    Regards
    Megha

Maybe you are looking for