Cell Selection & ALV Table (SALV_WD_TABLE)

Hi Experts,
is it possible to select  more than one cell (not row!) in an ALV Table?
I changed the cell editor to cl_salv_wd_uie_input_field and set the whole table editable.
Now I am able to select one cell, but what about multiple selections? In the Java world I found this one: TableSingleMarkableCell
Sounds good - what about ABAP?
And if there is no way with the ALV Table, how I might get the functionality with other components?
Thanks for your help, have a great week!
Hendrik
Edited by: Gedicke, Hendrik on Jul 28, 2008 11:06 AM

Hi Thomas,
I tried to integrate the cell variant TableSingleMarkableCell. But I think the ALV table does not support this cell variant, or am I wrong? The runtime class is .CL_WD_TABLE_SNGL_MARK_CELL
(see http://help.sap.com/saphelp_nw70/helpdata/EN/a5/b8fa41c915da6fe10000000a1550b0/frameset.htm)
I will try to explain:
When you want to use a cell variant, it is necessary to "add" it to a column. Therefore you can use the public method "ADD_CELL_VARIANT" of the class "CL_SALV_WD_COLUMN".
This method has got a "value" import parameter which is a referencing the class "CL_SALV_WD_CV".
The thing is that the only sub class of "CL_SALV_WD_CV" is "CL_SALV_WD_CV_STANDARD" and this means that the TableSingleMarkableCell is not supported.
Or did I made a mistake? This is my last chance to use a cell selection with the alv component.
Thanks & Regards,
Hendrik

Similar Messages

  • Making cells of ALV/ Table readonly

    Hi,
    We have some requirement in project where we have to make cells of ALV/ Table as readonly dynamically depending on the data.
    As per our understanding, we can define readonly property at column level. Is it possible to do such dynamic cell level operation in ALV / Table.
    If someone has some demo application for the same, please help us out in this issue.
    Best Regards,
    Ruchi

    Hi Ruchi.
    This can be done by using cell variants. If you serach for ALV and cell variant(s) you will find some threads regarding this topic which might help you.
    Cheers,
    Sascha

  • ABAP WD: TreeByKeyTableColumn in ALV table (SALV_WD_TABLE)

    Hello,
    is is possible to add a TreeByKeyTableColumn object to a ALV table created
    using the SALV_WD_TABLE interface?
    I know that this question has already been posted several times - but the general answer ("use hierarchy columns and set_display_type( ..)") is not satisfying, since I have got the following:
    The context node of cardinality 0..n which corresponds to the "column tree" to be displayed has got
    - one KEY attribute
    - one PARENT_KEY attribute
    - one NODE_TEXT attribute
    - several attributes which correspond to the table lines (respectively tree lines)
    Example:
    The context of cardinality 0..n has got six attributes:
    KEY, PARENT_KEY, NODE_TEXT, col1 col2 col3.
    During runtime, there are five "lines" in this node:
    KEY    PARENT_KEY    NODE_TEXT   col1 col2 col3
    1         (none)                 "node1"             a      a     a
    2         1                        "node2"             b      b     b
    3         2                        "node3"             c      c     c
    4         1                        "node4"             d      d     d
    5         (none)                 "node5"             e      e     e
    The result should be in this case as if I'd have
    - a table with the columns col1, col2, col3 and
    - a TreeByKeyTableColumn with
         -- ROW_KEY      bound to KEY
         -- PARENT_KEY bound to PARENT_KEY
         -- containing a TextView with TEXT bound to NODE_TEXT
    Result in Display:
    -> node1             a   a   a                 <= Top level node
        ---> node2        b   b   b                 <= child of node with text "node1"
    > node3   c   c   c                 <= child of node with text "node2"
        ---> node4        d   d   d                 <= child of node with text "node1"
    -> node5            e   e   e                 <= Top level node
    Can this be established with the built in hierarchy functionality of the SALV_WD_TABLE interface, too?
    When playing around with the hierarchy columns functionality of SALV_WD_TABLE, I always got extra lines for the tree nodes with empty cells to the right (which I definitly don't want), and I was not able to use the parent_key<->key information already contained in the context node attributes.
    But perhaps I have overlooked something?
    Or is it possible to get somehow, by wild navigation through the available objects/classes/interfaces of the SALV_WD_TABLE interface, a reference to the corresponding table UI element to be able to dynamically add a TreeByKeyTableColumn with the wanted bindings?
    Regards & thanks for your help
    --Ute

    Once you have created a boolean attribute 'DAYS_READONLY' in the node bound to the DATA node of ALV, you need to set this attribute to false (for that row)  if you want DAYS field to be editable when the user creates another row. In the method where you have populated the data which is being displayed make this attribute as true for those rows.
    After this where you have made the ALV config settings write the following code.
      DATA: lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
      lr_column = lr_column_settings->get_column( 'DAYS' ).
      CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'DAYS'.
      lr_column->set_cell_editor( lr_input_field ).
      lr_input_field->set_read_only_fieldname( value = 'DAYS_READONLY' ).
      CALL METHOD lr_column_settings->delete_column
        EXPORTING
          id     = 'DAYS_READONLY'
    In this code you are creating input field as a cell editor and assigning it to DAYS column. After this you are setting the readonly property of the column DAYS to the value of the column 'DAYS_READONLY'. Since this column can have different values for each row, the column DAYS will be made readonly/editable accordingly. Finally you are deleting the column DAYS_READONLY from ALV output as we do not want to display its value to the user.
    For more info you can refer to thread: [ALV  List  in the same Column for the row  CELL  i need button or value;
    Edited by: Pooja Patodia on Mar 16, 2011 9:54 AM

  • Cell selectable in table

    Hi everybody,
    is it possible to make a single cell selectable in a  table in Web Dynpro for ABAP?
    In simple ABAP it is possible and you can catch the coordinate while raising an event (button).
    In Web Dynpro when I am using "input fields" instead of "text view" for the cell editor I can go into a cell, but it isn't selected.
    By the way the table should not be editable ...
    Thanks for all answers ...

    Problem is solved.
    Solution:
    As described I have a context attribute "marked_cell" typed WDR_EXT_ATTRIBUTE_POINTER.
    After selecting a cell my method behind the button could read the coordinates with the following code.
      DATA lo_el_context    TYPE REF TO if_wd_context_element.
      DATA ls_context       TYPE wd_this->element_context.
      DATA lo_marked_cell   LIKE ls_context-marked_cell.
      DATA lv_marked_column TYPE string.
      DATA lv_marked_row    TYPE string.
    * get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    * get single attribute
      lo_el_context->get_attribute(
        EXPORTING
          name =  `MARKED_CELL`
        IMPORTING
          value = lo_marked_cell ).
    * lo_marked_cell contains direkt the column
      lv_marked_column = lo_marked_cell-attribute_name.
    * Additionaly we need the row number the user selected
      lv_marked_row = lo_marked_cell-element->get_index( ).

  • How to set two different UIE in one cell in ALV table

    Hi all,
    I have a hierachy ALV table. For some reason I want to have two UI elements in one column. For example, the text and a menu next to the text. Is it possiable to do that?
    best regards,
    Wenwen

    Hi,
    thank you for your answer. Yes, now I also find the class CL_SALV_WD_MULTI_CELL_EDITOR which could be used to set different UIE in one cell. But it is quite limited, just the following UIE could be used
    - LinkToAction 
    - LinkToURL    
    - FileDownload 
    - Button       
    - ToggleButton 
    best regards,
    Wenwen

  • Merge of Cells in ALV table in ABAP webdynpro.

    Hi All,
    We have a requirement to merge cells vertically if the consecutive cells have same data.(The merge of cells happens when we click on sort of a column.) This functionality needs to be achived with out sorting the cells.Sorted data is populated in the ALV table.
    I will be greatfull if any one can help us on this issue.
    Thanks in advance
    Regards,
    Sharath

    Hi Sarath,
    Check this..
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9b/46bb0d339b42cc8d30636ca0c9f5b6/frameset.htm
    and go through this..
    merging cells in table
    http://forums.sdn.sap.com/click.jspa?searchID=71460300&messageID=9768692
    cheers,
    Kris.
    Edited by: kissnas on Apr 18, 2011 12:10 PM

  • Sorting  ALV  Table cells

    hi
    how to group the cells of alv table.
    where all the fields having same value should be displayed once and rest of the fields should contain the varying values.
    Edited by: chythanya on May 13, 2008 1:35 PM
    Edited by: chythanya on May 13, 2008 1:36 PM

    Hello,
    Please read these: [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9] at page 9 and [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4].
    Regards,

  • How to merge the Rows in ALV table?

    Hi All,
    I want to merge the Rows in my ALV table(SALV_WD_TABLE). Is it possible?
    Regards,
    Yugesh A.

    Yogi1729 wrote:
    Hi All,
    how to Restrict the Row in the Pivot table.
    My Requirement is like this.
    i have to show the top 10 values in the pivot table but My report is show all the values.
    how can we achieve this.
    any quick solution for this appreciated.
    Thanks,
    Yogi.You can't really restrict the rows in a pivot table, but you can do this:
    http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/

  • About selecting single column in a alv table.........

    Hi Experts,
    I need single column to be selected from a ALV table...selected in da sense to be highlighted....as it happens..by default for a row.....
    I hope u understood my query...
    Please help me out in this..
    I know u all will surely help me...
    Thks and Regards,
    Runali.

    Hi Runali,
    Get the reference to the column settings of your ALV Model. Then you can get the reference of each column by passing the column ID. There is a method set_selected_state in the column class, but that does not highlight the column as it does for a row. So what you can use is a cell design for a column that will highlight the column with a color or whatever.
    lr_column = lr_column_settings->get_column( ID = id ).
    lr_column->set_cell_design( preferred design ).
    Hope this helps. Please award points if it solves your purpose.
    Regards,
    Nithya

  • How to keep selection (or select) the row of SORTED ALV table?

    Dear Experts,
    I have WD ALV table with grouped and therefore sorted layout. I know that sorted ALV beahve differently.
    The problem is that if the values in cell is updated (setting attribute of selected element of context node bound to the ALV table), then the whole table is redrawn and selection disappears. It does not happen when layout of ALV is not sorted/grouped.
    I need somehow to select the ALV line again. Method MOV_To of IF_WD_CONTEXT_NODE for some reason is not working in sorted ALV (it selects element on node but not in ALV table). And in ALV Interface controller I also could not find anything usefull.
    Thanks.
    Best regards,
    Dmitry.

    Hallo Dmitry,
    See the sap note :1445428
    [https://service.sap.com/sap/support/notes/1445428|https://service.sap.com/sap/support/notes/1445428]
    Follow this thread which suggest a work around.
    [ALV Table set lead selection while sorting is enable for a column|ALV Table set lead selection while sorting is enable for a column]

  • ALV Table - Different Search Help depending on Cell

    Hey you experts,
    For my current project I'm working on an editable ALV Table. The table has three columns and shall contain:
    1) The name
    2) The Old value
    3) The New Value
    of an item.
    The name of the item is known (e.g. Product Category, Accounting Type and so on).
    The main problem: I have/want to offer search-help to the user in the second and third column depending on the content of the first cell ==> The search help can of course differ in several rows. Example:
    NAME         OLD-VALUE         NEW-VALUE
    P.Category     Computer           Notebook
    Acc.Type.       A                            B
    The Computer field, shall have a search-help for a differnt data-type (DDIC help) than the A/B types.
    Is this possible? There should be a kind of "On-Open-F4-Help" event in which i can adjust the F4 help, which shall be used depending on the currently selected cell.
    Thanks for any help,
    greetings,
    Timo Stark

    Hey Sam,
    Yes I was able to achieve it. Create a collective search help, which includes all relevant data-elements.
    Create a search hel exit.
    Use the following code:
      IF CALLCONTROL-STEP <> 'SELONE' AND
         CALLCONTROL-STEP <> 'SELECT' AND
         " AND SO ON
         CALLCONTROL-STEP <> 'DISP'.
         EXIT.
      ENDIF.
    * STEP SELONE  (Select one of the elementary searchhelps)
    * This step is only called for collective searchhelps. It may be used
    * to reduce the amount of elementary searchhelps given in SHLP_TAB.
    * The compound searchhelp is given in SHLP.
    * If you do not change CALLCONTROL-STEP, the next step is the
    * dialog, to select one of the elementary searchhelps.
    * If you want to skip this dialog, you have to return the selected
    * elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
    * either to 'PRESEL' or to 'SELECT'.
      DATA: lv_line LIKE LINE OF SHLP_TAB,
            lv_line_tmp LIKE LINE OF SHLP_TAB.
      DATA lv_current_context_element TYPE REF TO IF_WD_CONTEXT_ELEMENT.
      DATA lv_parent_data TYPE /SIE/SRM_FYC_CHANGE.
      DATA:lv_current_node TYPE REF TO IF_WD_CONTEXT_NODE,
           lv_index TYPE i.
      IF CALLCONTROL-STEP = 'SELONE'.
        lv_current_context_element = CL_WDR_VALUE_HELP_HANDLER=>M_CONTEXT_ELEMENT.
        lv_current_node = lv_current_context_element->get_node( ).
        lv_index = lv_current_context_element->get_index( ).
        lv_current_node->get_static_attributes( exporting index = lv_index importing static_attributes = lv_parent_data ).
        "switch over parent data..
        CASE lv_parent_data-type.
          WHEN 10.
            "cost center
            lv_line-SHLPNAME = 'BBP_F4_COST_CTR'.
          WHEN 3.
            lv_line-SHLPNAME = 'COM_CAT'.
          WHEN OTHERS.
            lv_line-SHLPNAME = ''.
            callcontrol-step = 'EXIT'.
            EXIT.
         ENDCASE.
         LOOP AT shlp_tab INTO lv_line_tmp.
            IF lv_line_tmp-shlpname <> lv_line-shlpname.
              DELETE TABLE shlp_tab FROM lv_line_tmp.
              CONTINUE.
            ENDIF.
         ENDLOOP.
         callcontrol-step = 'PRESEL'.
        EXIT.
      ENDIF.
    * STEP PRESEL  (Enter selection conditions)
    * This step allows you, to influence the selection conditions either
    * before they are displayed or in order to skip the dialog completely.
    * If you want to skip the dialog, you should change CALLCONTROL-STEP
    * to 'SELECT'.
    * Normaly only SHLP-SELOPT should be changed in this step.
      IF CALLCONTROL-STEP = 'PRESEL'.
    *   PERFORM PRESEL ..........
        EXIT.
      ENDIF.
    * STEP SELECT    (Select values)
    * This step may be used to overtake the data selection completely.
    * To skip the standard seletion, you should return 'DISP' as following
    * step in CALLCONTROL-STEP.
    * Normally RECORD_TAB should be filled after this step.
    * Standard function module F4UT_RESULTS_MAP may be very helpfull in this
    * step.
      IF CALLCONTROL-STEP = 'SELECT'.
    *   PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB
    *                       CHANGING SHLP CALLCONTROL RC.
    *   IF RC = 0.
    *     CALLCONTROL-STEP = 'DISP'.
    *   ELSE.
    *     CALLCONTROL-STEP = 'EXIT'.
    *   ENDIF.
        EXIT. "Don't process STEP DISP additionally in this call.
      ENDIF.
    * STEP DISP     (Display values)
    * This step is called, before the selected data is displayed.
    * You can e.g. modify or reduce the data in RECORD_TAB
    * according to the users authority.
    * If you want to get the standard display dialog afterwards, you
    * should not change CALLCONTROL-STEP.
    * If you want to overtake the dialog on you own, you must return
    * the following values in CALLCONTROL-STEP:
    * - "RETURN" if one line was selected. The selected line must be
    *   the only record left in RECORD_TAB. The corresponding fields of
    *   this line are entered into the screen.
    * - "EXIT" if the values request should be aborted
    * - "PRESEL" if you want to return to the selection dialog
    * Standard function modules F4UT_PARAMETER_VALUE_GET and
    * F4UT_PARAMETER_RESULTS_PUT may be very helpfull in this step.
      IF CALLCONTROL-STEP = 'DISP'.
    *   PERFORM AUTHORITY_CHECK TABLES RECORD_TAB SHLP_TAB
    *                           CHANGING SHLP CALLCONTROL.
        EXIT.
      ENDIF.
    greetings

  • How To Edit Selected Row In ALV Table

    Hello Experts,
    In My Webdynpro Application, I am displaying records from database table into an ALV Table.
    I want to edit only selected record from  ALV table.
    Please Suggest How to achieve this.
    Thanks,
    Pratibha

    The link given above is for the UI element 'Table' and does not pertain to ALV.
    To Make an ALV Editable on lead selection for that particular lead selected row.
    1. The ALV should be made lead selectable, when initializing
    2. The ON_LEAD_SELECT function should be invoked.
    3. Withing this function the index has to be retrieved to know which row was selected.
    4. Based on the index retrived all the columns have to pass FALSE to read_only in the column properties.
    Regards,
    Pramod

  • How to create a context menu in ALV table cell editor(Webdynpro abap )

    Hello Experts,
    I am having a problem in creating a context menu in a table cell editor in the ALV table output.I have assigned a 'lta' as the cell editor.But befor assigning the lta as cell editor I have assigned the menu to the lta.But when the view is rendered I can see the lta with the actioned assigned to it.But I cannot see the context menu.
    The code snippet below:
      "Create menu for each coloumn
      create OBJECT lo_menu_actions type CL_SALV_WD_VE_MENU EXPORTING
          id = 'MITM_ACTIONS'.
      lo_menu_actions->set_visible( value = abap_true ). 
      lo_menu_actions->set_visible_fieldname( value = 'ACTIONS' ).
      "ADd menu items
      CREATE OBJECT lo_menu_item_create type CL_SALV_WD_VE_MENU
      exporting
        id = 'MITM_CREATE_EXPRESSION'.
      lo_menu_item_create->set_visible( value = abap_true ).
      lo_menu_item_create->set_visible_fieldname( value = 'Create' ).
      "Add item 1
      lo_menu_actions->ADD_ITEM( VALUE = lo_menu_item_create ). 
      "  Set the cell editor for each column cell(link to an action)
      LOOP AT lt_node_dec_tab_cols INTO ls_node_dec_tab_cols .
        lv_column_name = ls_node_dec_tab_cols-object_name.
        lr_column = lr_column_settings->get_column( lv_column_name ).
       "Create 'lta' Ui item
        CREATE OBJECT lo_lta TYPE cl_salv_wd_uie_link_to_action.
        lo_lta->set_menu( value = lo_menu_actions ).
        lo_lta->set_text_fieldname( lv_column_name ).
        lr_column->set_cell_editor( lo_lta ).
        IF ls_node_dec_tab_cols-is_result EQ abap_true.
          lr_column->set_cell_design( value =
                      cl_wd_table_column=>e_cell_design-key_medium ).
        ENDIF.
      ENDLOOP.

    Hi Prakash,
    I have not come across this requirement till now to have context menu in a cell editor of alv.
    Unfortunately  the implementation of method SET_MENU of alv ui elements ( ex: cl_salv_wd_uie_text_view ) is not updating alv configurable table, instead it just stores in a global attribute as string. Hence has no effect on context menu.
    If your user is very particular about this requirement of having context menu in cell editor, you can go for a normal table. Because, normal table's cell editor has the property to set the menuID as we do it for other ui elements.
    Regards,
    Rama

  • How to give color of particular cell in alv list display for dynamic table

    Dear Experts,
    i want to give color of a particular cell in alv list display (reuse_alv_list_display). Here i am passing data through dynamic table?

    Hi,
    Se this:
    DATA: lt_color    TYPE lvc_t_scol WITH HEADER LINE.
    DATA: BEGIN OF data_tab OCCURS 0.
             tabcolor     TYPE   lvc_t_scol,
          END OF data_tab.
    * Befone ALV call
      alv_layout-coltab_fieldname  = 'TABCOLOR'.
    * For each row in data_tab
    REFRESH: lt_color.
    CLEAR: lt_color.
    lt_color-color-col = 6.
    lt_color-color-int = 1.
    lt_color-fname = FIELD1'.
    APPEND lt_color.
    lt_color-color-col = 2.
    lt_color-color-int = 0.
    lt_color-fname = 'FIELD2'.
    APPEND lt_color.
    data_tab-tabcolor[] = lt_color[].
    append data_tab.
    Best regards,
    Leandro Mengue

  • How to get the position of a selected cell in a table ?

    Hi,
    How can I get the position of a selected cell in a table or in a list multicolumn cmd ?
    Thanks.

    Invoke node >>> point to Row Column
    Ben
    Message Edited by Ben on 07-19-2007 03:14 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Point_To_Row_Column.PNG ‏22 KB

Maybe you are looking for

  • Problem in sql statement

    hi,      how write this query in sap select timestamp,sum(compsubqty) from componentinfo where lotid ='U7084056.1'  and Compsubqty>0 having  sum(compsubqty)=25304 group by timestamp order by timestamp desc help me regards sivakumar

  • HT4906 where did many of my pictures in photo stream go to after I  backed up my phone to get deleted text messages

    Where did my photo stream pictures disappear to after I backed up my iphone4s to retrieved deleted text messages. I need them back to my phone.

  • Asus Monitor Display

    This question is quite elementary, but understand I am new to mac.....I've connected a hdmi cable through the thunderbolt port for my primary display to be on an Asus 24" monitor.  When I close my laptop, it goes to sleep and my display on the monito

  • ESS SP11  upgrade error in travel request

    Dear All, We have recenlty up graded to ESS-SP11 package, The intial travel request is coming. But When I click on "dditional destination" or "Review" button , The following dump is coming. The same is happening in travel expense as well. The error i

  • Why won't my contacts update

    I have a macbook air and I use the imeessge feature. However my any new numbers I imessage with they wont update. My phone is updated with the new information for the contact. I've connected my mac to my phone and no updates. Is there a setting I nee