on 04-26-2012 3:16 PM
Hello,
Is it possible to create custom buttons in a pop up screen. My requirement is to display two alv in a pop up and have to place a button 'CHANGE' and on click of the change button the users can edit few fields in the alv.
I am aware that this is easily possible in alv but i have to display my alv ( infact two ) in a pop up and place custom buttons in the pop up. Can some one help?
Thanks,
Prem
Hi Prem,
you can write the below for popup 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.
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 = 'WINDOW2'
* title =
* close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
* close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
).
******* To assign your own action ************
data lr_view_controller type ref to if_wd_view_controller.
lr_view_controller = wd_this->wd_get_api( ).
call method lo_window->subscribe_to_button_event
exporting
button = if_wd_window=>co_button_ok
button_text = 'Change'
* tooltip =
action_name = 'CHANGE'
action_view = lr_view_controller
* is_default_button = ABAP_FALSE
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.
Hi,
Use the following code before opening the pop up window:
data lr_view_controller type ref to if_wd_view_controller.
lr_view_controller = wd_this->wd_get_api( ).
call method lo_window->subscribe_to_button_event
exporting
button = if_wd_window=>co_button_ok
button_text = 'Change'
* tooltip =
action_name = 'CHANGE'
action_view = lr_view_controller
* is_default_button = ABAP_FALSE
.
Please let me know if you need any more inputs.
Regards,
Sayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.