DropDown By Index for a Column in ALV

Hi,
I am trying to create a dropdown for a column in ALV. I have used the following code for the same.
data:
          lr_drdn_by_index type ref to cl_salv_wd_uie_dropdown_by_idx.
        create object lr_drdn_by_index
          exporting
            selected_key_fieldname = ls_column-id.
        lr_drdn_by_index->set_valueset_fieldname( 'VALUESET' ).
        lr_drdn_by_index->set_type( if_salv_wd_c_uie_drdn_by_index=>type_key_value ).
        ls_column-r_column->set_cell_editor( lr_drdn_by_index ).
"VALUESET" Contains the Dropdown Data.
Is there any settings that I have to do which is missing?
Regards,
Shruthi

Hi,
follow these steps :
1) create a node for example (NODE_LIST)
2) crrate an attribute (LIST: type WDY_UIE_LIBRARY_ENUM_TYPE)
3) in your WDDOINIT method, populate your list :
lr_node = wd_context->get_child_node('NODE_LIST').
lr_node_info = lr_node->get_node_info( ).
ls_value_set-key = 10.
ls_value_set-value = 'tes'.
INSERT ls_value_set INTO TABLE lt_value_set.
ls_value_set-key = 20.
ls_value_set-value = 'tes'.
INSERT ls_value_set INTO TABLE lt_value_set.
lr_node_info->set_attribute_value_set(
name = 'LIST'
value_set = lt_value_set ).
4) in your table settings :
data :
list_field    TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
CREATE OBJECT list_field
      EXPORTING selected_key_fieldname  = ls_columns-id.
ls_columns-r_column->set_cell_editor( list_field ).
I hoep this helps, if not please clarify your question.
Regards

Similar Messages

  • Multi-column Index vs One index for each column

    Hello everyone,
    i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
    The table has 34 columns, no primary key, no unique keys.
    The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
    can any one help me on what kind of indexes do i have to create?
    1. one index for each column used in "where clause"
    2. one index for 8 columns and some other indexes for other used columns
    3. one index for all columns
    or something else etc...
    br flag

    i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
    The table has 34 columns, no primary key, no unique keys.
    The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
    can any one help me on what kind of indexes do i have to create?
    1. one index for each column used in "where clause"
    2. one index for 8 columns and some other indexes for other used columns
    3. one index for all columns
    or something else etc...What's the version of your data base? what kind of database you have, DWH or OTLP? The answer might depend on the type of database as far as bitmap indexes might suit or might not depending if you are runing DWH or OLTP kind of database
    Let me suppose that you are runing OLTP database and you have a where clause with 8 columns.
    1) are all those where clause equalities (where col1 = and col2 =) or there are inequalities?
    2) could you evaluate the most repetitive columns?
    3) could you know the column that could have the best clustering factor (the column which most follow a certain order in the table)
    Based on that I would suggest to create one b-tree index having 8 columns (even though that it seems for me to high) this index should follow the following points:
    1) put the most repetitive column at the leading edge (and compress the index if necessary)
    2) put the columns that are used in equalitity predicate first
    3) put the column having the best clustering factor first
    The most precise index you have the best access you could gain.
    Of course that you have to know that an index access is not always good and a FULL table scan is not always bad.
    Best regards
    Mohamed Houri
    www.hourim.wordpress.com

  • How to create  index for a column of a view

    Hi,
    I have created view for a table and then i am trying to create index for a column of that view. i am using the query "CREATE INDEX index_name ON view_name (col)". but Mysql is showing error like "view_name is not a base table".
    How can i do that......

    As mentioned this is a java forum not a mysql forum, but as I know the answer - you can't create an index directly on a view in mysql.

  • More than one index for a column.

    Hi,
    I am trying to create more than one index for a particular column of the table.But oracle does not allow more than one index for a column.
    I just want to make sure whether we can add more than one index for a column
    and if yes what are the scenarios.
    Because as far as i know some database allows more than one index for a single column.

    You cannot create more than one index for the same column(s).This is not so true Nicolas. Look at following example:
    SQL> create index idx_mytest_id on mytest(id);
    Index created.
    SQL> create index idx_mytest_id_desc on mytest(id desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_upper on mytest(upper(id));
    Index created.
    SQL> create index idx_fbi_mytest_id_upper_desc on mytest(upper(id) desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_lower_id on mytest(lower(id));
    Index created.
    SQL> create index idx_fbi_mytest_id_lower_id_dsc on mytest(lower(id) desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_tr_up on mytest(trunc(upper(id)));
    Index created.
    -- I can still continue but for this example this will be enough
    SQL> select index_name from dba_indexes where table_name = 'MYTEST';
    INDEX_NAME                                                                                                    
    IDX_MYTEST_ID                                                                                                 
    IDX_FBI_MYTEST_ID_UPPER                                                                                       
    IDX_MYTEST_ID_DESC                                                                                            
    IDX_FBI_MYTEST_ID_UPPER_DESC                                                                                  
    IDX_FBI_MYTEST_ID_LOWER_ID                                                                                    
    IDX_FBI_MYTEST_ID_LOWER_ID_DSC                                                                                
    IDX_FBI_MYTEST_ID_TR_UP                                                                                       
    7 rows selected.You can see 7 indexes for one column (ID) and I could still continue...
    So according this test we can say you can't create more than one index for one column (or the same group of columns in case of composite index) with same condition(s).
    Message was edited by:
    Ivan Kartik
    Or simplified: you can't create the same index for same column(s) twice :-)

  • How to populate table editor which has dropdown by index in a column

    Hi Experts,
    I have a table editor with 3 columns.
    Column 1. DD By Index - Subjects
    Column2: marks ( input field )
    column3: Result ( text view)
    On an action of button on top of the view, i am getting the data for column2 and 3 and populating the node but i am unable to populate the column 1 Dropdown by Index.
    My Node looks like this:
    Node_Parent
       Node_DD
          Subject_Text
       Marks
       Result
    When i get the internal table for Node_parent i am not getting Node_dd in that, so i am populating Marks and Result. binding it.
    again looping on lt_parent and binding the node_dd.
    it works fine when there is one row in lt_parent, its going for dump when its more than 2 records.
    What am i missing while binding the subnode Node_DD while looping?
    Any clue is highly appreciated.
    Note: I am not using Supply Function to populate the subnode.
    Ajay
    Edited by: ajay matam on Aug 1, 2011 12:40 PM

    Hi,
    Parent Node and Child node has cardinality 0 to N only.
    I am getting the child node of the parent.
    Lo_node_parent->get_child_node ( name = 'Node_dd' )
    i am trying to bind an internal table to Lo_node_parent but i am getting a dump with error
    "COMPONENTCONTRLLER.1.PARENT.2.NODE_DD.NODE_DD" does not exist.
    Binding works when there is one record in Parent node
    loop at lt_parent into ls_parent.
    binding the child node
    endloop.
    above thing works fine when there is one record, but when there are more than 1 record i am getting the above error.
    Ajay
    Edited by: ajay matam on Aug 1, 2011 1:40 PM

  • How to hide headers for specified columns in ALV?

    Hallo guyes,
    is it possible to hide headers just for a few columns in ALV?
    Something like no_headers but just for defined columns...
    Is it also possible to define column description in two lines?
    Thanks.

    Hi,
    Check the below code
    codeFORM prep_fieldcat_xls USING lt_fieldcat_xls TYPE slis_t_fieldcat_alv.
    RANGES: lra_fieldname FOR field_ran.
    DATA: lwa_fieldcat_xls TYPE slis_fieldcat_alv.
    Build range for all unwanted columns:
    lra_fieldname-option = 'EQ'.
    lra_fieldname-sign = 'I'.
    lra_fieldname-low = 'EEP'.
    APPEND lra_fieldname.
    Remove the unwanted columns from the fieldcatalog:
    lt_fieldcat_xls] = lt_fieldcat[.
    LOOP AT lt_fieldcat_xls INTO lwa_fieldcat_xls
    if lwa_fieldcat_xls-fieldname = lra_fieldname-low. "Change here as it is
    lwa_fieldcat_xls-no_out = 'X'.
    endf.
    MODIFY lt_fieldcat_xls FROM lwa_fieldcat_xls INDEX sy-tabix.
    ENDLOOP.[/code]
    Regards,
    Raj.

  • Average sum for a column in ALV tree layout

    Hi,
    I've trying to set an average sum for a column in an ALV tree report.  In the field catalog i set the DO_SUM field to 'X' and this will do a total sum, but I can't find out how in the code to do the average sum.
    Also to get round this I was going to just set a default display variant with the "average" sum option saved after i had manually selected the columns and set it to this.  Problem with this is that when i re-run it, the sum comes back as a total rather than an average.  I have tried setting display variants on the SAP example ALV tree programs and the same thing happens.
    Does anyone know how i can get round this?
    Cheers
    Matt.

    Hi,
    In addition to setting DO_SUM = 'X' you need to specify function in H_FTYPE field. It should be set to 'AVG' in your case.
    ls_fielcat-do_sum = 'X'.
    ls_fieldcat-h_ftype = 'AVG.

  • Mulitple Line column headers for a column in ALV using Web Dynpro for ABAP

    Hi WD4A Gurus,
           I have requirement to display the header name in multiple lines for a single column using ALV. How to achieve this, do I need to do some custom code? Please help me with sample code.
    Example:
    existing column name :
                Name   |  Date (mm/dd/yyyy) | Amount
    required column name:
                Name   |    Date               | Amount
    (mm/dd/yyyy)
    Thanks
    Ketan

    Displaying header in multiple lines is not possible in alv
    Regards
    Tamil

  • To make different colours for the columns of ALV report in Grid display.

    Hai Friends,
                       I have created an ALV report in grid display method by using the call function reuse_alv_grid_display.
    I have obtained the report.In that report i want to change the colour of each column.Plz provide the answer with a sample program.
                    Thank u.

    hi i had a program  for the rows with diff colors....do the same thing for the columns..
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) type c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           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.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    data: ld_color(1) type c.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    *Populate field with color attributes
    loop at it_ekko into wa_ekko.
      ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
      if ld_color = 8.
        ld_color = 1.
      endif.
      concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
      modify it_ekko from wa_ekko.
    endloop.
    endform.                    " DATA_RETRIEVAL
    regards,
    venkat

  • How to put colours for a column in ALV

    Dear All,
    I need to put green colour for 1 column in an ALV report.
    Can anybody tell me how we can do that ...
    Thanking you in advance,
    Shankar

    Here's a little sample program.....  this illistrates coloring at the column, row, and cell level.
    report zrich_0002 .
    * Use of colours in ALV grid (cell, line and column)            *
    * Table
    tables : mara.
    * Type
    types : begin of ty_mara,
              matnr         like mara-matnr,
              matkl         like mara-matkl,
              counter(4)    type n,
              free_text(15) type c,
              color_line(4) type c,           " Line color
              color_cell    type lvc_t_scol,  " Cell color
    end of ty_mara.
    * Structures
    data  : wa_mara     type ty_mara,
            wa_fieldcat type lvc_s_fcat,
            is_layout   type lvc_s_layo,
            wa_color    type lvc_s_scol.
    * Internal table
    data : it_mara     type standard table of ty_mara,
           it_fieldcat type standard table of lvc_s_fcat,
           it_color    type table          of lvc_s_scol.
    * Variables
    data : okcode like sy-ucomm,
           w_alv_grid          type ref to cl_gui_alv_grid,
           w_docking_container type ref to cl_gui_docking_container.
    parameters : p_column as checkbox,
                 p_line   as checkbox,
                 p_cell   as checkbox.
    at selection-screen output.
      perform get_data.
      perform fill_catalog.
      if w_docking_container is initial.
        perform create_objects.
      endif.
    *&      Form  create_objects
    form create_objects.
      create object w_docking_container
        exporting
          ratio                       = 60
        exceptions
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          others                      = 6.
      create object w_alv_grid
        exporting
          i_parent          = w_docking_container.
    * Field that identify color line in internal table
      move 'COLOR_LINE' to is_layout-info_fname.
    * Field that identify cell color in inetrnal table
      move 'COLOR_CELL' to is_layout-ctab_fname.
      call method w_alv_grid->set_table_for_first_display
        exporting
          is_layout                     = is_layout
        changing
          it_outtab                     = it_mara
          it_fieldcatalog               = it_fieldcat
        exceptions
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          others                        = 4.
    endform.
    *&      Form  get_data
    form get_data.
      select * from mara up to 5 rows.
        clear : wa_mara-color_line, wa_mara-color_cell.
        move-corresponding mara to wa_mara.
        add 1                   to wa_mara-counter.
        move 'Blabla'           to wa_mara-free_text.
        if wa_mara-counter = '0002'
        and p_line = 'X'.
    * Color line
          move 'C410' to wa_mara-color_line.
        elseif wa_mara-counter = '0004'
        and p_cell = 'X'.
    * Color cell
          move 'FREE_TEXT' to wa_color-fname.
          move '6'         to wa_color-color-col.
          move '1'         to wa_color-color-int.
          move '1'         to wa_color-color-inv.
          append wa_color to it_color.
          wa_mara-color_cell[] = it_color[].
        endif.
        append wa_mara to it_mara.
      endselect.
    endform.
    *&      Form  fill_catalog
    form fill_catalog.
    * Colour code :                                                 *
    * Colour is a 4-char field where :                              *
    *              - 1st char = C (color property)                  *
    *              - 2nd char = color code (from 0 to 7)            *
    *                                  0 = background color         *
    *                                  1 = blue                     *
    *                                  2 = gray                     *
    *                                  3 = yellow                   *
    *                                  4 = blue/gray                *
    *                                  5 = green                    *
    *                                  6 = red                      *
    *                                  7 = orange                   *
    *              - 3rd char = intensified (0=off, 1=on)           *
    *              - 4th char = inverse display (0=off, 1=on)       *
    * Colour overwriting priority :                                 *
    *   1. Line                                                     *
    *   2. Cell                                                     *
    *   3. Column                                                   *
      data : w_position type i value '1'.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'MATNR'    to wa_fieldcat-fieldname.
      move 'MARA'     to wa_fieldcat-ref_table.
      move 'MATNR'    to wa_fieldcat-ref_field.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'MATKL'    to wa_fieldcat-fieldname.
      move 'MARA'     to wa_fieldcat-ref_table.
      move 'MATKL'    to wa_fieldcat-ref_field.
    * Color column
      if p_column = 'X'.
        move 'C610'     to wa_fieldcat-emphasize.
      endif.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position to wa_fieldcat-col_pos.
      move 'COUNTER'  to wa_fieldcat-fieldname.
      move 'N'        to wa_fieldcat-inttype.
      move '4'        to wa_fieldcat-intlen.
      move 'Counter'  to wa_fieldcat-coltext.
      append wa_fieldcat to it_fieldcat.
      add 1 to w_position.
      clear wa_fieldcat.
      move w_position  to wa_fieldcat-col_pos.
      move 'FREE_TEXT' to wa_fieldcat-fieldname.
      move 'C'         to wa_fieldcat-inttype.
      move '20'        to wa_fieldcat-intlen.
      move 'Text'      to wa_fieldcat-coltext.
      append wa_fieldcat to it_fieldcat.
    endform.
    Regards,
    Rich HEilman

  • Deactivate Tooltips for every column in ALV

    Hi Everybody,
    how can i deactivate the tooltip for every column in a ALV.
    regards,
    Sid

    The logic to set the tooltip goes something like this:
    data l_table type ref to cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
      data l_column type ref to cl_salv_wd_column.
    data l_header type ref to cl_salv_wd_column_header.
      l_column = l_table->if_salv_wd_column_settings~get_column( 'CREATED_BY' ).
      l_header = l_column->get_header( ).
      l_header->set_prop_ddic_binding_field(
        property =  if_salv_wd_c_ddic_binding=>bind_prop_tooltip
        value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
      l_header->set_tooltip( ` ` ).
    However this logic just sets it for one column at a time.  If you want to do all of them then you would need to loop through a listing of the columns and repeat this logic for each one. Instead of using if_salv_wd_column_settingsget_column, you could use the method if_salv_wd_column_settingsget_columns to return an internal table of object instances for each column object defined in the ALV.

  • Single heading for Multiple columns in ALV

    Hi Experts,
          I need to display a common column heading for multiple columns in my ALV Grid Display output. I am giving the sample output here.
    MATNR...WERKS..| Unrestricted Stock|....|Stock in transfer        |....|Stock in Quality|.
    ............................| CAT | SAP  | Differe| .. |  CAT   |  SAP  | Diff   | .. | CAT   |  SAP  | Diff  |
    As I shown above, for 3 columns CAT, SAP, and for Difference, I need to get "Unrestricted Stock" as column heading... and so on...
    Pl. suggest me on this.
    Thanks in Advance
    Ramakrishna

    Hello Ramki,
    NOT POSSIBLE IN ALV AT ALL :-((
    You have to use classical report using WRITE stmts for this.
    If your client does not want to lose ALV functionalities, then you can try something like.
    Unrestricted Stock-SAP | Unrestricted Stock-CRM | Unrestricted Stock-Diff. Stock ... and so on !!!
    BR,
    Suhas
    Edited by: Suhas Saha on Jan 21, 2009 3:00 PM

  • Dark Blue color for a column in ALV

    Hii all,
    How can we make one of the columns in ALV to display in dark blue color?
    Please suggest
    Thanks

    Hi Shakri,
    I hope your know how to color a column in ALV, so here i am giving the color codes which we can use.
    <i>1
    or COL_HEADING
    Headers (grayish blue)
    2
    or COL_NORMAL
    List body (bright gray)
    3
    or COL_TOTAL
    Totals (yellow)
    4
    or COL_KEY
    Key columns (bluish green)
    5
    or COL_POSITIVE
    Positive threshold value (green)
    6
    or COL_NEGATIVE
    Negative threshold value (red)
    7
    or COL_GROUP
    Control levels (violet)</i>
    Regards,
    Raghav

  • Calculating Totals for a column in ALV Grid Display

    Hi All,
      I frustrated with the problem of simple calculating total for a column. I wrote the following code:
      LW_CATALOG-TABNAME   = P_GV_STRUCT.
      LW_CATALOG-FIELDNAME = 'ZSUMMS'.
      LW_CATALOG-DO_SUM    = GC_X.
      APPEND LW_CATALOG TO G_FIELDCAT_TAB.
      CLEAR LW_CATALOG.
    It is not working. Could you please suggest the solution?
    It would be great help to me.
    Advanced Thanks,
    Phani Kumar

    Phani,
    Did u try playing around with any of these layout fields ?
    no_sumchoice(1),       " no choice for summing up
    no_totalline(1),       " no total line
    no_subchoice(1),       " no choice for subtotals
    no_subtotals(1),       " no subtotals possible
    no_unit_splitting  " no sep. tot.lines by inh.units
    totals_before_items,   " diplay totals before the items
    totals_only(1),        " show only totals
    totals_text(60) ,      " text for 1st col. in total line
    subtotals_text(60) ,    " text for 1st col. in subtotals
    b. Addtionally... not a solution.. but u know...
    just try the same code iwth reuse_alv_list_display and see if the total gets displayed properly ?

  • Headings for Synamic Columns in ALV Grid ?

    Dear All,
    I have a fieldsymbol which is of type table and has a dynamic content in it.
    Eg. Say my Field Symbol when displayed in the Output has the following Output >
    Object Table Name 2002 2003 2004 2002 2003 2004
    " 2002,2003,2004 are the dynamic columns --> for the number of entries in that year.
    ' The 2nd time 2002,2003,2004 is -->  for the Size of entries in that Year.
    Since I can't show the User with the same heading for both
    a. Number of Entries and
    b.  Size
    I want a heading for both of these values like for the first 2002,2003,2004 set I want a heading saying Total number of Records
    and for the next set of years 2002,2003,2004 Iwant a heading saying Total Size.
    Is it possible ?
    If so how ?
    Hope I'm clear in explaining my scenario !
    Thanks & regards,
    Deepu.K

    Check on this forum on ALV OO and fieldcatalog.
    In the fieldcatalog you can define dynamically the columns to be displayed including their heading.
    regards
    Hans

Maybe you are looking for