Skip to Content
author's profile photo Former Member
Former Member

I have web dynpor alv tables set up for multiple selections but not working

Hi ,

I have numerous alv tables within my application and i have following the steps needed to set them up for multiple selection.

The context node selection property is set up as 0..n

I also have the modify method set up with the method call

CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode

EXPORTING

value = cl_wd_table=>e_selection_mode-MULTI_NO_LEAD.

I also have the no lead selection option set so initially there is no entry selected

I can select one entry without a problem.

I can also select one entry and then if i use the shift button when selecting another record it will select all the records in between.

However i cant pick numerous individual records at the same time.

I try by selecting a record and the n using the control button to select a second record but it wont work.

Any ideas what i am missing or what i am doing wrong.

Any help is greatly appreciated.

Regards

Brian

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 30, 2009 at 01:33 PM

    Hi

    Check this thread for your problem -

    Selection of individual table rows not working, while deselection works

    Regards,

    Lekha.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 10, 2009 at 01:20 PM

    I tried the code listed above but it throws nothing but error messages

    The exact code i have in my modifyview method is as follows

    data lo_cmp_usage type ref to if_wd_component_usage.

    data lr_config TYPE REF TO cl_salv_wd_config_table.

    data lr_column TYPE REF TO cl_salv_wd_column.

    data lr_link TYPE REF TO cl_salv_wd_uie_link_to_action.

    data lr_column_settings type ref to if_salv_wd_column_settings.

    data lr_column_header type ref to cl_salv_wd_column_header.

    data lr_table_settings type ref to if_salv_wd_table_settings.

    data lr_columns type ref to cl_salv_columns_table.

    lo_cmp_usage = wd_this->wd_cpuse_my_act_alv( ).

    if lo_cmp_usage->has_active_component( ) is initial.

    lo_cmp_usage->create_component( ).

    endif.

    DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .

    lo_INTERFACECONTROLLER = wd_this->wd_cpifc_my_act_alv( ).

    DATA lo_value TYPE ref to cl_salv_wd_config_table.

    lo_value = lo_interfacecontroller->get_model(

    ).

    CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode

    EXPORTING

    value = cl_wd_table=>e_selection_mode-MULTI_NO_LEAD.

    lo_value->if_salv_wd_std_functions~set_aggregation_allowed( abap_true ).

    lo_value->if_salv_wd_std_functions~set_group_aggregation_allowed( abap_true ).

    lr_column_settings ?= lo_value.

    lr_table_settings ?= lo_value.

    lr_column = lr_column_settings->get_column( 'ACTIVITY_NO' ).

    CREATE OBJECT lr_link.

    lr_link->set_text_fieldname( 'ACTIVITY_NO' ).

    lr_column->set_cell_editor( lr_link ).

    lr_column = lr_column_settings->get_column( 'ACTIVITY_DESCR' ).

    lr_column->set_width( '160' ).

    lr_column->delete_header( ).

    lr_column_header = lr_column->create_header( ).

    lr_column_header->set_text( ls_dashboard_display-ACTIVITY_DESCR ).

    • More code to set up individual columns *********************

    lr_table_settings->set_visible_row_count( -1 ).

    lr_table_settings->set_footer_visible( 0 ).

    endmethod.

    The code listed in the note looks completely different to what i currently have , i dont read any nodes when setting up the alv table . Am i putting the code in the wrong place?

    Edited by: Brian Ramsell on Nov 10, 2009 2:21 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 11, 2009 at 09:47 AM

    Hi,

    Thanks for all the help with this.

    When i enter the code

    lr_node = <row_data>-context_element->get_node( ).

    or

    lr_node = <row_data>-context_element->get_node( 'MY_ACTIVITIES' ).

    • MY_ACTIVITIES is the name of the context associated with the alv table

    IF i_accesstype = 'TOGGLE' AND "#EC NO_TEXT

    ( <row_data>-context_element->is_selected( ) = abap_true

    *>>>> START OF DELETION <<<<<

    OR lr_node->get_lead_selection( ) = <row_data>-context_element )."#

    EC NO_TEXT

    *>>>> END OF DELETION <<<<<<<

    *>>>> START OF INSERTION <<<<

    OR <row_data>-context_element = i_lead_selection ).

    *>>>> END OF INSERTION <<<<<<

    i get the error message

    Incorrect arithmetic expression: Instead of

    "<ROW_DATA>-CONTEXT_ELEMENT->GET_NODE(", a field, a function or "(" was

    expected. expected.

    Any idea what i need to resolve this

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.