on 06-19-2007 8:52 AM
Hello
how can I realize a screen with two itemlists and inbetween these two lists I need a button which moves one or more item from list1 to list2 and a second button which removes one or more item from list2 back to list one. I've seen something like this for ALV settings in an ALV demo video.
Is there any WDA example, where I can see the ui elements, that I need, including event handling etc ?
Thanks and regards.
Carola
Also, your screen layout will be a grid layout with colcount = 3, so that the two tables and the button in between all come in the same line.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sascha,
which Ui element did you use ? Itemlistbox?
How do I get the selected entries ? (multiple selection possible )
Kind regards.
Carola
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carola.
Are both lists of the same structure?
Then it will be very easy. Just create two node with this structure and buind it to the tables. Create the buttons and add actions to the buttons.
In the action gat the referebnce of the corresponding node and use
get_element( ) if only one element can be selected
or
get_elements( ) if multi selection is allowed.
Then get the reference to the other node and use bind_elements( ) to append the elements.
Afterwards remove the elements from the first node:
here i move user profiles from one table to another.
METHOD onactionadd_profiles .
DATA:
lr_node_user_profiles TYPE REF TO if_wd_context_node,
lr_node_profiles TYPE REF TO if_wd_context_node,
lr_elem_profiles TYPE REF TO if_wd_context_element.
data:
lt_sel_profiles type WDR_CONTEXT_ELEMENT_SET,
lt_profiles type table of zsalsa_profile.
data:
ls_profile type zsalsa_profile.
lr_node_profiles = wd_context->get_child_node( name = wd_this->wdctx_profiles ).
lr_node_user_profiles = wd_context->get_child_node( name = wd_this->wdctx_user_profiles ).
* get all selected profiles
lt_sel_profiles = lr_node_profiles->get_selected_elements( abap_true ).
* build profile table and remove selected profiles from node
loop at lt_sel_profiles into lr_elem_profiles.
lr_elem_profiles->get_static_attributes(
importing
static_attributes = ls_profile
).
lr_node_profiles->remove_element( lr_elem_profiles ).
append ls_profile to lt_profiles.
endloop.
* add selected profiles to user profiles.
lr_node_user_profiles->bind_table(
NEW_ITEMS = lt_profiles
SET_INITIAL_ELEMENTS = abap_false
).
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
may be you can have a look at the following web dyn pro component : WDR_TEST_UI_ELEMENTS
it contains many examples of using various UI elements
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create two context nodes, one to bind to the list of elements and the other to bind the list of selected elements. Have two internal tables and bind them to the context nodes. Now have a button "Move" or something in between the lists. In the OnAction of the button, in your event handler, remove the selected entry from the first table and append it to the internal table of the second table. Do a bind_elements on both nodes after that and the values will be refreshed.
In the event handler, you can get the lead selection index of the first node, which will give you the row that has been selected. Delete this row from the first internal table and append it to the second internal table. Hope I was clear enough.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.