on 08-11-2010 8:00 AM
Hi Experts,
I am displaying the column of Table UI element as Button. Now, I want to perform some functionality/Action when the
user click on the button. How to handle this type scenario?
Thanks in advance,
Sreenivas
Answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sreenivas,
I am not sure why you want to have a column full of buttons.
You could simply select a row of the table and have a button separately.
Thanks
Anurag Chopra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Create an action handler for the onAction event of table cell editor in that TABLE column. And in that action handler, you can get the corresponding context element of the button which is clicked using the following syntax:
DATA ele TYPE REF TO IF_WD_CONTEXT_ELEMENT.
ele = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
So with that information, you can perform anything that you wish.
Hope this helps!
Regards,
Srilatha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The below scenario is to open a new window on click of the button. A View with the details is created and is added to a Window. On click of the button, I am opening that window.
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_window TYPE REF TO if_wd_window.
DATA l_api TYPE REF TO if_wd_view_controller.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window(
window_name = 'Window Name'
title = 'Title of the Window'
* close_in_any_case = abap_true
* message_display_mode = if_wd_window=>CO_MSG_DISPLAY_MODE_NONE
* close_button = abap_true
* button_kind = if_wd_window=>CO_BUTTONS_OKCANCEL
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_cancel
).
wd_comp_controller->go_window = lo_window.
lo_window->open( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.