Download excel with formula from alv grid

I developed a alv report and I have one percentage field(say PER) in the grid.When I sum on that field PER then it comes in my formula basis.Suppose If I have 5 line items and all PER field have a value 2 then when I sum in PER column then it come 7 inseted of 10 becoze of my formula basis and it comes perfect.But my query is when I download to excel then it comes real value 10 insted of 7. here my formula basis sum which is 7 for all 5 line items is not comming. Can any body help me how will it come?
Thanks,
Rakesh

Hi,
I dont think its possible because... it uses its internal functionality in displaying the alv with the formula you have given.... but while downloading it only considers the internal table that will be downloaded so whatever is there in the internal table that only would be downloaded... you can do one thing..... instead of using a sort standard button include your own sort button and write its code for gui_download and in the internal table append a line which contains the formula you wanted that will work....
Regards,
Siddarth

Similar Messages

  • Excel in place from AlV GRID

    Hello,
    i am displaying an ALV Grid by using "REUSE_ALV_GRID_DISPLAY". When I switch to Excel inplace display for the result list only 202 rows are displayed in excel. (in alv list there are 1376). When i switch back to alv list all are shown again. Has anyone an idea about ? I guess there is a parameter who limits it for excel.
    Kind Regards
    Joachim Bertram

    Hi,
    There is a Macro Security setting "Trust Access to Visual Basic Project" which needs to be turned on within Excel in order to get any rows in the Excel inplace from your ALV, but since you are getting a subset of rows I doubt this is your issue. 
    Judging from the number of SAP Notes updated in the year 2008, it would seem to me that the Excel integration is still very much an ongoing work-in-progress.  Unfortunately, I couldn't find any other Notes that specifically talk about missing only some rows (other than the ones that cover the ALL rows missing problem). 
    You may want to check with your Basis team to determine if there is some sort of setting that is limiting the number of rows being transferred.  From what you describe, though, I'd be very surprised if a setting like this (if it even exists) would be set to such a small number of Excel rows.  You might also want to check with them to find out if there is a max number of bytes allowed for Excel inplace transfers.  If so, and if you have a lot of columns, then this might be a factor.
    Which versions of Office/Excel and SAPGUI are you using?  This is important because, as [Note 722513|https://service.sap.com/sap/support/notes/722513] explains in detail, only certain combinations of MS Office, SAPGUI and SAP Basis are supported.  If you can exclude the support issue as a factor then there is a chance that the issue you described in you original message may actually be a new problem that has not been addressed by SAP yet.  After all, how and why do you suppose all of the dozens of existing Notes regarding ALV and Office integration got created in the first place?  Some customer had to discover the problem and report it to SAP. 
    One final suggestion I can make is that you should have someone confirm that Note 756623 has been applied correctly in your system.  Even though the support pack SAPKB62061 should have this Note, it never hurts to check the Note implementation line-by-line just in case (especially in a case like this in which the note seems to match your symptoms so closely).
    Best Regards,
    Jamie

  • Downloads from ALV GRID-Text conversion to dates in EXCEL

    When downloading table displays of data from ALV-GRID for excel spreadsheet, we end of with files that have a header and various line ifnromation.  IF we manually clear up the display, then we can have the individicual column headers used and force them to text but if we just call the file up as an EXCEL spreadsheet, some part numbers such 12-3465 appear in Excel as Dec-65.
    The following is an example of the record (but it is word wrapped within this display limit).  In actuality, the verbage enclosed with the <b> represent the start of the  lines that have actual display data running out about 90 characters.
    Suggestions on how to make the download immediately correct in Excel direct from SAP ALV-GRID without cleaning out the heading lines and manually forcing the affected columns to TEXT format?
    thanks
    <b>03/02/2007</b>                                                                    Dynamic List Display                                                                                1
    <b>Materials-Inforecord Details Report</b>
    <b>Purchasing Org: ILMO</b>
                        <b>Report Run Date:03/02/2007</b>                    <b>Report Time:14:31:16</b>
         <b>Plnt     Mat Grp     Vendor     Name 1     Material     Material</b> description     Vendor Cat     Mfr     MPN     PC     Item Chg.     OUn      Eq to     BUn     Net price     Per     OPUn     Inforecord     PGr     Mv Avg        per     ValCl
         <b>0042     04     106070     BURROWS COMPANY</b>     184110     Glv Exam Ltx Non Ster     02-5001     TILLOTSON     02-5001               CA     2,000     EA        93.40      1     CA     5300006999     999     93.40     2,000     6438

    there are different options to export to excel which all behave differently, if you go for the menu ->export it differs from the export button from the alv buttonbar.
    try the different export to excel options perhaps there is one that behaves the way you want
    kind regards
    arthur de smidt

  • Taking download into excel from ALV Grid - header is printing in two lines

    Hi All,
    I have a scenario where I am taking the download from ALV grid to an excel sheet. Now the header of the ALV (column names) is appearing in two lines in the downloaded excel sheet while items (records of the ALV table) are getting displayed in a single line.
    This download is taken from the standard download to local file (spreadsheet) button provided by SAP for ALVs.
    I am using function module "Reuse_alv_grid_display" for the purpose.
    Can somebody provide an idea how I can avoid the header printing in two lines and keep the length as it is.
    Thanks in Advance,
    Chandan

    Hi..
    1. Pass header name in internal table appned first line.
    2. after that pass u r data .
    3. Use  FM. WS_DOWNLOAD 
    Salil ......
    Edited by: salil chavan on Nov 26, 2008 11:07 AM

  • Facing a Problem while downloading the data from ALV Grid to Excel Sheet

    Hi Friends,
    Iam facing a problem while downloading the data from ALV Grid to excel sheet. This is working fine in Development server , when comes to Quality and Production servers I have this trouble.
       I have nearly 11 fields in ALV Grid and out of which one is PO number of length 10 , all the ten numbers are visible in the excel sheet if we download it from development server but when we download it from Quality or Production it is showing only 9 numbers.
    Can any one help me out in this case.

    hi...
    if this problems happens dont display the same internal as u finally got.
    just create new internal table without calling any standard data elements and domains... but the new internal table s similar like ur final internal table and move all the values to new int table.
    for eg.
    ur final internal int table for disp,
         data : begin of itab occur 0,
                        matnr like mara-matnr,
                   end of itab.
    create new like this,
               data : begin of itab occur 0,
                        matnr(12) type N,
                   end of itab.

  • Download from ALV grid to PDF format

    hai Friends!
       plz tell me how can i download from ALV grid to PDF format..
    send me some sample codes

    check this thread
    ALV Grid to PDF
    and do use the search functionality from next time and post the question only wheb u dont find the answer
    кu03B1ятu03B9к

  • Leading Zeros Missing - When exporting data from ALV grid display to Excel

    Hi,
    Am exporting the data from ALV GRID DISPLAY to Excel sheet using standard toolbar icon 'Local file'
    the leading zeros displayed in the ALV output is missing in the EXCEL sheet.
    (eg)  in ALV o/p - 0029. 
            in Excel - Only 29 is appearing.
    As per the requiement i have to show the leading zeros in excel also.
    Pls help on this issue.
    Thanks in advance..

    Hi ,
      Please set the property  :
      wa_fieldcat-lzero = 'X' .
    when you are creating field catalog for display alv data .
    your prob will solved .
    Regards ,
    Nilesh Jain

  • CL_SALV_BS_TT_RESULT_TABLE====CP error while downloading data from ALV grid

    Hi ,
    I am  facing a problem when ever i am going to donload data from ALV grid to excel file.I am getting CL_SALV_BS_TT_RESULT_TABLE====CP error in GET_CELL_VALUE. Could you please provide me is there any OSS note or any patch required to solve this issue.
    Thanks in Advance,
    Venkatarao.

    Hi,
    Just refer to OSS note 1356898 for guidelines.
    Regards,
    Vasanth

  • Printing from ALV Grid

    Hi Friends,
    I am facing a problem while printing a report from ALV grid .. The report display is coming perfectly based on the SORT criteria .. but while trying  to print or print preview or Download to  Excel  the sorting is not working .. If any one know how to print the report as it look like the  screen display ..Please let me know..
    Thanks in advance..
    Regards.
    Elango

    Hi Vinni,
    Thanks for your repaly , I am using 4.7.
    Function module used to display grid is  REUSE_ALV_GRID_DISPLAY and for  
    build the field catlog  I am using REUSE_ALV_FIELDCATALOG_MERGE 
    function module .
    Regards,
    Elango

  • Export TO XXL from ALV Grid - Column order mismatch

    Hi All,
    The user is trying to download data from Option -> Export -> Spreadsheet which will create XXL.
    But while downloading there is mismatch in the order of columns displayed on the alv grid & columns downloaded.
    All character fields are displayed on left, then date fields then quantity fields are downloaded to XXL. but in ALV Grid user has chosen a layout in which date fields come first.
    Please help me to find solution

    Grid display using    'REUSE_ALV_GRID_DISPLAY'. From the alv grid output, user is trying to download data using export -> Excel . so for download there is no custom code.
    We have copied standard report and added few more fields to the custom report. strangely Standard report also has this issue.
    I searched for SAP notes also..no clue

  • Download only selected record from ALV

    Hi
      I want to download only selected records from ALV output with button.
    i hav to fix the button on ALV screen using &ZDL whenever user presses the button record should be downloaded.
    Pl with coding
    its very very urgent.

    Hi ,
    i dont have the exact code which suits to your requirement
    but declare the internal table
    like
    data: begin of itab occurs 0,
      check type c,
    fields
    end of itab.
    while filling the field catalog
    fieldcatalog-checkbox = 'X'
    for this check field.
    and display the grid
    now write this subroutine
    *&      Form  USER_COMMAND
          Called from within the ALV processes. Currently, '&IC1' is used
          to process the hotspot and display the document 'picked' by the
          user.
          PV_UCOMM    contains the sy-ucomm from ALV
          SELFIELD is a structure that contains all the data required to
                   process a user selection. The following is an example
                   of the SELFIELD structure and sample values:
    FORM USER_COMMAND USING PV_UCOMM LIKE SY-UCOMM
                            SELFIELD TYPE SLIS_SELFIELD.
      CASE PV_UCOMM.
        WHEN '&IC1'.
          loop at itab where check = 'X'.
    append all these records to another internal table itab1
         endloop.
    call function gui_download.
    pass the internal table itab1 in the tables statement
    and also you have to give the file path that may be static or dynamic
    if dynamic you have to call the function module
    f4_filename
    and get the filename and pass the same value to gui_download
    that will be download to the above said path
    endcase.
    end form.
    reward points if helpful,
    thanks & regards,
    venkatesh

  • Capturing data from ALV grid

    Dear experts.
    Can anyone help me to capture data from ALV grid to pass to a BAPI FM.
    My ALV grid has the check box as first column and I want to capture only the rows in the grid with these checkboxes checked. I would prefer to do it without OO.
    Regards
    Sathar

    Loop at the table used for ALV data where <checkbox-field> = 'X'.
    Best,
    Jim

  • Return from ALV  Grid to Selection screen

    hi,
    I want to go back from ALV grid to selection screen.
    I am using the following code:
    WHEN 'BACK'.
    CALL METHOD grid1->refresh_table_display.
    CALL METHOD grid1->free.
    CALL METHOD custom_container1->free.
    CALL SELECTION-SCREEN 1000.
    it is working,but when i press BACK button from selection screen to program it is showing ERROR IN FLUSH 4 Error.
    Also I tried with method FLUSH
    WHEN 'BACK'.
    CALL METHOD grid1->refresh_table_display.
    CALL METHOD grid1->free.
    CALL METHOD custom_container1->free.
    CALL METHOD cl_gui_cfw=>flush.
    it's still showing same Error.
    Please help on this.
    Regards,
    Sankar

    Hi,
    My grid name is grid1.
    I tried with :
    DATA grid1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = grid1.
    CALL METHOD grid1->check_changed_data.
    CALL METHOD grid1->refresh_table_display.
    LEAVE TO SCREEN 0.
    Even, I tried with declaring another grid : grid2
    DATA grid1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = grid1.
    CALL METHOD grid1->check_changed_data.
    CALL METHOD grid1->refresh_table_display.
    LEAVE TO SCREEN 0.
    In both cases, I am getting the following Error : OBJECTS_OBJREF_NOT_ASSIGNED

  • Download Excel with charts

    Hi my friends
    My client has a jsp web app running on Websphere. Currently, it has a function downloading data into excel sheet
    Now, they want to download excel with charts on it
    I know it is not so hard to do in fat clients but this case, we have a jsp webapp, and i don't know how to deal with the excel charts, templates from a jsp server
    What is the best way for me to archive that requirement.
    Thank you very much

    BIJ001 wrote:
    POI can emit binary MS Office documents, but there are also text- or xml-based alternatives like csv or the newer XML-based document formats.
    In our various projects we happily use all these approaches: POI/binary, csv, xml.Thanks,
    at least there is someone here who has experience with POI. I may need help when implementing it. I have background in EJB and did lot of work with servlet, jsp too but the only front ends I worked with are Swing(and AWT) and (HTML, javascript) web page, so I have not had to learn new things for long :D
    Now, with the new job, I have to deal with various projects and lot and lot of things I haven't done or even known
    Now, we are in design phase and I 'd like to know that whether or not we can do it
    So my question should be answered "yes, we can", right?
    Here is what I plan to do
    In the servlet, I should generate an excel sheet with data. Then generate the charts based on the data to attach to the excel file.
    Finally, dump all file into the output stream

  • Need to choose fields from alv grid output and send mail

    Hi,
    I need to choose few orders from alv grid output and send mail as PDF for chosen orders.
    Suggest if possible and how.

    Moderator message - Please do not post your requirements and ask the forum to do your work for you - post locked
    Rob

Maybe you are looking for

  • Ipad2 is no longer detecting ANY wifi networks.

    Hi, my 9 month old ipad 2 no longer detects ANY wifi networks. Was always logged on to our own home router and in settings was always able to 'see' neighbours wifi - now nothing shows.Is this a hardware problem?

  • My macbook slows down after using external HDD

    When I use an external drive via usb, my computer really slows down giving me no choice except reboot. I watched memory usage with activity monitor. Free memory decreases  by time and inactive memory increases with the same amount and others  don't c

  • My new ipad is stuck with a promt screen to enter my facetime password.

    I replace my ipad 2 today and have done the update from backup, but i now have a prompt screen asking me for my Facetime password. i have entered every password of mine i know and it wont accept it. i cannot do anything else on the ipad. it is basica

  • How to clear GR/IR

    Hello All, I wanted to clear a GR?IR account but the reference PO is already archived? Is there any possible way? Thanks in advance. Jhero

  • Open document

    I want to connect two parameters for the open document.  The "main" report for lack of a better word.  Has a parameter that allows multi numbers to be picked from a LOV.  I want to pass whatever they picked to the report at the other end of the open