on 10-30-2009 1:21 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lekha,
Thanks for the head up , i had a look at the other thread and i found this code
lr_node = <row_data>-context_element->get_node( ).
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 <<<<<<
Where exactly do i put this into my dynpro application
Should it be in the modifiy view somehere when i am setting up the alv table
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.