Header of ALV with space when exported to excel using Standard ALV

Hi,
I am Using Reuse alv grid display    to dispaly my report and it works fine and I am using the standard SAP application tool to export it to excel.
But for some of the header fields I am getting space in the excel sheet but there is no space while displaying through ALV.
I am using the following field catalog for the same.
wa_fieldcat-col_pos = 10.
  wa_fieldcat-fieldname = 'SOLLWERT'.
  wa_fieldcat-seltext_l  = 'text-t10'.      "Target value (* this has no space here)
  wa_fieldcat-outputlen = 32.
wa_fieldcat-colwidth_optimize = 'X'.
  APPEND wa_fieldcat to it_fieldcat.
but there are still space for this Colomn when exported to excel if after optimizing the column.
kindly suggest what field needs to be passed to the field catalogoe to avoid spaces in excel for the header.
Thanks
Ritesh

hey all,
Thanks everyone for the reply.
I am using the foloowing field cat:
l_col_pos = l_col_pos + 1.
    wa_fieldcat-col_pos = l_col_pos.
    wa_fieldcat-outputlen = 32.            
     wa_fieldcat-fieldname = 'SOLLWERT'.
     wa_fieldcat-inttype   = 'P'.             
*    wa_fieldcat-tabname = 'i_final'.      
    wa_fieldcat-seltext_l = text-t11.         "Target Value
    APPEND wa_fieldcat TO i_fieldcat.
    CLEAR wa_fieldcat.
I have use this also in the field cat but stil i get space in the excel header.
wa_fieldcat-REF_FIELDNAME = 'SOLLWERT'.
*    wa_fieldcat-REF_TABNAME =  'QAMV'.
Also the space comes with the descrip[tion in the cell of excel.
its like [space Target Value] and i dont need this Space.
I have also used  wa_layout-colwidth_optimize = 'X'. but it doesnt wrk.
Please suggest

Similar Messages

  • Reports output delayed when exported to Excel using OLE2

    Hi All,
    Platform - Oracle Application Server 10g Release 2 10.1.2.3 on Windows 32 bit.
    The report output is getting generated in a minute when exported to PDF i.e destype=cache & desformat=pdf. When we generate the output to excel is considerably delayed. It is taking time and internal server error is occuring.
    1) Report developed with simple query
    2) Used RPT2XLS procedure which uses OLE2 builtin to export report output into excel.
    3) Called RPT2XLS.run procedure in After-Report trigger of the report.
    4) We have relased all memory objects in the RPT2XLS package after exporting data and there is no EXCEL.exe running once the file is generated.
    System parameters used in the URL.
    . destype=file
    desformat=pdf
    CONTAINSOLE=yes (Required for exporting OLE2 objects into Excel in report)
    desname=path & name of the file.
    I have gone through the tuning documents for reports server and increased minengine, maxengine and initengine parameters of the reports engine and also changed maxconnect and IdleTimeout parameters in reports server configuration file.
    What might be the reason for delaying in the output of the reports when exported to Excel. Can the guys with special knowledge on this area help us in getting out of this issue.
    Thanks in advance.

    hey all,
    Thanks everyone for the reply.
    I am using the foloowing field cat:
    l_col_pos = l_col_pos + 1.
        wa_fieldcat-col_pos = l_col_pos.
        wa_fieldcat-outputlen = 32.            
         wa_fieldcat-fieldname = 'SOLLWERT'.
         wa_fieldcat-inttype   = 'P'.             
    *    wa_fieldcat-tabname = 'i_final'.      
        wa_fieldcat-seltext_l = text-t11.         "Target Value
        APPEND wa_fieldcat TO i_fieldcat.
        CLEAR wa_fieldcat.
    I have use this also in the field cat but stil i get space in the excel header.
    wa_fieldcat-REF_FIELDNAME = 'SOLLWERT'.
    *    wa_fieldcat-REF_TABNAME =  'QAMV'.
    Also the space comes with the descrip[tion in the cell of excel.
    its like [space Target Value] and i dont need this Space.
    I have also used  wa_layout-colwidth_optimize = 'X'. but it doesnt wrk.
    Please suggest

  • ALV cell translation when exporting to excel

    Hi,
    I am displaying an ALV with first column as traffic signal. When I export the ALV data to excel, nothing is displayed under traffic signal column.
    My question is: When we are exporting ALV to Excel, can we substitute text for either red or yellow or green traffic signals?
    For example:
    If my first row in ALV is displaying traffic Red signal then when we export that to excel, in place of traffic Red Signal text 'NO' should be displayed.
    If my second row in ALV is displaying traffic green signal then when we export that to excel, in place of traffic green Signal text 'YES' should be displayed.
    Thanks in advance.

    Hi
       I think we can't customize the SAP provided functionality to download in Excel from ALV grid.
       Instead, we can create a button in application toolbar and we can add our customizing code when the
       button is clicked, under user_command coding part.
       For each icon (for traffic signal also), there will be four char code (like @OC@) in the ICON type pool.
       In your code (for button in application toolbar), you have to check the value (for four char code) and
       you can provide value (like NO) for that traffic signal (like RED).
       But, in this method you have to take care about the data download from ALV grid to EXCEL.
    Satya.

  • ALV with colored cell exporting to Excel

    Hi all,
    I have an ALV-Table in my webdynpro appliation. There are some dropdownbykey fields in the alv and some cells are colored.
    After export to excel the colored cells are no more colored.
    Is there a possibility to export the color too.
    Best regards
    Marcus

    Have you found a solution to this issue? I am searching for the same.

  • Problem with comments when exporting to Excel

    Hi:
    When opening an exported Numbers file in excel it is showing all the comments opened in fornt of the chart. They can't be closed, have to be deleted one by one.
    Please take a look at this image: http://gallery.me.com/robbyralston#100124&view=grid&bgcolor=black&sel=0
    Any one knows how to avoid this issue?
    Thanks for any help.

    Hello Barry.
    You just did what I wrote yesterdays:
    So, I don't know what we may do for you except tell you to *_hide comments before exporting._*
    In such case, as you saw, the imported document display the flags showing which cells are commented but the comments aren't displayed.
    Numbers offer a menu item to hide every comments in a single call.
    Office doesn't.
    Yvan KOENIG (VALLAURIS, France) lundi 8 novembre 2010 09:25:37

  • Error with Crystal 2008 Exporting MS Excel using ReportExportFormat.MSExcel

    Hi
    </br>
    </br>
    I am using the sample code that comes with the Eclipse plug-in. I have modified it slightly to also write to different formats and then display in the viewer. I am able to write to all formats except to the MSExcel (MSExcel data only works without issue)
    </br>
    </br>
    <p>
    I am using the following code (this is just proof of concept code)</br>
                    //jtds connection and database logon setup already</br>
                    //report parameters etc setup already</br>
                    try</br>
                    {</br>
                         String file_name = reportClientDocument.displayName() + System.currentTimeMillis();</br>
                          file_name = file_name + ".xls";</br>
                          String location = "c:
    temp
    ";</br>
                          FileOutputStream fos = new FileOutputStream(location + file_name);</br>
                          </br>
                          ByteArrayInputStream byteArrayInputStream;</br>
    </br>
                          byteArrayInputStream = (ByteArrayInputStream) reportClientDocument</br>
                                  .getPrintOutputController().export(ReportExportFormat.MSExcel);</br>
    </br>
                          byte[] byteArray = new byte[1024];</br>
                          int bytesRead;</br>
                          while((bytesRead = byteArrayInputStream.read(byteArray)) != -1) </br>
                          {</br>
                               fos.write(byteArray, 0, bytesRead);     </br>
                          }</br>
    </br>
                          fos.flush();</br>
                          fos.close();</br>
                          setReportSource ();</br>
                    }</br>
    </p>
    </br>
    <p>
    Console/Error Output:
    Crystal Reports Viewer 12.0.0.0
    java.vendor = Sun Microsystems Inc.
    java.version = 1.5.0
    os.name = Windows XP
    os.version = 5.1
    os.arch = x86
    log4j:WARN No appenders could be found for logger (com.crystaldecisions.reports.formatter.formatter.lightmodel.cellmodel.FCMCellModel).
    log4j:WARN Please initialize the log4j system properly.
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: IllegalArgumentExceptionWithMessage---- Error code:-2147467259 Error code name:failed
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:237)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111)
         at com.businessobjects.samples.SampleViewerFrame.showReport(SampleViewerFrame.java:145)
         at com.businessobjects.samples.SampleViewerFrame.showViewer(SampleViewerFrame.java:98)
         at com.businessobjects.samples.SampleViewerFrameClient.main(SampleViewerFrameClient.java:17)
    Caused by: com.crystaldecisions.reports.common.GeneralException: IllegalArgumentExceptionWithMessage
         at com.crystaldecisions.reports.exporters.excel.libs.escher.p.<init>(SourceFile:149)
         at com.crystaldecisions.reports.exporters.excel.libs.escher.BlipChecksumGenerator.a(SourceFile:47)
         at com.crystaldecisions.reports.exporters.excel.libs.escher.ad.a(SourceFile:93)
         at com.crystaldecisions.reports.exporters.excel.libs.escher.af.a(SourceFile:186)
         at com.crystaldecisions.reports.exporters.excel.libs.escher.EscherDocumentForExcel.a(SourceFile:119)
         at com.crystaldecisions.reports.exporters.excel.libs.escher.EscherDrawingSheetForExcel.a(SourceFile:283)
         at com.crystaldecisions.reports.exporters.excel.libs.biff.xlsDOM.ExcelWorksheet.a(SourceFile:251)
         at com.crystaldecisions.reports.exporters.excel.formatter.cm.ExcelCMGraphicsObjectFormatter.a(SourceFile:167)
         at com.crystaldecisions.reports.exporters.excel.formatter.Excel97ExportFormatter.a(SourceFile:193)
         at com.crystaldecisions.reports.exporters.excel.formatter.Excel97ExportFormatter.a(SourceFile:169)
         at com.crystaldecisions.reports.exporters.excel.formatter.Excel97ExportFormatter.a(SourceFile:110)
         at com.crystaldecisions.reports.exporters.excel.Excel97Exporter.processFormattedContent(SourceFile:213)
         at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:104)
         at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:247)
         at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:642)
         at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:586)
         at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:636)
         at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1944)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)
         at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)
         at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
         at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
         at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
         at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:223)
         ... 6 more
    Any help will be greatly appreciated, this seems as if its a bug though.
    </p>
    Edited by: Kabir Bray on Nov 2, 2010 4:26 PM

    I know this has been marked as answered, but I would just like to mention when designing reports for Excel output, the key thing
    to remember is the design and layout of your report. You have to work on a strict grid layout concept, and make sure all items are
    lined up 100% else columns or rows are inserted in strange places, making the output look very ugly. But if you can line everything
    up nicely then I believe any report that can be displayed in Excel.
    Keeping in mind that if the report is to be output as Excel the whole design and logic must be geared for this, so page headers
    and footers are no longer relevant, in fact the whole "page" concept must be ignored when working with Excel as there are
    no pages in a spreadsheet application like Excel.
    That all being said, I dont know what your reports are about and am not saying they are not too complex for Excel,
    just wanted to make a note so that people dont think Excel output using CR4E is a bad option.

  • Missing report header when exporting to Excel

    When exporting to Excel from an ASP.NET application (Visual Studio 2003), some reports do not include the report header section.  The reports headers are there when exporting to PDF.
    I cannot see any obvious difference between the reports that export the report header and those that do not.  I believe that I have the latest service pack.

    I am using Microsoft Development Environment 2003 Version 7.1.6030.  The About Box only says Crystal Reports for Visual Studio .NET.  It does not show a version number.
    I have not been able to find any information regarding ExportHeaderAndFooter or even ExportHeader.  They do not appear to be options in this version of Crystal.
    I have tried reducing the report header to a simple text object that works OK on another report but it will still not export on this one.  The report footer does export OK though.

  • Help me, I have a problem with font when export report to PDF?

    Hi everyone! Help me
    I have a problem with font when export report to PDF
    My report uses template .rtf with font Times New Roman (Unicode), language is VietNamese.
    when desige template no problem, error only happen when view report by PDF.
    Edited by: user10236405 on Oct 15, 2008 11:23 PM

    give it time to boot. the time depends on yr memory size n data. soon a process bar will appear indicating the boot process. if still this doesnt work. try formating the phone. but this ways u lose all data on the phone (unless u backed it). relax! the data on the memory card is safe.

  • Lost collapsing columns when export to excel

    I have created a report with row grouping, works correctly working in Report Server Browser, 
    after export the report to excel, when clicking on the + in Excel only 1 or 2 of about 100 lines appears, or there is no + head to click for other groups
    a similar report works when exported to excel.
    any solution what to do or whats possibly wrong?
    thank you

    Hi Karl,
    According to your description that you are experiencing the issue when you export the report to excel, drill down report not display all the fields after expand the "+"and some group which should have "+" not shown, right?
    I have tested on my local environment and can’t reproduce the issue, the issue can be caused by the incorrect setting of the visibility and also can be related to the excel rendering.
    Microsoft Excel has limitations with how it manages hidden and displayed report items when they are exported. Groups, rows, and columns that contain report items that can be toggled are rendered as Excel outlines. Excel creates outlines that expand and collapse
    rows and columns across the entire row or column which can cause the collapse of report items that are not intended to be collapsed. In addition, Excel's outlining symbols can become cluttered with overlapping outlines. To address these issues, the following
    outlining rules are applied when using the Excel rendering extension:
    The report item in the top-left corner that can be toggled can continue to be toggled in Excel. Report items that can be toggled and share vertical or horizontal space with the report item that can be toggled in the top-left corner cannot be toggled in
    Excel.
    To determine whether a data region will be collapsible by rows or columns, the position of the report item that controls the toggling and the position of the report item that is toggled are determined. If the item controlling the toggling appears before
    the item to be toggled, the item is collapsible by rows. Otherwise, the item is collapsible by columns. If the item controlling the toggling appears beside and above the area to be toggled equally, the item is rendered with row collapsible by rows.
    To determine where the subtotals are placed in the rendered report, the rendering extension examines the first instance of a dynamic member. If a peer static member appears immediately above it, the dynamic member is assumed to be the subtotals. Outlines
    are set to indicate that this is summary data. If there are no static siblings of a dynamic member, the first instance of the instance is the subtotal.
    Due to an Excel limitation, outlines can be nested up to 7 levels only.
    Article about the show and hide in the excel for your reference:
    http://msdn.microsoft.com/en-us/library/dd255234.aspx
    Thanks for your understanding.
    Regards
    Vicky Liu

  • Formatting lost when exported to excel

    When I export a worksheet results to excel the formatting is being lost like in my worksheet I wanted a line and space for every grouped item which is lost in excel sheet. Is there a way get around for this ?
    Thanks

    Not exactly sure what formatting you're having a problem with, but I'll list some of the points I can think of, of exporting to Excel and will hopefully cover it. I believe you may be referring to point 1 below, but just in case ...
    1. If you have group sort on for a column or more, then when exported to Excel, you won't have those 'blank' values for the column(s) that's grouped. That's why when you know someone will be exporting to Excel, it's a pain as all group sorts are usually taken back off (which can screw up exactly what you're trying to point out in the workbook).
    2. If you have a page -> item (ie: lots of values you pull down like a LOV), then I believe, that you won't get an Excel worksheet for each value in the LOV but only for the one currently displayed when you performed the File -> Export.
    3. When you export to Excel, you only get actual values, no functions of how it was calculated (ie: it'll be static, not dynamic).
    4. You can export to Excel using Plus and might not get the formatting characteristics you want in Excel. I've seen users specifically bring up Viewer just to get the formatting characteristics (colors, fonts, etc.) when they export from that Disco version.
    5. Sometimes when you export from Disco to Excel, that actual value that gets posted in Excel is different. I know ... it sounds wierd, but it's a fact. The problem is NOT Disco, but is a problem with Windows and a setting has to be altered (although I'd have to hunt what that setting is now though). However, I've only seen this happen a few times, so definitely not the norm.
    Russ

  • REUSE_ALV_GRID_DISPLAY, columns reorder when exporting to Excel

    I have a variable column output and am using "cl_alv_table_create=>create_dynamic_table" to create the field-symbol output table with correct number of columns in the exact order of the field catalog.  The field formatting also matches from the dynamic table to the field catalog.
    I call REUSE_ALV_GRID_DISPLAY with the parameter t_outtab  = <dyn_table>.
    When I execute my program, the ALV grid displays correctly in SAP.
    When I export to Excel using &XXL icon from the toolbar, the resulting Excel table has reordered some columns.
    The first columns are highlighted in yellow as though they are key fields and other columns with no background color have been bumped to the end of the row.
    I do not have any key fields defined in the field-catalog. 
    Any suggestions?

    I have a structure in the data dictionary.
    I call REUSE_ALV_FIELDCATALOG_MERGE with that structure.
    There are 150 fields in the structure.
    I loop through the fields the user has picked to include in the report and delete those from the field catalog that are not used.
    I only keep the fields in the field catalog that are being used in the report.
    I then use the reduced field catalog to create the dynamic table so the field catalog matches the output table - field for field.
    The datatypes also match between the dynamic table and the field catalog.  (char, dats, numc)

  • Merge columns when exporting to excel data only

    Hi,
    I have a report with headers in fowling format.
             Quantity         |
    first day   |  last day |
    When exporting to excel data only I want output in following format and want to merge upper header cells.
    Quantity
    First Day
    Last Day
    Please reply.Thanks.

    Hi,
    You can achieve this requirement Please follow the below document.
    How to WYSIWYG SAP Crystal Reports Export to XLS
    I hope this is the best formatting example suited for this requirement.
    Ludek thanks for preparing this document and sharing with us......This is the best formatting ex.
    Refer Link: Crystal Reports Crystal to Excel
    Thanks,
    DJ

  • SSRS 2012 Conditional Formatting Color Issues When Exporting to Excel

    Hi all,
    We recently upgraded to SQL 2012 from SQL2008 R2. I'm having a strange issue with SSRS2012.
    One of the report has conditional formattings on cell background colors. Everything works fine when render the report in browser or preview mode. However, the conditional formatting stop working when export the report to Excel (no issues if
    export to pdf). All cells are high-lightened with pre-defined color although it should only high-lighten those cells that fulfil the condition.
    Has someone encountered this issue before ? Thanks for any help.

    Hi ZZ02,
    I have test the scenario in my testing environment, however, everything goes well when exporting to Excel format. The issue might be related to the expression for the conditional background color. To make further analysis, please post the expression as well
    as the report design structure.
    Additionally, in SQL Server 2012 Reporting Services, the Excel rendering extension renders a report to the native format of Microsoft Excel 2007-2010, the format of which is ExcelOpenXML. By default, the previous version of the Excel rendering extension,
    compatible with Microsoft Excel 2003, is disabled. At this time, I suggest that you enable the Excel 2003 rendering extension by modifying the RSReportServer.config file. After that, the Excel 2003 rendering format will be available on report manager (not
    available in Report Designer). So, please export the report from report manager and check the result again.
    For more information about enable the Excel 2003 rendering extension, please see:
    http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/0713de27-dcc0-4e51-81ac-5272647d171f
    Regards,
    Mike Yin
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here. 
    Mike Yin
    TechNet Community Support

  • A single table line generating more than 2 lines when exporting to Excel

    Guys,
    I do have an interactive report on apex with a varchar2(4000) column that is generating more than 1 excel row per table row. In another words:
    Table my_report
    file_id number,
    file_comment varchar2(4000)
    Query on report
    select file_id, file_comment from my_report
    It generates 5 lines on report screen but, when I export to excel using csv or xls format, it generates more than 5 lines. On file_comments field on excel, some of them has a break in 2 or 3 lines. Seems to me a line feed problem with CHR(13) or chr(10).
    Anyone as a solution or a similar problem like this? Any idea?
    Andre.

    you could try to remove the linebreaks in the select.
    select file_id, file_comment, replace(replace(file_comment,CHR(13)),CHR(10)) file_comment_nobreak
    from my_reportThen depending on the type of report you could show one column, but export the other column in the excel/csv file. Not sure if this works with an interactive report too.

  • Does not display axis label in graph when exported to excel

    I have a wierd issue.I have a report with graph with coloum chart and axis labels description on x axis.WHen i export the report to PDF everything looks OK.But when i export it to excel few axis labels disapper.Out of 12 labels only 2 apper when exported to excel.Has anyone encountered this issue.
    If so is there a way to fix this.
    PS: I am using BO XI 3.1 Webi.
    Thank you,
    Sanjeev

    hi,
    I have tried this out with a sample.
    In WEBI preview mode and PDF, all axis labels will appear fine.
    But when exported to excel, some labels will disappear.
    Workaround: We have to increase the chart size in Excel till all axis labels appear clearly.
    Regards,
    Vamsee

Maybe you are looking for

  • About the Grouping in the Collected Window????

    Hi Experts, I read the course BW360, in the 'Grouping' chapter, there is an description listed below: =================================== If the user chooses 'In data flow before' the BW system collects the DataSources in the source system. In the so

  • Offline pda usage for ipod touch

    so I want to buy this for my wife and I did a quick test drive at the store but want to know more. 1) If I sync a google calendar through ical to my ipod, will that data be available to look up when it's offline (no internet)? EX: i sync in the morni

  • How no.of records can be filtered out?

    Hi all,          For Quality so many records are coming?I want to filter some of records.How can I filter the records.Please give me if any example is there.I dont need that many records plz suggest me how can i do this one. If any ABAP code is need

  • MDX result contains too many cells - NUMC 6

    Hi to all. I'm using I bex query in order to retrieve the field to my universe. I know that when there is an element defined as NUMC (6), some errors may occurs into the MDX extraction (e.g.  MDX result contains too many cells (more than 1 million)).

  • HT3529 How can I get dictation for my iPad for use with email and messaging

    How can I get dictation to use with messaging and email?