ALV toolbar excel icon using REUSE_ALV_GRID_DISPLAY

Hi!
I’ve created an ALV with using REUSE_ALV_GRID_DISPLAY. In ALV out put on toolbar I’ve excel, sort default icons. 
If I sort my ALV on some column and press excel icon one row has got deleted and some column I don’t get data in rows (where my rows are more than 20).
If anyone know any SAP not or patch or has faced this problem before please let me know on priority basis. 
Please find below SAP support pack info. We are running on ECC6.0.
Software component     Release     Level     Highest Suppost Package     Short description of softwar componenet
SAP_BASIS     700     13     SAPKB70013     SAP Basis Component
SAP_ABA     700     13     SAPKA70013     Cross-Application Component
PI_BASIS     2006_1_700     2     SAPKIPYM02     Basis Plug-In (PI_BASIS) 2006_1_700
ST-PI     2005_1_700     5     SAPKITLQI5     SAP Solution Tools Plug-In
SAP_BW     700     15     SAPKW70015     SAP NetWeaver BI 7.0
SAP_AP     700     11     SAPKNA7011     SAP Application Platform
SAP_APPL     600     11     SAPKH60011     Logistics and Accounting
SAP_HR     600     22     SAPKE60022     Human Resources
EA-IPPE     400     11     SAPKGPID11     SAP iPPE
EA-APPL     600     11     SAPKGPAD11     SAP Enterprise Extension PLM, SCM, Financials
EA-DFPS     600     11     SAPKGPDD11     SAP Enterprise Extension Defense Forces & Public Security
EA-FINSERV     600     11     SAPKGPFD11     SAP Enterprise Extension Financial Services
EA-GLTRADE     600     11     SAPKGPGD11     SAP Enterprise Extension Global Trade
EA-HR     600     22     SAPKGPHD22     SAP Enterprise Extension HR
EA-PS     600     11     SAPKGPPD11     SAP Enterprise Extension Public Services
EA-RETAIL     600     11     SAPKGPRD11     SAP Enterprise Extension Retail
FINBASIS     600     11     SAPK-60011INFINBASIS     Fin. Basis
MDM_TECH     555_700     4     SAPK-57004INMDMTECH     MDM_TECH 555 : Add-On Installation
ECC-DIMP     600     11     SAPK-60011INECCDIMP     DIMP
ERECRUIT     600     11     SAPK-60011INERECRUIT     E-Recruiting
FI-CA     600     11     SAPK-60011INFICA     FI-CA
FI-CAX     600     11     SAPK-60011INFICAX     FI-CA Extended
INSURANCE     600     11     SAPK-60011ININSURANC     SAP Insurance
IS-CWM     600     11     SAPK-60011INISCWM     Industry Solution Catch Weight Management
LSOFE     600     11     SAPK-60011INLSOFE     SAP Learning Solution Front-End
IS-UT     600     11     SAPK-60011INISUT     SAP Utilities/Telecommunication
IS-PS-CA     600     11     SAPK-60011INISPSCA     IS-PUBLIC SECTOR CONTRACT ACCOUNTING
IS-OIL     600     11     SAPK-60011INISOIL     IS-OIL
SEM-BW     600     11     SAPKGS6011     SEM-BW: Strategic Enterprise Management
IS-M     600     11     SAPK-60011INISM     SAP MEDIA
IS-H     600     11     SAPK-60011INISH     SAP Healthcare
ST-A/PI     01J_ECC600     0          -     Application Servicetools for ECC 600
Warm Regards
NKM

use grid display instead of list display
in grid you have an icon which display the data in excel-sheet
Regards
Phani

Similar Messages

  • How to code in the standard refresh button in ALV toolbar

    Hi Experts,
    My ALV includes some standard toolbar buttons like refresh, select all, sort, and etc. How can I put logic into the refresh button such that when user click on the refresh button, I want to run some logic on my own?
    THanks in advance.

    Hi again,
    1. Further to my previous reply
    2. This code will make it clear.
    3. just copy paste
    a. Before that, copy the SALV Standard Toolbar to ABCD as suggested before.
    <b>Important & Relevant code has been marked in bold.</b>
    4.
    report abc.
    type-pools : slis.
    Data
    data : itab like t001 occurs 0 with header line.
    DATA : fc type SLIS_T_FIELDCAT_ALV.
    Logic
    select * from t001 into table itab.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        I_PROGRAM_NAME         = sy-repid
        I_INTERNAL_TABNAME     = 'ITAB'
        I_INCLNAME             = SY-REPID
      CHANGING
        CT_FIELDCAT            = fc
      EXCEPTIONS
        INCONSISTENT_INTERFACE = 1
        PROGRAM_ERROR          = 2
        OTHERS                 = 3.
    Display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             =  SY-REPID
    <b>   I_CALLBACK_PF_STATUS_SET       = 'MYSTATUS '</b>
    <b>   I_CALLBACK_USER_COMMAND        = 'MYFORM'</b>   IT_FIELDCAT                    = FC
      TABLES
        T_OUTTAB                       = ITAB
    EXCEPTIONS
       PROGRAM_ERROR                  = 1
       OTHERS                         = 2
    <b>
    IMPORTANT
    This sets the PF Status on ALV Screen
    And not Selection screen
    FORM MYSTATUS USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ABCD'.
    ENDFORM.                    "MYSTATUS
    IMPORTANT
    When Fcode is pressed on ALV Toolbar
    FORM MYFORM USING r_ucomm LIKE sy-ucomm
                                       rs_selfield TYPE slis_selfield.
      IF R_UCOMM = 'ZREFRESH'.
    *----CODE
      ENDIF.
    ENDFORM.                    "MYFORM</b>
    regards,
    amit m.

  • ALV Grid Excel in Place using REUSE_ALV_GRID_DISPLAY

    I have a ALV grid displayed in a report and i have a bunch of layouts created by various users and the layouts works fine when selected. But when I use 'Excel'  (excel-in-place) button to export the grid into an excel sheet, the order of the columns are all jumbled up and not in sync with the ALV grid layout on the screen. However, when I use export to local file>excel option, the order of columns are in sync with the layout. Can any one explain why this is happening and how I can fix it ? Is there any OSS note or something that I need to apply ?
    PS : I am using REUSE_ALV_GRID_DISPLAY to display the report and I am building the fieldcatalog manually
    Eg :
    CLEAR r_fieldcatalog.
      MOVE 'TB_OUTPUT'  TO r_fieldcatalog-tabname.
      MOVE 'BUKRS'      TO r_fieldcatalog-fieldname.
      MOVE 'VBAK'       TO r_fieldcatalog-ref_tabname.
      MOVE 'BUKRS_VF'   TO r_fieldcatalog-ref_fieldname.
      MOVE text-f01     TO r_fieldcatalog-seltext_s.
      MOVE text-f01     TO r_fieldcatalog-seltext_m.
      MOVE text-f01     TO r_fieldcatalog-seltext_l.
      add '1' to lv_col_pos .
      move lv_col_pos to r_fieldcatalog-col_pos .
      APPEND r_fieldcatalog TO tc_fieldcatalog.
      CLEAR r_fieldcatalog.
      MOVE 'TB_OUTPUT'  TO r_fieldcatalog-tabname.
      MOVE 'VKORG'      TO r_fieldcatalog-fieldname.
      MOVE 'VBAK'       TO r_fieldcatalog-ref_tabname.
      MOVE 'VKORG'      TO r_fieldcatalog-ref_fieldname.
      MOVE text-f02     TO r_fieldcatalog-seltext_s.
      MOVE text-f02     TO r_fieldcatalog-seltext_m.
      MOVE text-f02     TO r_fieldcatalog-seltext_l.
      add '1' to lv_col_pos .
      move lv_col_pos to r_fieldcatalog-col_pos .
      APPEND r_fieldcatalog     TO tc_fieldcatalog.
    Thanks in advance,
    Shareen

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_pf_status_set = 'ALV_PF_STATUS'
          i_callback_program       = sy-repid
          is_layout                = gs_layout
          it_fieldcat              = gt_fieldcat[]
          i_default                = ' '
          i_save                   = g_save
        TABLES
          t_outtab                 = it_tab
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    and beneath this just put a form.as its shown.
    FORM alv_pf_status USING l_alv_excl TYPE STANDARD TABLE.
      SET PF-STATUS 'STANDARD_FULLSCREEN' "excluding lt_extab
                    OF PROGRAM 'SAPLSETB'.
    ENDFORM.                    "alv_pf_status

  • Excel icon in alv ouput

    Hi,
         after executing alv report iam not getting the excel icon in the alv toolbar.
    please guide me.and the spreadsheet icon is greyed out in the list->expo

    HI prakash,
    Is that the standard menu you are using or you have set your own pf-status?
    In standard menu->list->export->local file->select spread sheet radiobutton.
    This will download your data to excel sheet.
    Cheers!!
    VEnk@
    Edited by: Venkat Reddy on Oct 31, 2008 10:25 AM

  • REUSE_ALV_GRID_DISPLAY (column headings from ALV to EXCEL) Max please help

    Hi Max,
    If you remember in one of my last post I asked for changing the column headings in ALV display for example from 'Material' to 'Material used'.
    I am using
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
          I_CALLBACK_PROGRAM                = repid
          IT_FIELDCAT                       = field_body
          I_SAVE                            = g_save
          IS_VARIANT                        = g_variant
          IT_EVENTS                         = events
        TABLES
          T_OUTTAB                          = itab.
    And you suggested me the following way....
    loop at field_body into field_wa.
    case field_wa-fieldname.
      when 'Material'.
         field_wa-seltext_l = 'Material used'.
         field_wa-seltext_m = 'Material used'.
         field_wa-seltext_s = 'Material used'.
    endcase.
    modify field_body from field_wa.
    endloop.
    It is working well. In ALV display the column heading is changed to what I wanted. But the question is when I export the displayed ALV to Excel using ALV functionality, Export->Spreadsheet... I see that <b>I dont get the Column Heading into Excel as it was in the ALV display.</b>
    I get in the Excel as 'Material u' or 'Mat. Used'. But when I add this line in the code.....
    when 'Material'.
         field_wa-seltext_l = 'Material used'.
         field_wa-seltext_m = 'Material used'.
         field_wa-seltext_s = 'Material used'.
        <b> field_wa-outputlen = 20.</b>
    Then I see that I get the complete heading in the Excel. But this way the columns with outputlen 20 are taking much space in ALV display.
    Is there any fix for this. May be not mentioning the outputlen but still get the column headings into Excel as it was in ALV display.
    Anyone with ideas please respond. Waiting for replies. Thanks

    Hi
    The labels have a fixed size:
    seltext_l is long   text: 20 char
    seltext_m is medium text: 15 char
    seltext_s is short  text: 10 char
    The text 'Material used' is long 13 char so you should write:
    field_wa-seltext_l = 'Material used'.
    field_wa-seltext_m = 'Material used'.
    field_wa-seltext_s = 'Mat. used'.
    You can try to set the field colwidth_optimize of parameter IT_LAYOUT.
    This field should optimize the width of the colunm
    So
    data layout type SLIS_LAYOUT_ALV.
    layout-colwidth_optimize = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = repid
    IT_LAYOUT   = layout       
    IT_FIELDCAT = field_body
    I_SAVE = g_save
    IS_VARIANT = g_variant
    IT_EVENTS = events
    TABLES
    T_OUTTAB = itab.
    and you can decide which label has to be used:
    field_wa-seltext_l = 'Material used'.
    field_wa-seltext_m = 'Material used'.
    field_wa-seltext_s = 'Mat. used'.
    If you want to set the short text
    field_wa-ddictxt   = 'S'.
    ...medium
    field_wa-ddictxt   = 'M'.
    ...long
    field_wa-ddictxt   = 'L'.
    Max

  • Download ICONS from ALV to EXCEL

    Dear Friends,
    IS there a way of downloading the ICON image exactly
    from alv to EXCEL,right now,when the icon is downloaded
    from alv to the excel,i can only see ascii characters in
    the icon column in the excel.
    kind regards
    kaushik hegde

    Hi Jeff,
    Please check if following analysis is helpful to you.
    Analysis/Solution:
    When we export ALV data to excel worksheet, as sap notes say the maximum lenght allowed is 1023 charaters and the max no of columns supported is 90.
    (I never faced any issue related to no of columns as it worked fine for columns >90 too)
    Issue occured when row size of exported data gets more than 1023 character.
    Therefore the row data must not exceed 1023 character, otherwise column splits and moves to next row.
    One additional aspect generally missed is that:
    When data in any particular column changes it's length, alv header also changes its lengh (short text, medium text, long text; depending on the length of of the longest cell in the column)
    therefore even if you have total length of row less than 1023 character, there might be cases when your ALV header size exceeds this length.
    Reducing the header size (by forcing to use short text or specifying own header names) should resolve the issue.
    Regards,
    Parveen

  • Creation of icon in alv toolbar

    Hi All,
    i need to create a icon in alv toolbar.
    But i have not created any 'Z' program.
    i have created one function module, through that function module i am displaying the ALV grid.
    when i am copying the standard pf-status it is asking for program name. but i am using only the function module.
    pls help me on this for creating the icon in alv toolbar.
    thanks in advance.

    Hello Aishvarya,
    Perhaps the code below will help guide you along.
    FUNCTION z_alv_screen .
    *"*"Local Interface:
    *"  CHANGING
    *"     REFERENCE(ITAB) TYPE  ZSFLIGHT_TT
      DATA: gr_table TYPE REF TO cl_salv_table.
    * ALV
    *... Create Instance
      TRY.
          CALL METHOD cl_salv_table=>factory
            IMPORTING
              r_salv_table = gr_table
            CHANGING
              t_table      = itab[].
        CATCH cx_salv_msg.
      ENDTRY.
      gr_table->set_screen_status(
                  pfstatus      =  'SALV_STANDARD'
                  report        = 'SAPLZRAE'
                  set_functions = gr_table->c_functions_all ).
    *... Display Table
      gr_table->display( ).
    ENDFUNCTION.
    Edited by: Rae Ellen Woytowiez on Mar 21, 2011 5:17 PM

  • Quick & dirty OO ALV, supress info icon on toolbar, how

    Hello all,
    This is an example of a program template I use to create quick ALVs.
    I create a selection-screen 1001 and display the ALV grid on that screen.  I use this technique when my users just want to display data.  When the ALV is presented on screen 1001, clicking on the back, exit, or cancel buttons on the application toolbar exits the program.  Now I have been asked to go to screen 1000 (standard selection-screen) when exiting the ALV.
    How can I back out to selection-screen 1000, versus leaving the program?
    Thanks
    Bruce
    include rsdbc1xx.      " selection screen stuff
    parameters: p_nuthin(20) default 'Does nothing' lower case.
    selection-screen begin of screen 1001.
    selection-screen end of screen 1001.
    data: w_alv      type ref to   cl_gui_alv_grid,      " ALV grid
          i_t001 type table of t001.                 " ALV data table
    data: w_lvc_s_layo type lvc_s_layo.                  " ALV layout
    * Global table of function codes to disable
    data: lt_exclude type ui_functions.   " itab
    data ls_exclude  type ui_func.        " structure
    *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    * events at selection-screen output.
    *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    at selection-screen output.
      if sy-dynnr = '1001'.
        current_scr-mode = 'S'.
    *                                        disable functions:
        append 'SPOS' to current_scr-excl.
        append 'SCRH' to current_scr-excl.
        append 'ONLI' to current_scr-excl.    "Online execution
    *  append 'PRIN' to current_scr-excl.   "Execute and print
      endif.
    *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    start-of-selection.
    *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      select * from t001 into table i_t001.
    * Creation of the ALV object, when we use cl_gui_container=>screen0
    * as parent, the ALVGrid control will automatically use the
    * full screen to display the grid, NO CONTAINER DEFINITION IS REQUIRED !
      create object w_alv exporting i_parent = cl_gui_container=>screen0.
      w_lvc_s_layo-grid_title =
           'Grid title - 60 characters maximum'.
      data: w_is_variant type disvariant.
      w_is_variant-report = sy-cprog.
      call method w_alv->set_table_for_first_display
        exporting
          i_structure_name     = 'T001'
          is_layout            = w_lvc_s_layo
          it_toolbar_excluding = lt_exclude
          is_variant           = w_is_variant
          i_save               = 'A'
        changing
          it_outtab            = i_t001.
      call selection-screen 1001.

    Since you are creating the ALV on the Selection-screen, you would not have better control. But, you can try to remove the standard button BACK button and replace it with Selection button. Handle this button and LEAVE TO Transaction or SUBMIT to program.
    include rsdbc1xx.      " selection screen stuff
    * ADD
    TYPE-POOLS icon.
    TABLES sscrfields.
    DATA functxt TYPE smp_dyntxt.
    parameters: p_nuthin(20) default 'Does nothing' lower case.
    selection-screen begin of screen 1001.
    SELECTION-SCREEN: FUNCTION KEY 1,   " ADD
                      FUNCTION KEY 2.   " ADD
    selection-screen end of screen 1001.
    data: w_alv      type ref to   cl_gui_alv_grid,      " ALV grid
          i_t001 type table of t001.                 " ALV data table
    data: w_lvc_s_layo type lvc_s_layo.                  " ALV layout
    * Global table of function codes to disable
    data: lt_exclude type ui_functions.   " itab
    data ls_exclude  type ui_func.        " structure
    *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    * events at selection-screen output.
    *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    INITIALIZATION.
    load-OF-PROGRAM.
    at selection-screen output.
      if sy-dynnr = '1001'.
        current_scr-mode = 'S'.
    *                                        disable functions:
        append 'SPOS' to current_scr-excl.
        append 'SCRH' to current_scr-excl.
        append 'ONLI' to current_scr-excl.    "Online execution
        append 'E' to current_scr-excl.     "ADD - Back
    *  append 'PRIN' to current_scr-excl.   "Execute and print
    * ADD
        functxt-icon_id   = ICON_SYSTEM_BACK.
        functxt-quickinfo = 'Back'.
        sscrfields-functxt_01 = functxt.
      endif.
    * ADD
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
        when 'FC01'.
    *      leave to TRANSACTION.
          SUBMIT ztest_np VIA SELECTION-SCREEN.
      ENDCASE.
    *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    start-of-selection.
    *>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      select * from t001 into table i_t001.
    * Creation of the ALV object, when we use cl_gui_container=>screen0
    * as parent, the ALVGrid control will automatically use the
    * full screen to display the grid, NO CONTAINER DEFINITION IS REQUIRED !
      create object w_alv exporting i_parent = cl_gui_container=>screen0.
      w_lvc_s_layo-grid_title =
           'Grid title - 60 characters maximum'.
      data: w_is_variant type disvariant.
      w_is_variant-report = sy-cprog.
      call method w_alv->set_table_for_first_display
        exporting
          i_structure_name     = 'T001'
          is_layout            = w_lvc_s_layo
          it_toolbar_excluding = lt_exclude
          is_variant           = w_is_variant
          i_save               = 'A'
        changing
          it_outtab            = i_t001.
      call selection-screen 1001.
    Alternatively, you can use the selection screen 1000 and generate the ALV on top of that. Check the example, [Display ALV report output in the SAME Selection Screen|http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html]. This example uses the SALV, but you can very well use the ALV grid for the same purpose. In this case, you don't have to worry about the Std buttons at all!
    Regards,
    Naimesh Patel

  • Microsoft Excel Icon in ALV Grid Report

    Hi all,
    We have a customized report. When we execute that reports, it open in ALV Grid format. When we choose "Microsoft Excel" Icon to change layout to Excel, it then shows the report in excel without any data.
    Can any one please tell me that why there is no data? should i need to do any settings in excel for this?
    Please respond.
    Best Regards,
    AI

    Hi,
    Refer these:
    Microsoft Excel Icon in ALV Grid Report
    Re: Not able display the Excel Icon in ALV List Display
    Hope it helps
    Regards
    Mansi

  • ALV GRID with icon fields. When exports to Excel, icon fields are emtpy.

    Hi all,
    In our SAP system (6.0 ECC) we've noticed the following behaviour:
    In ALV GRID with icons (color lights for example...) when we export the list to Excel format with the standard button bat, the icon column is always empty.
    We think that in previous SAP version (4.7), the code corresponding to the icon appeared (For example @08@ for green light).
    It's possible to have tha same functionality in this new version like in 4.7?
    Regards.
    Edited by: Ole ES on Nov 17, 2010 6:05 PM

    Hi,
    Check the format in which you export to Excel (MHTML, XML, ...) and try antoher one.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/66/79ad48157f11d2953700a0c930328a/content.htm
    I think the integrated Excel mode shows '@08@'.
    Best regards,
    Guillaume

  • ALV TO EXCEL Using 'ALV_XXL_CALL'

    Hi,
    This is very urgent. you will reward points.
    We are trying to convert ALV TO EXCEL using this FM 'ALV_XXL_CALL'
    we are getting' Type conflict Error'.
      i_fieldcat TYPE slis_t_fieldcat_alv. " Field catalog
    w_fieldcat TYPE slis_fieldcat_alv.
    Column 1
      w_fieldcat-col_pos = v_pos.
      w_fieldcat-row_pos = 1.
      w_fieldcat-tabname = 'I_OUTPUT'.
      w_fieldcat-fieldname = c_deptno.    "Dept code
      w_fieldcat-seltext_l = 'Afdeling'(001).
      w_fieldcat-just = c_just.
      w_fieldcat-fix_column = 'X'.
      APPEND w_fieldcat TO i_fieldcat.
      CLEAR  w_fieldcat.
    Column 2
      v_pos = v_pos + 1.
      w_fieldcat-col_pos = v_pos.
        w_fieldcat-row_pos = 1.
      w_fieldcat-tabname = 'I_OUTPUT'.
      w_fieldcat-fieldname = c_deptname.    "Dept name
      w_fieldcat-seltext_l = 'Naam afdeling'(002).
      w_fieldcat-just = c_just.
      w_fieldcat-fix_column = 'X'.
      APPEND w_fieldcat TO i_fieldcat.
      CLEAR  w_fieldcat.
    CALL FUNCTION 'ALV_XXL_CALL'
      EXPORTING
        i_tabname                    = 'I_OUTPUT'
        it_fieldcat                  = i_fieldcat[]
      tables
        it_outtab                    = i_output[]
    EXCEPTIONS
       FATAL_ERROR                  = 1
       NO_DISPLAY_POSSIBLE          = 2
       OTHERS                       = 3
    please let me know row pos & col pos is correct to convert Excel and also what is field in field catalog for  columm heading in Excel sheet?  Give me some sample code.

    hi,
    check your fieldname parameter in fieldcat. pass it in caps btween ''
    check my example program
    REPORT ZSKC_ALV_XXL.
    TYPE-POOLS : KKBLO.
    DATA : ITAB LIKE T100 OCCURS 0,
    T_FCAT_LVC TYPE LVC_S_FCAT OCCURS 0 WITH HEADER LINE,
    T_FCAT_KKB TYPE KKBLO_T_FIELDCAT.
    START-OF-SELECTION.
    Get data.
    SELECT * UP TO 20 ROWS
    FROM T100
    INTO TABLE ITAB
    WHERE SPRSL = SY-LANGU.
    CHECK SY-SUBRC EQ 0.
    Create the field catalog.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    I_STRUCTURE_NAME = 'T100'
    CHANGING
    CT_FIELDCAT = T_FCAT_LVC[]
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3.
    CHECK SY-SUBRC EQ 0.
    make sure you pass the correct internal table name in the field catalog.
    t_fcat_lvC-tabname = 'ITAB'.
    MODIFY T_FCAT_LVC TRANSPORTING TABNAME WHERE TABNAME NE SPACE.
    Transfer to KKBLO format.
    CALL FUNCTION 'LVC_TRANSFER_TO_KKBLO'
    EXPORTING
    IT_FIELDCAT_LVC = T_FCAT_LVC[]
    IMPORTING
    ET_FIELDCAT_KKBLO = T_FCAT_KKB
    EXCEPTIONS
    IT_DATA_MISSING = 1
    IT_FIELDCAT_LVC_MISSING = 2
    OTHERS = 3.
    CHECK SY-SUBRC EQ 0.
    Call XXL.
    CALL FUNCTION 'ALV_XXL_CALL'
    EXPORTING
    I_TABNAME = 'ITAB'
    IT_FIELDCAT = T_FCAT_KKB
    TABLES
    IT_OUTTAB = ITAB[]
    EXCEPTIONS
    FATAL_ERROR = 1
    NO_DISPLAY_POSSIBLE = 2
    OTHERS = 3.
    IF SY-SUBRC 0.
    ENDIF.
    regards
    prasanth

  • ALV using REUSE_ALV_GRID_DISPLAY question

    Folks,
    I am use REUSE_ALV_GRID_DISPLAY for ALV report. I have customized
    the tool bar to have 3 to 4 columns as editable. In the FORM USER_COMMAND
    of ALV, at SAVE, you can check the field name and update your internal table and report the changes. No problem....
    Please note, I AM NOT using OO here. Just the regular Grid_display.
    But if I change contents of all the 4 cells in a row, how can I capture all together and save these changes back to my internal table? Any thoughts?
    -Thanks...Raj

    Thanks Chandrasekhar. That works like a charm.
    Can I ask you one more question related to the user-command.
    1) I run the report.
    2) I make changes to certain fields and save.
    3) Report displays updated rows
    4) I can add more rows etc.
    When I click on the back button, it should take me to the selection screen. Instead, it goes one screen back at a time navigating through all the screen changes.
    Have you come across this?
    Thanks, Rajesh

  • Exporting SAP report to Excel 2003 - cannot use Excel icon

    Good morning folks
    We have recently installed Excel 2003 and since then we are unable to export reports from SAP (eg ad hoc query) directly into Excel by clicking on the Excel icon - a blank Excel screen is displayed. Any assistance please.
    We are still able to export to Excel by clicking on the Print Preview icon and then clicking on the Excel icon.
    many thanks
    Dawn

    My users misled me! They were not exporting directly to Excel at all but instead to Excel embedded in the SAP Gui! I have managed to get them to do this again by changing the security settings on Excel as follows: Tools > Macro > security settings - changed from Low to Medium and ticked both boxes in Trusted Publishers.

  • ALv to excel download problems

    HI friends,
    Probelm I'm facing while saving an ALV report to Excel Sheet by clicking
    on the 'Save as File Icon' button on the ALV output.=0D
    Here data is going into a new Line after 65 columns.I've used Function
    Module 'RSAQ_ALV'.This function module is ultimately using
    'REUSE_ALV_GRID_DISPLAY' and 'REUSE_ALV_LIST_DISPLAY' function
    modules.ALV output I'm getting correctly but when I save this ALV output
    to Excel,columns are getting wrapped and going into 2nd row after 65
    columns.=0D
    Could anybody tell me what could be the reason ?=0D
    Thanks,
    Sreekanth.G
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Jul 9, 2010 12:36 PM

    ch_alv_layout-info_fieldname = 'COLOR'. "infofield for listoutput
      ch_alv_layout-colwidth_optimize = 'X'.
    try commenting the above values.and also check the Fieldcatlog.
    Check the issue similar issue was resolve by checking catalog and layout:
    [ALV Issue solution|Re: Problem when export ALV.]
    Regards,
    Gurpreet

  • Alv to excel download

    Probelm I'm facing while saving an ALV report to Excel Sheet by clicking
    on the 'Save as File Icon' button on the ALV output.=0D
    Here data is going into a new Line after 65 columns.I've used Function
    Module 'RSAQ_ALV'.This function module is ultimately using
    'REUSE_ALV_GRID_DISPLAY' and 'REUSE_ALV_LIST_DISPLAY' function
    modules.ALV output I'm getting correctly but when I save this ALV output
    to Excel,columns are getting wrapped and going into 2nd row after 65
    columns.=0D
    Could anybody tell me what could be the reason ?=0D
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Jul 9, 2010 12:37 PM

    I do not have the answer but I have experienced the same issue.  I believe the issue arrises not as a limit of the number of columns, but based upon the length of the entire data structure, as I recall.  As a work around, we use the MS Excel icon versus the Save as Local file icon.

Maybe you are looking for