Why is the spreadsheet empty when users download to Excel from ALV grid?

Users are seeing SAP GUI transaction results display in the ALV Grid when running an SAP Report; however, when they click the Download to Excel icon the spreadsheet is empty.  When they use List...Export...Spreadsheet, the spreadsheet is filled.
This seems to only be happening with 'Z' transactions.  Standard delivered transactions are OK.
Using SAP GUI for Windows and Excel 2003.

Hi All,
I also have same Problem I my case when i click on 'Microsoft Excel' it does nothing. It does not even open a sheet.
Please suggest,
regards,
Vinit

Similar Messages

  • 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

  • Download to excel 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
    try this code----
    *&      Form  DOWNLOAD_EXCEL_TEMPLATE
          text
    -->  p1        text
    <--  p2        text
    FORM download_excel_template .
      TYPES: BEGIN OF lt_data,
                field1(20),
                field2(30),
                field3(20),
                field4(20),
                field5(20),
                field6(30),
                field7(15),
                field8(10),
                field9(10),
                field10(20),
                field11(20),
                field12(10),
                field13(20),
                field14(20),
              END OF lt_data.
      DATA: lv_file TYPE rlgrap-filename,
            li_data TYPE STANDARD TABLE OF lt_data,
            wa_data TYPE lt_data,
            lv_pathcheck type c,
            lv_file1 type string.
      wa_data-field1 = ''.
      APPEND wa_data TO li_data.
      REFRESH gi_header.
      wa_header-name = 'Company Code'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Main Asset Number'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Asset Sub Number'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Document Date'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Posting Date'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Asset Value Date'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Item Text'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Reference'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Allocation'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Amount Posted'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Percentage Rate'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Quantity'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Prior-Yr Quantity'.
      APPEND wa_header TO gi_header.
      wa_header-name = 'Curr-Yr Quantity'.
      APPEND wa_header TO gi_header.
      lv_file = gv_file.
      lv_file1 = gv_file.
      CALL METHOD cl_gui_frontend_services=>directory_exist
        EXPORTING
          directory            = lv_file1
        RECEIVING
          result               = lv_pathcheck
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          wrong_parameter      = 3
          not_supported_by_gui = 4
          OTHERS               = 5.
       FIND '.xls' IN lv_file IGNORING CASE.
      IF sy-subrc = 0.
        REPLACE '.XLS' IN lv_file WITH ' ' IGNORING CASE.
      ENDIF.
      FIND '.TXT' IN lv_file IGNORING CASE.
      IF sy-subrc = 0.
        REPLACE '.TXT' IN lv_file WITH ' ' IGNORING CASE.
      ENDIF.
      CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          file_name                 = lv_file
          data_sheet_name           = 'DATA'
        TABLES
          data_tab                  = li_data
          fieldnames                = gi_header
        EXCEPTIONS
          file_not_exist            = 1
          filename_expected         = 2
          communication_error       = 3
          ole_object_method_error   = 4
          ole_object_property_error = 5
          invalid_pivot_fields      = 6
          download_problem          = 7
          OTHERS                    = 8.
      IF sy-subrc <> 0.
        MESSAGE ID gv_msgid TYPE 'E' NUMBER 002.
      ENDIF.
    ENDFORM.                    " DOWNLOAD_EXCEL_TEMPLATE
    regards,
    Prashant

  • Last digit truncates while downloading to Excel from ALV Grid

    Hi All,
    I have been using REUSE_ALV_LIST_DISPLAY and REUSE_ALV_GRID_DISPLAY in my report program.
    While i use REUSE_ALV_GRID_DISPLAY and downloading the data to a local file(Excel) the last digit of the Vendor code is truncated. But in REUSE_ALV_LIST_DISPLAY the datas are downloaded correctly as displayed in the ALV.
    I have copied the code for the reference.
    REPORT  zfirp001                                .
    TYPE-POOLS: slis.
    TABLES: bsak.
    SELECT-OPTIONS:  s_bukrs FOR bsak-bukrs,
                     s_lifnr FOR bsak-lifnr,
                     s_blart FOR bsak-blart,
                     s_augdt FOR bsak-augdt,
                     s_zterm FOR bsak-zterm.
    PARAMETERS:      s_list AS CHECKBOX,
                     s_vari LIKE disvariant-variant.
    DATA: g_ext_num(24) TYPE c.
    DATA: BEGIN OF gt_bsak OCCURS 0,
            bukrs LIKE bsak-bukrs,
            lifnr LIKE bsak-lifnr,
            augdt LIKE bsak-augdt,
            gjahr LIKE bsak-gjahr,
            belnr LIKE bsak-belnr,
            blart LIKE bsak-blart,
            zterm LIKE bsak-zterm,
          END OF gt_bsak.
    DATA: BEGIN OF gt_bseg OCCURS 0,
            bukrs LIKE bseg-bukrs,
            belnr LIKE bseg-belnr,
            gjahr LIKE bseg-gjahr,
            wrbtr LIKE bseg-wrbtr,
            projk LIKE bseg-projk,
            shkzg LIKE bseg-shkzg,
            hkont LIKE bseg-hkont,
          END OF gt_bseg.
    ALV
    DATA: gt_fieldtab TYPE slis_t_fieldcat_alv,
          g_save(1)   TYPE c,
          g_variant   LIKE disvariant.
    DATA: BEGIN OF gt_result OCCURS 0,
            bukrs       LIKE bsak-bukrs,
            lifnr       LIKE bsak-lifnr,
            name1       LIKE lfa1-name1,
            augdt       LIKE bsak-augdt,
            gjahr       LIKE bsak-gjahr,
            belnr       LIKE bsak-belnr,
            blart       LIKE bsak-blart,
            zterm       LIKE bsak-zterm,
            wrbtr       LIKE bseg-wrbtr,
            waers       LIKE bkpf-waers,
            ext_num(24) TYPE c,
            txt20       LIKE skat-txt20,
            usr00       LIKE prps-usr00,
            usr01       LIKE prps-usr01,
            usr02       LIKE prps-usr02,
            usr03       LIKE prps-usr03,
          END OF gt_result.
    CONSTANTS: c_credit(1)       TYPE c VALUE 'H',
               c_x(1)            TYPE c VALUE 'X',
               c_en(2)           TYPE c VALUE 'EN',
               c_mrc(4)          TYPE c VALUE 'CA01'.
    *====================================================
    INITIALIZATION.
      PERFORM initialize_variant.
    AT SELECTION-SCREEN.
      PERFORM pai_of_selection_screen.
    *====================================================
    START-OF-SELECTION.
      REFRESH gt_result.
    find clearing documents
      SELECT        bukrs
                    lifnr
                    augdt
                    gjahr
                    belnr
                    blart
                    zterm
             INTO   TABLE gt_bsak
             FROM   bsak
             WHERE  bukrs  IN s_bukrs
             AND    lifnr  IN s_lifnr
             AND    augdt  IN s_augdt
             AND    blart  IN s_blart
             AND    zterm  IN s_zterm.
      CHECK NOT gt_bsak[] IS INITIAL.
      LOOP AT gt_bsak.
    read WBS items
        SELECT        bukrs
                      belnr
                      gjahr
                      dmbtr
                      projk
                      shkzg
                      hkont
               INTO   TABLE  gt_bseg
               FROM   bseg
               WHERE  bukrs  = gt_bsak-bukrs
               AND    belnr  = gt_bsak-belnr
               AND    gjahr  = gt_bsak-gjahr
               AND    projk  > space.
        gt_result-bukrs = gt_bsak-bukrs.
        gt_result-lifnr = gt_bsak-lifnr.
        gt_result-augdt = gt_bsak-augdt.
        gt_result-belnr = gt_bsak-belnr.
        gt_result-gjahr = gt_bsak-gjahr.
        gt_result-blart = gt_bsak-blart.
        gt_result-zterm = gt_bsak-zterm.
    document currency
        SELECT SINGLE waers
               INTO   gt_result-waers
               FROM   bkpf
               WHERE  bukrs  = gt_bsak-bukrs
               AND    belnr  = gt_bsak-belnr
               AND    gjahr  = gt_bsak-gjahr.
    vendor name
        SELECT SINGLE name1
               INTO   gt_result-name1
               FROM   lfa1
               WHERE  lifnr  = gt_result-lifnr.
    for each accounting document
        LOOP AT gt_bseg.
    convert to external WBS
          CALL FUNCTION 'PSPNUM_INTERN_TO_EXTERN_CONV'
            EXPORTING
              edit_imp  = c_x
              int_num   = gt_bseg-projk
            IMPORTING
              ext_num   = gt_result-ext_num
            EXCEPTIONS
              not_found = 1
              OTHERS    = 2.
    debit or credit
          IF gt_bseg-shkzg = c_credit.
            gt_result-wrbtr = gt_bseg-wrbtr.
          ELSE.
            gt_result-wrbtr = gt_bseg-wrbtr * -1.
          ENDIF.
    GL short Text
          SELECT SINGLE txt20
                 INTO   gt_result-txt20
                 FROM   skat
                 WHERE  spras  = c_en
                 AND    ktopl  = 'CA01'
                 AND    saknr  = gt_bseg-hkont.
    user fields
          SELECT SINGLE usr00
                        usr01
                        usr02
                        usr03
                 INTO  (gt_result-usr00,
                        gt_result-usr01,
                        gt_result-usr02,
                        gt_result-usr03)
                 FROM   prps
                 WHERE  pspnr  = gt_bseg-projk.
    append to result table
          APPEND gt_result.
        ENDLOOP.
      ENDLOOP.
    *====================================================
    END-OF-SELECTION.
      PERFORM initialize_fieldcat USING gt_fieldtab[].
      g_variant-report = sy-repid.
      g_save           = 'A'.
      IF s_list = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            it_fieldcat = gt_fieldtab
            i_default   = 'A'
            i_save      = g_save
            is_variant  = g_variant
          TABLES
            t_outtab    = gt_result.
      ELSE.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            it_fieldcat = gt_fieldtab
            i_default   = 'A'
            i_save      = g_save
            is_variant  = g_variant
          TABLES
            t_outtab    = gt_result.
      ENDIF.
    *&      Form  initialize_variant
    FORM initialize_variant.
      g_save = 'A'.
      CLEAR g_variant.
      g_variant-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = g_save
        CHANGING
          cs_variant = g_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        s_vari = g_variant-variant.
      ENDIF.
    ENDFORM.                               " INITIALIZE_VARIANT
    *&      Form  pai_of_selection_screen
    FORM pai_of_selection_screen.
      IF NOT s_vari IS INITIAL.
        MOVE s_vari TO g_variant-variant.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
          EXPORTING
            i_save     = g_save
          CHANGING
            cs_variant = g_variant.
      ELSE.
        PERFORM initialize_variant.
      ENDIF.
    ENDFORM.                    " PAI_OF_SELECTION_SCREEN
    *&      Form  initialize_fieldcat
    FORM initialize_fieldcat USING p_fieldtab TYPE slis_t_fieldcat_alv.
      DATA: l_fieldcat TYPE slis_fieldcat_alv.
      CLEAR l_fieldcat.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'BUKRS'.
      l_fieldcat-seltext_L  = 'Company'.
      l_fieldcat-outputlen  = '8'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'LIFNR'.
      l_fieldcat-seltext_L  = 'Vendor'.
      l_fieldcat-outputlen  = '10'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'NAME1'.
      l_fieldcat-seltext_L  = 'Name'.
      l_fieldcat-outputlen  = '35'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'AUGDT'.
      l_fieldcat-seltext_L  = 'Cleared'.
      l_fieldcat-outputlen  = '10'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'GJAHR'.
      l_fieldcat-seltext_L  = 'Year'.
      l_fieldcat-outputlen  = '5'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'BELNR'.
      l_fieldcat-seltext_L  = 'Document'.
      l_fieldcat-outputlen  = '10'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'BLART'.
      l_fieldcat-seltext_L  = 'Type'.
      l_fieldcat-outputlen  = '4'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'ZTERM'.
      l_fieldcat-seltext_L  = 'Pay Terms'.
      l_fieldcat-outputlen  = '4'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'WRBTR'.
      l_fieldcat-seltext_L  = 'Amount'.
      l_fieldcat-outputlen  = '13'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'WAERS'.
      l_fieldcat-seltext_L  = 'CURR'.
      l_fieldcat-outputlen  = '5'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'EXT_NUM'.
      l_fieldcat-seltext_L  = 'WBS'.
      l_fieldcat-outputlen  = '24'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'TXT20'.
      l_fieldcat-seltext_L  = 'Short Text'.
      l_fieldcat-outputlen  = '20'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'USR00'.
      l_fieldcat-seltext_L  = 'H/O File Ref'.
      l_fieldcat-outputlen  = '20'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'USR01'.
      l_fieldcat-seltext_L  = 'Local File Ref'.
      l_fieldcat-outputlen  = '20'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'USR02'.
      l_fieldcat-seltext_L  = 'INFORM Agree ID'.
      l_fieldcat-outputlen  = '10'.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-tabname    = 'GT_RESULT'.
      l_fieldcat-fieldname  = 'USR03'.
      l_fieldcat-seltext_L  = 'INFM Prim Ag ID'.
      l_fieldcat-outputlen  = '10'.
      APPEND l_fieldcat TO p_fieldtab.
    ENDFORM.                    " INITIALIZE_FIELDCAT
    Could the experts do help to overcome the probs.
    Thanks in Advance.
    Regards,
    Anbalagan.V

    Hi Anbalagan,
    i've tested your program - but it works fine (Rel. 4.6C,SAPKB46C30)
    download is ok and direct transfer (excel inplace) is ok.
    but i've a question to the selection of waers in your program -
    why do you select waers from bkpf and not from bsak ?
    i think sel. of bkpf is'nt necessary !
    regards Andreas

  • I recently purchased a new PC. I had backed-up my old computer on Carbonite, so I was able to transfer my iTunes library to the new computer when I downloaded my info from Carbonite. Is there a way to restore my playlists?

    I recently purchased a new PC. I had backed-up my old computer on Carbonite, so I was able to transfer my iTunes library to the new computer when I downloaded my info from Carbonite, but the playlists are gone. Is there a way to restore my playlists?
    Most of my playlists are on my iPod. If I use my iPod to transfer, will the songs double in my library? Also, how do I do this?
    Thank you for any & all info you can provide!
    Julie

    If you had backed up and restored your library properly you should have ended up with the playlists too. Did you import the media folder from the backup drive into a new library rather than restoring the entire iTunes folder?
    See also Recover your iTunes library from your iPod or iOS device.
    tt2

  • 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.

  • Limit the number of record to download to excel from a report

    I am just wondering if there is a way to limit the number of rows that I want to download to excel from a report in apex, right now when I click download to excel it downloads all records. If I am displaying 15 records on report page I want the ability to download only those records.
    Any help with that would be appreciated.
    Kind Regards,
    Sofia.

    Sofia,
    The same report query runs for downloading the data into excel, I don't think you can limit the number of records in download.
    You can achieve it using custom code, like on click of download excel redirect to another page and then restrict the data as per your need, or you can use the custom procedure to download the limited data.
    Denes' utility to download into excel.
    http://htmldb.oracle.com/pls/otn/f?p=31517:108:1476564836494581:::RP,::
    Regards,
    Manish

  • 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.

  • SetHeader problem when user downloads a file from a server

    Hi everyone,
    I have a question about the way to let a user download a file. A created a jsp that handles the download. This is the code:
    <%@ page import="java.io.*" %><%
        response.setHeader("Content-Disposition", "attachment; filename=" + session.getAttribute("executedCommand").toString());
        response.setContentType("text/csv");
        int iRead;
        FileInputStream stream = null;
        try {
            File f = new File(session.getAttribute("executedCommand").toString());
            stream = new FileInputStream(f);
            while ((iRead = stream.read()) != -1) {
                out.write(iRead);
            out.flush();
        }finally {
            if (stream != null) {
                stream.close();
    %>When I run this, I get a download window, so that the right file can be downloaded, but I would like the application to show me the name of that file in the download window and in my save dialog, and that's something I haven't managed to do yet, because I always get the name of the servlet (that redirects to the jsp page). So the problem is, the right file is downloaded but it's name is never shown in the download window. How can I resolve that?
    Thanks for your help!
    E_J

    I forgot to say that my session variable contains the absolute path of the file the user can download. Maybe using session variables is not the best solution in this case, but it should have to work, shouldn't it?
    Still waiting for some help. I really appreciate it...
    E_J

  • Short Dump when downloading to EXCEL from ALV

    Hi,
    I have an ALV grid display program. The data in the grid is displayed correctly. But when trying to download the data to excel it gives a short dump.
    Assignment error: Overwriting a protected field.
    What happened?
    Error in ABAP application program.
    The current ABAP program "SAPLKKBL" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    Some times it allows to download the data, but sometimes it gives short dump.
    Thanks,
    Deepthi

    This is my part of the code:
      i_fieldcat-key     = gc_x.
      i_fieldcat-no_zero = gc_x.
      i_fieldcat-fix_column  = 'X'.
      i_fieldcat-hotspot = gc_x.
      perform bild_fieldcat using
        '' 'AUFNR' 'GT_REPORT ' ' '  'CAUFV'  ' '  'C' '12' ' '.
      perform bild_fieldcat using
        '' 'DISGR' 'GT_REPORT ' ' '  'MARC' ' '  'C' '4' ' '.
      perform bild_fieldcat using
        '' 'AUART' 'GT_REPORT ' ' '  'CAUFV' ' '  'C' '04' ' '.
      perform bild_fieldcat using
        '' 'DISPO' 'GT_REPORT ' ' '  'CAUFV' ' ' 'C' '06' ' '.
      i_fieldcat-no_zero = gc_x.
      perform bild_fieldcat using
        '' 'MATNR' 'GT_REPORT ' ' '  'MARA' ' '  'C' '18' ' '.
      i_fieldcat-no_zero = gc_x.
      perform bild_fieldcat using
        '' 'CHARG' 'GT_REPORT ' ' '  'MDFA' ' ' 'C' '14' ' ' .
    *begin insert RCHALASA
      i_fieldcat-no_zero = gc_x.
      i_fieldcat-fix_column  = 'X'.
      perform bild_fieldcat using
        '' 'FTRMI' 'GT_REPORT ' ' '  'CAUFV' ' ' 'D' '08' ' '.
    *end insert
      i_fieldcat-no_zero = gc_x.
      i_fieldcat-fix_column  = 'X'.
      perform bild_fieldcat using
        '' 'GLTRP' 'GT_REPORT ' ' '  'CAUFV'  ' '  'D' '10' ' '.
      i_fieldcat-no_zero = gc_x.
      perform bild_fieldcat using
        '' 'GLTRS' 'GT_REPORT' ' '  'CAUFV' ' ' 'D' '10' ' '.
      perform bild_fieldcat using
        '' 'GSTRP' 'GT_REPORT' ' '  'CAUFV' ' '  'D' '10' ' '.
      perform bild_fieldcat using
        '' 'AGE' 'GT_REPORT' ' '  ' ' 'Age'  'C' '08' ' '.
      i_fieldcat-no_zero = gc_x.
    i_fieldcat-do_sum  = gc_x.
      i_fieldcat-fix_column  = 'X'.
      perform assign_alv_qty_format.
      perform bild_fieldcat using
        '' 'GAMNG' 'GT_REPORT' ' '  ' '  'Order Qty'  'QUAN' '09' ' '.
      perform bild_fieldcat using
        '' 'STK_PROD_FLAG' 'GT_REPORT' ' '   ' '  'Stk/Prod'  'C' '06' ' '.
      i_fieldcat-no_zero = gc_x.
    i_fieldcat-do_sum  = gc_x.
      i_fieldcat-fix_column  = 'X'.
      perform assign_alv_qty_format.
      perform bild_fieldcat using
        '' 'IGMNG' 'GT_REPORT' ' '  ' ' 'Order Yield Qty' 'QUAN' '11' ' '.
      i_fieldcat-no_zero = gc_x.
    i_fieldcat-do_sum  = gc_x.
      i_fieldcat-fix_column  = 'X'.
      perform assign_alv_qty_format.
      perform bild_fieldcat using
        '' 'IASMG' 'GT_REPORT' ' ' ' ' 'Order Scrap Qty'  'QUAN' '11' ' '.
    **begin insert RCHALASA
      perform bild_fieldcat using
         '' 'YIELD_PER' 'GT_REPORT' ' ' ' ' 'Yield'  'C' '05' ' '.
    **end insert
    DATA: col_pos like sy-colno.
    col_pos = '17'.
      loop at gt_oper.
        gv_tabix = sy-tabix.
        i_fieldcat-no_zero = gc_x.
        i_fieldcat-do_sum  = gc_x.
        i_fieldcat-fix_column  = 'X'.
       col_pos = col_pos + 1.
        perform assign_alv_qty_format.
        gv_yield6(03) = gt_oper-vornr1(03).
    *begin insert RCHALASA
        move gt_oper-ltxa1 to gv_text.
      translate gv_text to upper case.
    gv_text = gv_yield.
    *end insert
        gv_tabixn = gv_tabix.
        gv_yield+6(03) = gv_tabixn.
        gv_fieldname = gv_yield.
        translate gv_fieldname to upper case.
        perform bild_fieldcat using
         '' gv_fieldname 'GT_REPORT' ' ' ' ' gv_text  'QUAN' '04' ' '.
       perform assign_alv_qty_format.
      gv_scrap6(03) = gt_oper-vornr1(03).
      select single
             grdtx
             from trugt
             into gv_text1
             where
             grund = gt_oper-vornr
             and werks in s_werks.
       gv_text = gv_scrap.
       i_fieldcat-no_zero = gc_x.
       gv_tabixn = gv_tabix.
      gv_scrap+6(03) = gv_tabixn.
       gv_fieldname = gv_scrap.
       translate gv_fieldname to upper case.
       perform bild_fieldcat using
         gv_fieldname 'GT_REPORT' ' ' gv_text1 'X' 'QUAN' '08' ' '.
       clear gv_text1.
      endloop.  " GT_OPER
      DATA: count type c.
      DESCRIBE table gt_grund lines count.
      loop at gt_grund into gl_grund.
        gv_tabix = sy-tabix.
        i_fieldcat-no_zero = gc_x.
        i_fieldcat-do_sum  = gc_x.
        i_fieldcat-fix_column  = 'X'.
        perform assign_alv_qty_format.
        if gl_grund-grund is initial.
          gl_grund = 'NONE'.
          gv_text = gl_grund.
        else.
           gv_text = gl_grund-grdtx.
        endif.
        gv_tabixn = gv_tabix.
        gv_scrap_code+11(03) = gv_tabixn.
        gv_fieldname = gv_scrap_code.
        translate gv_fieldname to upper case.
       col_pos = col_pos + 1.
        perform bild_fieldcat using
          '' gv_fieldname 'GT_REPORT' 'XMNGA' 'AFRU'  gv_text  'QUAN' '12' ' ' .
      endloop.  " GT_OPER
      gb_layout-zebra = 'X'.
      gb_print-no_print_listinfos = 'X'.
      gb_variant-variant = p_varia.
      perform create_events using gt_events[].
      call function 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Reading SAP Records.......'(600).
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = gv_repid
                i_callback_top_of_page   = 'TOP_OF_PAGE'
               i_callback_pf_status_set = 'SET_STATUS'
                i_callback_user_command  = 'CALL_UP_SAP_TRANS'
                it_fieldcat              = i_fieldcat[]
                is_layout                = gb_layout
                i_grid_title             = gb_title
                i_default                = 'X'
                i_save                   = 'X'
                is_variant               = gb_variant
                is_print                 = gb_print
                it_events                = gt_events[]
           tables
                t_outtab                 = gt_report
           exceptions
                program_error            = 1
                others                   = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                 with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    ***********ALV SUBROUTINE**************
    TYPE-POOLS: slis.
    DATA: gv_repid            LIKE sy-repid.
    DATA: i_fieldcat          TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: gb_layout           TYPE slis_layout_alv.
    DATA: gb_selfield         TYPE slis_selfield.
    DATA: gb_print            TYPE slis_print_alv.
    DATA: i_sort              TYPE  slis_t_sortinfo_alv WITH HEADER LINE.
    DATA: gv_keyinfo          TYPE SLIS_KEYINFO_ALV.
    DATA: gb_variant          LIKE disvariant,
          gb_def_variant      LIKE disvariant.
    DATA: gb_title(70).
    DATA: gt_events           TYPE slis_t_event,
          gt_sort             TYPE SLIS_T_SORTINFO_ALV,
          gt_list_top_of_page TYPE slis_t_listheader,
          g_status_set        TYPE slis_formname VALUE 'PF_STATUS_SET',
          g_user_command      TYPE slis_formname VALUE 'USER_COMMAND',
          g_top_of_page       TYPE slis_formname VALUE 'TOP_OF_PAGE',
          g_end_of_page       TYPE slis_formname VALUE 'END_OF_PAGE',
          g_top_of_list       TYPE slis_formname VALUE 'TOP_OF_LIST',
          g_end_of_list       TYPE slis_formname VALUE 'END_OF_LIST'.
    DATA: it_event_exit TYPE slis_t_event_exit WITH HEADER LINE.
    *--- Rotinas ---
    FORM alv_init.
      CLEAR: gb_variant.
      gv_repid = sy-repid.
      gb_variant-report = gv_repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save     = 'A'
           CHANGING
                cs_variant = gb_variant
           EXCEPTIONS
                not_found  = 2.
      IF sy-subrc = 0.
        p_varia = gb_variant-variant.
      ENDIF.
    ENDFORM.                    " ALV_INIT
    FORM alv_f4.
      gb_variant-report = gv_repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant = gb_variant
                i_save     = 'A'
           IMPORTING
                es_variant = gb_variant
           EXCEPTIONS
                not_found  = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        p_varia = gb_variant-variant.
      ENDIF.
    ENDFORM.                                                    " ALV_F4
    FORM bild_fieldcat USING x_pos x_field x_tab x_reffld x_ref x_text x_type x_tam x_sym.
      i_fieldcat-col_pos       = x_pos.
      i_fieldcat-fieldname     = x_field.
      i_fieldcat-tabname       = x_tab.
      i_fieldcat-ref_fieldname = x_reffld.
      i_fieldcat-ref_tabname   = x_ref.
      i_fieldcat-seltext_l     = x_text.
      i_fieldcat-seltext_m     = x_text.
      i_fieldcat-seltext_s     = x_text.
      i_fieldcat-ddictxt  = 'M'   .
      i_fieldcat-inttype       = x_type.
      i_fieldcat-outputlen     = x_tam.
      i_fieldcat-symbol        = x_sym.
      APPEND i_fieldcat.
      CLEAR  i_fieldcat.
    ENDFORM.                    " BILD_FIELDCAT
    FORM create_events USING rt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = rt_events.
      READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE g_top_of_page TO ls_event-form.
        APPEND ls_event TO rt_events.
      ENDIF.
    ENDFORM.                    "

  • PO No is not coming complete in length while downloading in excel from ALV

    Hi to all
    My problem is
    I have declared
    EBELN LIKE EBAN-EBELN.
    length is 10.
    Now in ALV report it is showing complete PO no but
    when downloading itto excel , last digit is cut, only 9 digits are displayed.
    Why it is so.
    Please guide me...
    Thanks & regards
    Anubhav

    Hi
    Please try to declre the field EBELN as character of length 10 in the internal table for ALV.
    EBELN type char(10)
    <REMOVED BY MODERATOR>
    Thanks
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 6:00 PM

  • Download to excel from ALV via portal

    HI,
    Could anyone out there help me resolve one issue which I am facing.
    We have developed a ALV report and the same is working fine in GUI screen and also the various ALV features such as Download to Local File, Print Preview and others are working very well.
    But if I deploy the same report on EP. The report is executing just fine but all the ALV features such as download to excel file and all other features are not working as desired.
    I have done some reasearch on this issue and everytime people talk about having the updated Java version and to run this features on IE 7 or below. We have tried all these but still no luck.
    Request you to provide your valuable inputs which can help me resolve this issue.
    Thanks much!
    Regards,
    Sumanth

    Hi,
    I guess this is due to the gui statements like call screen for popup to download which will not work in browser, instead of using FM for ALV or CL_GUI_ALV_GRID class, try using CL_SALV CLasses or create ALV in Web dynpro and integrate it in portal which will work well.
    Hope this helps u.,
    Thanks & Regards,
    Kiran.

  • Download to Excel from ALV

    Hi,
       I ran the program 'BALVEX02' and i got the output i clicked on ALV standard application tool bar button 'Spreadsheet' (Ctrl_shift+F7) and unfortunately i selected HTML format radio button and selected check box that 'Always use the same format'. I need to change that format to excel. How can i get that pop-up box again. Looks like simple but could not see the alternative.
    Thanks

    Moderator message - Please do not add a meaningless comment when you mark a post as solved. It only brings old posts to the top of the forum list and pushes current ones down.
    Rob

  • Issue where the cart is empty when user logs back in

    Having issue where the cart is empty when user logs back in
    Steps:
    1. User logs into the site
    2. User selects items and the cart is updated
    3. User logs out of their account
    4. User exits/closes the browsers
    5. User then reopens the browser, navigates to the site, logs in and the cart is empty
    My understanding is that the cart should be populated with the previous items since the user did not complete the order.
    I have the following settings:
    in shoppingcart.properties
    persistOrdersForAnonymousUsers=true
    persistOrders=true
    in cookieManager.properties
    sendProfileCookies=true
    in /atg/userprofiling/ProfileRequestServlet.properties
    verifyBasicAuthentication=true
    in /atg/dynamo/servlet/dafpipeline/ProfileRequestServlet.properties
    persistAfterLogout=true
    persistentAnonymousProfiles=true
    Anything else that needs to be set?
    Edited by: boyd4715 on Feb 6, 2013 11:07 AM

    I reset the properties back to their orignal state
    in shoppingcart.properties
    persistOrdersForAnonymousUsers=false
    persistOrders=true
    in cookieManager.properties
    sendProfileCookies=true
    in /atg/userprofiling/ProfileRequestServlet.properties
    verifyBasicAuthentication=false
    in /atg/dynamo/servlet/dafpipeline/ProfileRequestServlet.properties
    persistAfterLogout=false
    persistentAnonymousProfiles=false
    in /atg/userprofiling/ProfileTools.properties
    mergeOrder=false;
    Observateion:
    If an anonymous user comes to the site, adds items to the cart, leaves the site and comes back - the cart is empty - the order repository is not updated
    If a user logs into the site, adds items to the cart and then exits the browser (does not log out), comes back to the site, the selected items are in the cart
    If a usr logs into the site, adds items to the cart, logs out of the site, exits the browser, comes back to the site, the selected items are not in the cart
    An order does not get presisted to the repository until the order is confirmed.
    Based on the last item that explains why the user is not seeing any anything in their cart when they log out. If they do not log out, I assume then that the content of their cart is stored in the cookie.
    So, now the question is - why is this happening - I am not the original author of the site - just trying to get some things fixed on it.

  • When I download a video from verizon cloud the sound won't download. Why is that?

    When I download a video from verizon cloud the sound won't download. Why is that?

        We'll help figure this out, taney! What type of device are you downloading to? Have you tried downloading to a different device? Have you ever been able to download before and gotten the sound? Please provide some additional details, and we will work to resolve this matter.
    Thanks,
    MichelleH_VZW
    Follow us on Twitter @VZWSupport

Maybe you are looking for