Subtotal problem in Export Excel from ALV Output

Subtotal displays correct in alv output, but if i do the export excel , that subtotal value is changed in excel sheet.
is it possible to solve this problem.

  DATA: lo_grid TYPE REF TO cl_gui_alv_grid.
** get the global reference 
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING    
    e_grid = lo_grid.
** get the subtotal
DATA: it_01 TYPE REF TO data.
*  CALL METHOD lo_grid->get_subtotals 
  IMPORTING    
  ep_collect01 = it_01.
** change the data 
FIELD-SYMBOLS: <ft_tab> TYPE ANY TABLE, 
               <fs_tab> TYPE ANY,   
             <ff_field> TYPE ANY.
ASSIGN it_01->* TO <ft_tab>.
LOOP AT <ft_tab> ASSIGNING <fs_tab>. 
  ASSIGN COMPONENT 'PER' OF STRUCTURE <fs_tab> TO <ff_field>. 
  <ff_field> = '100'.
ENDLOOP.
** Refresh the table display 
CALL METHOD lo_grid->refresh_table_display  
EXPORTING         
i_soft_refresh = 'X'.

Similar Messages

  • Problem in exporting data from alv output to excel

    Hi,
    I had developed  a report which has ALV report output.It is working fine and i am facing problem that when i am exporting it to the data to excel,it is not displaying the whole data in it. I am using reuse_alv_grid_display function module.
    Waiting for a positive response.
    Thanks & Regards,
    Rickky
    Moderator Message: FAQ. Please search for available information before posting.
    Edited by: kishan P on Nov 8, 2010 12:34 PM

    It is highly likely that the way you have built your field catalog is causing some data to drop on the export to excel. I have had this problem before. Check the fields in your fieldcat that are not working vs the ones that are working.

  • Regarding downloading data into excel from alv output

    hi experts,
    i have developed a customized report(ALV) in which the employee number and all details are coming but when i press
    download to excel button and get downloaded it to the excel sheet the employee number is only not coming but all details are coming in the excel sheet.please help me to short out this problem.
    Also what i found that when i press print preview button then employee number here is also not coming but rest
      of the details are coming.

    Hi Ravi,
               For downloading the data from ALV to Excel use the following FM's
    SAP_CONVERT_TO_XLS_FORMAT
    GUI_DOWNLOAD.
    In the function GUI_DOWNLOAD use the filetype as "DBF" due to which all the data gets downloaded perfectly.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = fname
          FILETYPE                        = 'DBF'
        APPEND                          = ' '
        WRITE_FIELD_SEPARATOR           = ' '
        HEADER                          = '00'
        TRUNC_TRAILING_BLANKS           = ' '
        WRITE_LF                        = 'X'
        COL_SELECT                      = ' '
        COL_SELECT_MASK                 = ' '
        DAT_MODE                        = ' '
        CONFIRM_OVERWRITE               = ' '
        NO_AUTH_CHECK                   = ' '
        CODEPAGE                        = ' '
        IGNORE_CERR                     = ABAP_TRUE
        REPLACEMENT                     = '#'
        WRITE_BOM                       = ' '
        TRUNC_TRAILING_BLANKS_EOL       = 'X'
        WK1_N_FORMAT                    = ' '
        WK1_N_SIZE                      = ' '
        WK1_T_FORMAT                    = ' '
        WK1_T_SIZE                      = ' '
        WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
      IMPORTING
        FILELENGTH                      =
        tables
          data_tab                        =  itab
        FIELDNAMES                      =
      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.
    Pls reward if useful.
    Thanks,
    Sirisha.

  • Download to excel from alv display

    Hi,
    How to download to excel from alv display.I am using object oriented abap for using alv.If i click export->spreadsheet i am getting fatal error and if i export->local file->spreadsheet i am getting only the column names and heading but no contents.Can anyone tell me how to overcome this problem.
    Regards,
    Sowmya.

    Hi Sowmya,
    Just put break point near FM reuse_alv_grid_display and check if internal table which is used to display output is popullated or not.
    Regards Sachin.

  • Exporting data from ALV Report...

    Dear All,
    While I am exporting data from ALV report to any other Format (Excel, Txt, HTML) it only export the data of last column, but the heading is comming properly and also the column heading is displaying properly.
    So how to rectify it. (the report is Object Oriented).
    Regards,
    Dahrmesh

    Hi Davabap,
    Refer this sample program "BCALV_GRID_VERIFY" . I hope it is problem with structure mismatching.
    Otherwise can you paste your code ?
    Regards,
    Vicky
    PS: Award points if helpful

  • Issue with Data download to excel from ALV

    Hi,
    I am trying to download data to excel from ALV.
    The number of records are 26000.
    When I am trying to download I am getting an error displaying a pop up saying that
    problems came up in the following areas during the load
    TABLE
    The log displayed is not clear.
    I need to know the limitations while downloading to excel... I tried in SDN but of no use. I am using office 2007.
    What is the max downloading limit(MB)
    What must be the Length of line that can be downloaded.
    Regards

    Hi ,
    First check whether your ALV grid OUTPUT   is Consistent or Not   .
    if there are any inconsistency  then you need to rectify that  .
    for Checking COnsistency / Inconsistency  .do following steps
    1) execute ALV report 
    2) Press Shift+Mouse Right Button (Twice)  in blank area of report 
    3) you will get result   whether ALV is good or not .
    regards
    Deepak.

  • Problm download excel from ALV

    Hi Experts,
             I am facing a problem when downloading data from alv into a excel file. all the datas written in english are coming correctly but the japaneese or other chars are replaced by '#'. I am using FM 'GUI_DOWNLOAD'. How can I solve the problem?

    Hi Mini,
               kindly explain your requirement, why you have output in combination of two languages.
              if you are talking about individual runs, kindly give value to sy-langu of the resepective language.
               if not solved , pls let me know.
    Thanks,
    Pavan

  • No response when export EXCEL from Mapping in FDM

    Dear All,
    I am using FDM 11.1.1.3. And, install as usual.
    I cannot export Excel from Mapping in FDM.
    The screen is just keep waiting for long long time.
    How to fix it? Thanks for all.
    Karen

    We did have a bug in older versions of smartview where it was not possible to deinstall it. Smartview was removed but any attempt to install a new version failed. This was because Smartview creates a Registry entry in:
    HKEY_CURRENT_USER\Software\Microsoft\Installer
    and adds the key
    C:\DOCUME~1\USERNAME\LOCALS~1\Temp\_is3EA\
    which then prevents any newer version of SmartView to be installed
    I looked on my machine and the is3EA file does not exist, however there is an installer file called isA.exe
    The registry entries for smartview are found under HKEY_CURRENT_USER\Software\Hyperion Solutions\Hyperion Smartview - maybe you could try deleting these entries? --> solution works.
    Edited by: user9378541 on 27-sep-2010 2:45

  • Create file excel from alv

    Hi,
    I have need to generate a file excel from alv oo.
    How to do it?
    Is there a method?
    Many Thanks!!!

    Hi
    Go through link given below :
    alv to excel download
    With Regards
    Nikunj Shah

  • 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

  • Removing Column from exported excel in ALV

    Hi,
    I have displayed one ALV to user which displays first column for checkbox and second column for image.
    When I export this ALV output to Excel using standard Export button, these two columns also get exported to Excel.
    Is there a way by which I can remove these columns from exported excel.
    Thanks,
    Feroz

    Hi,
    Please try this -
    When you use the settings link to hide the columns, use it and hide the columns that you don't want to export, then try to Export. Check wether these hidden columns are also shown in the Excel.
    Or
    One more thing, In the EXPORT button functionality, try to get the column references of the table and hide those ccolumns programatically and try to export it.
    While showing to user give these columns while export hide these columns by the above way.
    One more thing, when you are using the standard EXPORT button, Your code doesnot trigger. Please check it.
    I don't know wether this will be of any help. Give it a try.
    Regards,
    Lekha.

  • Issue in Excel download from ALV output

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

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

  • Exporting data from ALV to Excel...

    Hi All,
      I am trying to export report to Excel with ALV Excel option on status bar, it works fine for 3 months data with 80 columns in the report. But when I run the report for one year data then report displays data fine in R/3 but when I download to Excel it's empty. The eroor is Dataset can't be processed by Excel.
    Then I tried with option Download ->Local file->spreadsheet. which doesn't save headers in it. And colums coming in two lines But user wants all columns with header if i do with this option it's not pulling headers.
      Please let me know if anybody had the same issue and came up with solution. That would be really great!
    Thank you.

    Hi Satya,
    Thanks for your reply.
    There will be around 60,000 records in the report with 80 to 100 columns. ALV report looks fine in R/3 but while downloading to Excel only it's saying ' Dataset can't be complete'. For 3,000 to 4,000 records it works fine.
            Is this because of huge data?

  • Problem creating an excel with ALV GRID

    Hi all,
    this is my problem:
    i have an ALV GRID in which I display several columns in a proper order, es : A B C D E F G
    when i create an excel from this display i obtain a different order of the columns!
    in particular the 3 columns which represent numeric values (es C D E) are the last 3 colums in the excel, instead in the alv grid this 3 comuns stay in the middle!
    so in the excel i obtain : A B F G C D E!!!!
    please can anyone help me to fix this problem?

    hi,
    if you do a debugging it will go into the function module alv_xxl_call.
    in this we can find  the code as below.
    catch system-exceptions import_mismatch_errors = 1.
        import l_xxl_toggle_date from database ltdx(XL) id
                                    'bcalv_xxl_toggle_date'.
      endcatch.
    here place a break point and check what value is it coming for this variable l_xxl_toggle_date.
    if it is coming as X. then this problem will arrive.
    here manually change the variable to space and check , the output will be coming perfectly.
    if value is coming as X.
    THEN WE CAN DO ONE THING.
    HERE we are having a report bcalv_toggle_date which MUST EXECUTED ONCE ONLY.
    WHEN IT IS EXECUTED IT DOES NOT DISPLAY ANYTHING.
    after executing once the variable will be changed from X TO SPACE.
    but we must run this report as other program excel sheet download order  might get disturbed.
    my might suggestion copy thwe standard gui  to custom one and right a code for that excel icon in your code as shown below.
    we need to copy the function module alv_xxl_call and comment the code
    catch system-exceptions import_mismatch_errors = 1.
        import l_xxl_toggle_date from database ltdx(XL) id
                                    'bcalv_xxl_toggle_date'.
      endcatch.
      if l_xxl_toggle_date is initial.
      and endif of the above if.
    WHEN 'XXL'.
          DATA : v_fieldcat TYPE STANDARD TABLE OF kkblo_fieldcat.
          DATA : wa_fieldcat TYPE kkblo_fieldcat.
          DATA : w_fieldcat LIKE LINE OF gt_fieldcat.
          DATA : g_sort TYPE slis_t_sortinfo_alv.
          DATA : g_filter TYPE slis_t_filter_alv.
          DATA : a_fieldcat TYPE slis_t_fieldcat_alv.
          CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
            IMPORTING
              es_layout   = gs_layout
              et_fieldcat = a_fieldcat[]
              et_sort     = g_sort
              et_filter   = g_filter
              es_variant  = gs_variant.
          DELETE a_fieldcat WHERE no_out = 'X'.
          LOOP AT a_fieldcat INTO w_fieldcat.
            MOVE-CORRESPONDING w_fieldcat TO wa_fieldcat.
            APPEND wa_fieldcat TO v_fieldcat.
          ENDLOOP.
          CALL FUNCTION 'ZALV_XXL_CALL'
            EXPORTING
              i_tabname                    = 'IT_FINAL'
            IS_LAYOUT                    =
              it_fieldcat                  = v_fieldcat[]
            I_CALLBACK_TOP_OF_PAGE       =
            I_TITLE                      =
            I_MODE                       =
            TABLES
              it_outtab                    = it_final
           EXCEPTIONS
             FATAL_ERROR                  = 1
             NO_DISPLAY_POSSIBLE          = 2
             OTHERS                       = 3.

  • Problem opening exported Excel file

    Hi
    We recently experienced a problem that has never occurred before. When trying to open an exported Excel file from a query with hierarchical structures (using the link <SAP_BW_URL DATA_PROVIDER="DP" CMD="EXPORT" FORMAT="XLS"> on the 0ANALYZER template), we are asked to log on to the BEx web, as if it's a Web application. If it is an Excel exported from a hierarchy-free query, then the file open directly without the logon prompt. According to the user, he used to be able to open downloaded hierarchy-expanded data without going through the logon process.
    Has anyone experienced the same problem before? Can you share you solution to help us? Thank you in advance!

    If I understand your issue correctly we used a different fix. Very easy to do.
    First, what I believe is happening is that your icons for the hierarchy are being exported as a reference with absolute URL (images can not be exported). This means that when Excel opens the file it tries to resolve the URL and to do that it requires a login.
    You can verify that absolute URLS are being exported by opening your excel export in a text processor (its actually XML). Look for URLS that start "http://.../MIME/BEx/Analyser/xxxx.gif". which are icons.
    This took us quite a while to figure out because excel was not asking us to log in. It just timed out for each URL reference. Took forever.
    The fix we used was to add the following entry to this table on your BW system... (LANG must be empty), Caption is optional:
    Table=RSZCONTROLTEXTS,
    Entry=
      Lang = "",
      TARGET_ID="ID_FLAG_XLS_ABS_URL",
      CAPTION=”Force Excel Export to use relative URLs in XML output for icons”
    You can experiment with results before you try by editing your XML file (the excel export from web) and removing from those icon URLS the "http:...." up to Mime. This makes it a relative URL. The down side is that it cannot find the icon and displays a box with an X in it. I believe there are techniques for importing icons into excel. They would look like this after surgery <img src="Mime/BEx/Analyzer/hieric2.gif">
    If you implement the fix and don't like the effect just remove the entry from the table and all is back to before. I do not believe this is a transportable fix though.
    We discovered it when we were pretesting a bunch of service pack upgrades. See SAP note #650887
    Hope this helps
    Dave Schuh

Maybe you are looking for