on 12-18-2009 6:00 PM
How do I select all/deselect all records in a Table UI? Thanks!
Create two buttons: Select All & Unselect
Use the following example code in the actions assigned to each button.
DATA lo_nd_table TYPE REF TO if_wd_context_node.
lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
DATA int TYPE i VALUE 1.
DATA count TYPE i.
count = lo_nd_table->get_element_count( ).
DO count TIMES.
lo_nd_table->set_selected(
flag = abap_true
index = int ).
ADD 1 TO int.
ENDDO.
For the deselect, just change the flag to abap_false.
Make sure your context properties are set with Selection 0...n and Uncheck Initialization Lead Selection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.