ALV Table row not selected, on_lead_select not fired

Hi all,
I build a ALV grid with a dynamic node:
IF lv_check_child_node NE 'X'.
     CALL METHOD lo_nd_root->add_new_child_node
        EXPORTING
*          supply_method                =
*          supply_object                =
*          dispose_method               =
*          dispose_object               =
*          static_element_type          =
          name                         = 'ALV_RESULT'
          is_mandatory                 = abap_true
          is_mandatory_selection       = abap_false
          is_multiple                  = abap_true
          is_multiple_selection        = abap_false
          is_singleton                 = abap_true
          is_initialize_lead_selection = abap_false
          static_element_rtti          = lr_strucdescr
          is_static                    = abap_true
*          attributes                   =
        RECEIVING
          child_node_info              = lo_nd_alv_result.
    ENDIF.
    lo_nd_result = wd_context->get_child_node( name = lv_tab_name ).
    lo_nd_result->bind_table( new_items = <lt_alv_tab> ).
* Instantiate ALV component
    l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
    IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
      l_ref_cmp_usage->create_component( ).
    ENDIF.
    lo_nd_result = wd_context->get_child_node( name = lv_tab_name ).
    l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
    l_ref_interfacecontroller->set_data(
      r_node_data = lo_nd_result ).
    l_ref_interfacecontroller->get_model( RECEIVING value = lr_cmdl ).
    lr_cmdl->if_salv_wd_std_functions~set_export_allowed( abap_false ).
    lr_cmdl->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
    lr_cmdl->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).
*  lr_cmdl->if_salv_wd_table_settings~set_design( cl_wd_table=>e_design-alternating ).
    lr_cmdl->if_salv_wd_table_settings~set_selection_mode( cl_wd_table=>e_selection_mode-single ).
    lr_cmdl->if_salv_wd_table_settings~set_cell_action_event_enabled( value = abap_true ).
    lr_cmdl->if_salv_wd_table_settings~set_data_check( if_salv_wd_c_table_settings=>data_check_on_cell_event ).
*    lr_cmdl->if_salv_wd_table_settings~set_read_only( value = abap_false ).
*    lr_cmdl->if_salv_wd_table_settings~set_enabled( value = abap_true ).
    lr_cmdl->if_salv_wd_table_settings~set_row_selectable( value = abap_true ).
    IF lt_fieldcat IS NOT INITIAL.
      lt_col = lr_cmdl->if_salv_wd_column_settings~get_columns( ).
      LOOP AT lt_fieldcat INTO ls_fieldcat.
        READ TABLE lt_col INTO ls_col WITH KEY id = ls_fieldcat-fieldname.
        IF sy-subrc = 0.
          ls_col-r_column->set_position( ls_fieldcat-col_pos ).
          CALL METHOD ls_col-r_column->get_header
            RECEIVING
              value = lr_header.
          lr_header->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_none ).
          lv_headertx = ls_fieldcat-seltext_l.
          lr_header->set_text( lv_headertx ).
        ELSE.
          ls_col-r_column->set_visible( cl_wd_uielement=>e_visible-none ).
        ENDIF.
      ENDLOOP.
    ENDIF.
But when I execute the dynpro, I get all the data I want. But I cannot select any row and the ON_LEAD_SELECT is not executed (an eventhandler is made in the method tab, and the event is bind to this handler).
When I change from selection_mode single to single_no_lead, I can select the row but the event is still not executed (not strange).
Is there anybody who can help me. We have support package SAPKB70020.
Regards,
Michael

Have you set the Initialization Lead Selection of the node as abap_true?
Also Check the below thread:
Unable to selelct a Row in ABAP Webdynpro ALV table

Similar Messages

  • Table Rows with Multiple Conditions Not Showing Up in RH

    Hi everyone,
    I'm currently evaluating TCS2 (Framemaker 9 and RoboHelp 8 on Windows XP) and have come across the following issue:
    One of our FrameMaker source files contains a table in which one of the rows has multiple conditions applied. When one of the conditions is shown in Framemaker, and the others are hidden, the row is displayed in Framemaker as expected. However, when the file is then imported or linked into Robohelp, the same table row vanishes, even though the Apply FrameMaker Conditional Text Build Expression check box is selected in the Framemaker Conversion Settings > Other Settings screen. This only appears to affect table rows - when paragraph text is tagged with the same conditions, it is imported correctly into RoboHelp.
    For example, when Condition B is shown and Condition A is hidden in the Framemaker file, the content appears like this in Frame:
    Unconditional
    Unconditional
    Condition A and Condition B applied
    Condition A and Condition B applied
    Condition B applied
    Condition B applied
    Paragraph text with Condition A and Condition B applied.
    Paragraph text with Condition B applied.
    When the same file is imported into RoboHelp, the row with both conditions applied is absent from the table:
    Unconditional
    Unconditional
    Condition B applied
    Condition B applied
    Paragraph text with Condition A and Condition B applied.
    Paragraph text with Condition B applied.
    Installing patches 8.0.1 and 8.0.2 did not resolve the issue (and actually caused other, unrelated issues) and I see the same behavior regardless of whether I import or link the FrameMaker document.
    Has anyone else seen this issue? Any help would be much appreciated.
    Thanks
    DaveB

    It just seems that the items I select as align to top in the
    property inspector should force the items to the top of their
    cells, unless I'm missing something.

  • Insert table row - moving Selection

    Have a table row selected and new data is inserted and the table rows are moving down. When first row is NOT selected and new table row has fired inserted, the selection row programatically moves down.
    However if the first row is selected, and new data is added to the first row, the first and second row are selected even tho its programatically should work, just like if the row selected was second, third etc...
    What's up with the first table row selected and new data inserted into the first table row to cause selection unions, even tho programatically it shouldn't?
    Thanks
    Abraham Khalil

    After the row being inserted, have you tried
    table.setRowSelectionInterval(row1,row2)?
    And in case it is the first row,
    table.setRowSelectionInterval(0,0);
    And you can even scroll to show the selection if you want by call
    table.scrollRectToVisible(getCellRect(selectedRow, 0, true));
    which will show the selectedRow
    HTH
    Bing
              

  • How to get the index of table row without selection?

    Hi all,
    I have an table designed in XML view.Now i have added an change method for qty cell "valqty". When user inputs the qty in the cell and press enter this method is triggered now I want to know which index of the table is currently edited.Through which i can get the value of other cell in the same row.
    NOTE: The table row doesn't have selection either multiple or single
    I tried the following inside the valqty method but it now working
    this.getValue();
    this.getBindingContext().getProperty('PRD_NUM');
    <Table id="idProductsTable"
    inset="false"
    items="{oModel>/deliverylist}"
    visibleRowCount= "7"
    mode="MultiSelect"
    modeAnimationOn="true">
    <headerToolbar>
    <Toolbar>
    <Label text="Products"></Label>
    </Toolbar>
    </headerToolbar>
    <columns>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Order" />
    </Column>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Quantity" />
    </Column>
    </columns>
    <items>
    <ColumnListItem>
    <cells>
    <Text text="{oModel>PRD_NUM}" />
    <Input value="{oModel>DEL_QUAN}" change="valqty" maxLength="13"  />
    </cells>
    </ColumnListItem>
    </items>
    </Table>
    Thanks

    Thanks Robin,
    But in my case oEvent.getSource() is returning the cell instance and
    oEvent.getSource().getBindingContext() is undefined
    Hence not getting the value
    I also tried the following
    oEvent.getSource().getParent().getParent().indexOfItem()
    But index returned is -1

  • In SAPUI5, Passing Table Row Data  Selected in one xml view to another xml view and display in the second View

    Dear Friends,
    Please provide the solution for the following scenario:
    In the first view(xml)  I have a table with the fields QuotationNo,plant name, material no...etc, where I am displaying the data fetched using Odata model. The table is enable with Single line selection mode. My requirement is to Carry the selected row data to another view(xml) and display there.
    Please give your valuable inputs.

    Hi Rinku,
    depending on how you do the navigation, you might find the information here: OpenUI5 SDK - Demo Kit helpful.
    Regards Frank

  • How to populate table rows with selected listbox items?

    Hello,
    I am trying to populate a table with selected listbox items. Each item should be a new row in the table. The picture below is the listbox and table I am using. I need to get the selected name to populate the Attendee column of the table when the user clicks the Add button. How do you do this with mutltiple attendees selected?
    Thank you,
    Angie

    So you're considering the fact the if the user clicks the button twice, the name will appear twice and you don't want this, right?
    Then you must check if any value is the same than the one you are about to add in the row..
    for (var i = 0 ; i < ListBox1.length; i++){
         if (ListBox1.getItemState(i) == true){
              for (var x = 0 ; x < Table1._Row1.count; x++){
                   var boNewAttendee = true;
                   var strAttendee = Table1.resolveNode("Row1[" + x.toString() + "]").txtAttendee;
                   var newAttendee = ListBox1.getDisplayItem(i);
                   if (strAttendee.rawValue == newAttendee){
                        boNewAttendee = false;
                        break;
              if (boNewAttendee){
                   txtAttendee.rawValue = ListBox1.getDisplayItem(i);

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

  • APO DP - use of tables for selections and notes

    I am using APO DP V5.
    I note that tables for holding selections and notes are planning area specific and have tables names such as /1APO/S1nnnnnnnn and /1APO/F1nnnnnnnn respectively.
    My questions:
    1. What is the logic for the naming of these tables
    2. For a given planning area, are the tables names the same as one moves from Development to QA to Production environments
    Thanks,
    Bob Austin

    Bob
    I think the answer for the notes part of this question is here. The logic for the selections should be the same
    Re: Updating of Notes for cells in APO DP
    The table names might not be the same in QA since they are created independently and dynamically. But one way to check is to try it out

  • 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

  • Select statement not working

    hi to all,
    I am trying to write use inner joining . here is code
    DATA:tabname LIKE dd02L-tabname,
         table_disc LIKE dd02t-ddtext.
      SELECT  dd02ltabname dd02tddtext INTO (tabname,table_disc)
        FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
              WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
                                AND dd02L~tabname = 'ZANKI*'.
        endselect.
          write : tabname.
    I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank you

    Hi,
    I executed the ur inner join conditin by commenting 'z*' it's working fine.
    I think  where condition is not getting satisfied so u r not getting any data.
    Please conform in where condition you need * 'AND'* or OR
    I change decalration as below.
    DATA:tabname    type TABNAME,
          table_disc type AS4TEXT.
    SELECT dd02l~tabname
           dd02t~ddtext  INTO (tabname, table_disc)
    FROM dd02l  INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
    WHERE dd02t~ddlanguage = 'E' AND
          dd02l~tabclass = 'TRANSP'AND
        dd02L~tabname = 'ZANKI*'.
    endselect.
    write : tabname.
    Regards,
    Pravin

  • Edit few fields in an ALV table

    Hi,
    I am working on a table maintenance kind of application using ABAP web dynpro.
    I have created an application using ALV, and also I could make all columns as editable.
    But, I want to edit only 4 fields out of 7 in a row, when the same row is selected. Not all the columns in editable mode.
    Also I want to default some of the fields which are grayed out in the same row. How to default them?
    Could anyone help me about how to do this?
    Thanks.
    Sreekanth

    Hi,
    For the Editable Row,
    Create a context attribute called 'READ_ONLY'.
    Initially populate this READ_ONLY by looping through the table accross all rows.
    When you get the column references, Loop through this columns and set the columns for which you
    want them in "INPUT" by creating the object of type 'INPUT_FIELD"  for the others make them as TEXT_VIEW type.
    Now for the table, use the SET_READ_ONLY (for fieldname) to 'READ_ONLY' and bind the attribute
    READ_ONLY of context to the each column reference method 'SET_READONLY' method.
    DATA:
        lt_colref TYPE salv_wd_t_column_ref,
        ls_colref TYPE salv_wd_s_column_ref,
        lv_id TYPE string,
        lr_colref TYPE REF TO cl_salv_wd_column,
        lr_input TYPE REF TO cl_salv_wd_uie_input_field,
        lr_cv type ref to cl_salv_wd_cv_standard.
      DATA lv_tabix type i.
      loop at lt_efforts into ls_efforts.
        lv_tabix = sy-tabix.
        if sy-tabix = lv_count.
          ls_efforts-READ_ONLY = abap_false.
        else.
          ls_efforts-READ_ONLY = abap_true.
        endif.
        modify lt_efforts from ls_efforts index
                  lv_tabix transporting READ_ONLY.
      endloop.
      CALL METHOD LO_ND_EFF->BIND_TABLE
        EXPORTING
          NEW_ITEMS            = lt_eff
          SET_INITIAL_ELEMENTS = ABAP_TRUE.
    *    INDEX                =
      CALL METHOD wd_comp_controller->gref_model_efforts->if_salv_wd_column_settings~get_columns
        RECEIVING
          value = lt_colref.
      LOOP AT lt_colref INTO ls_colref.
        lv_id = ls_colref-id.
        lr_colref = ls_colref-r_column.
        case lv_id.
          when 'COL1'.
            CREATE OBJECT lr_input
              EXPORTING
                value_fieldname = lv_id.
            CALL METHOD lr_colref->set_cell_editor
              EXPORTING
                value = lr_input.
            CALL METHOD LR_INPUT->SET_READ_ONLY_FIELDNAME
              EXPORTING
                VALUE = 'READ_ONLY'.
          when 'BEGDA'.
            CREATE OBJECT lr_input
              EXPORTING
                value_fieldname = lv_id.
            CALL METHOD lr_colref->set_cell_editor
              EXPORTING
                value = lr_input.
            CALL METHOD LR_INPUT->SET_READ_ONLY_FIELDNAME
              EXPORTING
                VALUE = 'READ_ONLY'.
          when 'ENDDA'.
            CREATE OBJECT lr_input
              EXPORTING
                value_fieldname = lv_id.
            CALL METHOD lr_colref->set_cell_editor
              EXPORTING
                value = lr_input.
            CALL METHOD LR_INPUT->SET_READ_ONLY_FIELDNAME
              EXPORTING
                VALUE = 'READ_ONLY'.
        endcase.
        CLEAR lv_id.
        CLEAR lr_colref.
      ENDLOOP.
    *Set the table Editable
    lo_value->if_salv_wd_table_settings~set_read_only( value = abap_false ).
    Regards,
    Lekha.

  • Making table row as current row on expand

    Hi,
    I am using JDeveloper 11.1.1.5.0
    I have a table with detailstamp facet enabled. Each row is having an arrow icon to expand that row.
    My issue is that the expand row action seem to work independently with the table row selection. When I expand any row, it doesn't make that row as current. I tried with the below code to make the table row current, but could not do it.
        public void makeCurrentRow(RowDisclosureEvent rowDisclosureEvent) {
            usersTable = (RichTable)(rowDisclosureEvent.getSource());        //usersTable is the binding of the table on the page
            RowKeySet discloseRowKeySet = usersTable.getDisclosedRowKeys();
            usersTable.setSelectedRowKeys(discloseRowKeySet);
            AdfFacesContext.getCurrentInstance().addPartialTarget(usersTable);
        }Please let me know how can i make the table row as current on expanding that row.
    regards,
    Rajan

    Hi Timo,
    Really sorry for my confusion.
    I tried with the example in the pdf. Below is the code
        public void makeCurrentRow(RowDisclosureEvent rowDisclosureEvent) {
            RichTable _table = (RichTable) rowDisclosureEvent.getSource();
            CollectionModel   _tableModel = (CollectionModel) _table.getValue();
            JUCtrlHierBinding _adfTableBinding = (JUCtrlHierBinding) _tableModel.getWrappedData();
            DCIteratorBinding _tableIteratorBinding = _adfTableBinding.getDCIteratorBinding();
            Object _selectedRowData = _table.getSelectedRowData();
            JUCtrlHierNodeBinding _nodeBinding = (JUCtrlHierNodeBinding) _selectedRowData;
            Key _rwKey = _nodeBinding.getRowKey();
            _tableIteratorBinding.setCurrentRowWithKey(_rwKey.toStringFormat(true)); 
            AdfFacesContext.getCurrentInstance().addPartialTarget(usersTable);
        }the example is not making the expanded row as current one. I am still getting data for 1st row only. I tried adding the partial target to my usersTable in the end. but that too...didn't work.
    Please let me know where i am missing.
    regards,
    Rajan

  • ADF Treetable row already selected?

    How can I check if a row in the tree table is already clicked/selected?

    1) create a binding for treetable in the managed bean
    2) you could check if a row is selected or not - by checking the following:
    treetable.getSelectedRowKeys()This returns RowKeySet containing all the selected rows in the treetable.
    Thanks,
    Navaneeth

  • How to create alv table dynamically by performing action on the button.

    Hi all,
    my requirement is to create alv table dynamically.
    that is i will create two buttons
    1) show alv table
    2) close alv table
    if user selects show alv table then the alv table should be displayed.
    and if user selects clsoe alv table then the alv table should be closed.
    to create alv table dynamically  i have followed this procedure.
    under view properties i have added salv_wd_table component. then under the action of showalvbutton i went to code wizard and i have selected instantiate used component component use salv_wd_table. the following code will be generated
    with this code i am unable to display alv table dynamically correct me where i went wrong kindly send me the necessary steps how to create alv table dynamically
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_salv_wd_table( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      lo_cmp_usage->create_component( ).
      endif.
    to close table i have used the following code. with this code i am able to achieve the functionality to delete the alv table
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_salv_wd_table( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      else.
      lo_cmp_usage->Delete_component( ).
    endif.
    Thanks & Regards,
    Naveen
    Edited by: naveen.webhelp on Feb 10, 2011 5:52 AM

    Hi
    ALV table will be shown in the viewcontainerUI element.
    it is shown there empty if you dont fill the node bound to the data node of the interface controller of the comp usage
    SALV_WD_TABLE.
    and if you are not getting the table filled in the first place.
    then check have you mapped the DATA node to some node in the comp controller
    wht basically is your requirment is that you want to show ALV gird on click of one button and delete it on click of other button.
    there are many ways to do so.
    best way is control the visiblity of the viewcontainer UI element which containes the TABLE view of SALV_WD_table comp.
    create an attribute of type WDUI_VISIBILITY name say VIS.
    now go to the layout and bound hte visible property of the viewcontainer to this attribute VIS.
    then in the showalv grid button's eventhandler write
    wd_context->set_attribute(
    name = 'VIS'
    value = '02'
    and in the wddoinit and delete alv grid button's event handler write
    wd_context->set_attribute(
    name = 'VIS'
    value = '01'
    thanks
    sarbjeet singh

  • Global Setting for ALV Table in webdynpro

    Hi guys,
    We are in process of upgrading to EHP7 and ABAP-7.4 and we are facing one small issue on default ALV table setting where we are not getting
    Grid line = 'All'  insist we are getting Grid Line = 'Horizontally'.
    I have seen lots of thread suggesting that we can customized it based on application but as we already have lots of webdynpro application and it not a good ideas to go in each and every application and change it.
    I have a feeling there should be some place where we can set the default setting for the same may be System or Global .
    Any idea on the same.
    Atul 

    hi,
    according to what i understood from your explanation you want that inspite of scrolling you need to do so on user clicking some button or some action ....
    i did the same in a scenario...
    what i did was just giving  a input field on the screen.
    and in code i just checked number of records to be less than or equal to the number user puts in the i/p field .
    I chose onactionenter for doing this .
    firstly i used node->invalidate.
    again filled the internal table with number of records matching and displayed the same.
    hope it will help
    Regards,
    Sahai.s

Maybe you are looking for

  • File path too long when collecting??...

    Hi all, REALLY hope someone has some wisdom on this! I've searched forums and the web and not yet found an answer.... I've got a MASSIVE project on an external drive that's on the way out, so I want to collect the project that's on it to another new

  • No response on the control panel when i'm trying to log in.

    when I'm trying to log in to control panel(window 7), there's absolutely no response as below picture. Even I'd waited for 30 minutes, there's no response and no error message as well. just above 'accessing' icons is rotating again and again.. What I

  • IBooks Wont Open PDFs

    #Ipod 2g 4.2.1 I installed ibooks and synced a pdf file using itunes.The Pdf file will not open I have tried unistalling, rebotting, and restoring. the file shows up on the bookshelf but when I click it the only thing it does is get highlighted it do

  • MIRO - Credit Memo- Unable to match

    Hi Gurus, One  of our supplier issued a credit memo which relates to two POs. One is a return PO(credit note) and other a normal PO. Vendor has issued credit note with Net figure. Both POs are not related. Normal PO ( GR)   100 Return PO(GR)      (-2

  • Bold and other styles of a row in a table

    Hi all, we need to change the appearance of a table row in a configTable or configCellerator according to it's data. Can it be done in BSP? how? Thanks in Advance, dekel31.