on 01-22-2008 7:49 AM
Hi,
I am able to open pop up, but i need to capture the event when user clicks on "OK" or "Cancel" button.
How can do that. Below is my piece of code.
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 = 'ZDYNAMIC'
title = 'Dynamic Data'
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_OKCANCEL
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
).
lo_window->open( ).
hi vimal........
there is a method called SUBSCRIBE_TO_BUTTON_EVENT in if_wd_window.... you can make use o fthis method to subscribe for an event and make it function as you like..... when you create your external window it returns a window of type if_wd_window.... use this as an instance and proceed further.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Use this after your code and create two action OK & CANCEL
and in ONACTIONOK write code what u want to do on clicking on Ok button and same for Cancel.
DATA lo_action_view TYPE REF TO if_wd_view_controller.
lo_action_view = wd_this->wd_get_api( ).
lo_window ->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
action_name = 'OK'
action_view = lo_action_view
is_default_button = abap_true ).
lo_window->subscribe_to_button_event(
button = if_wd_window=>co_button_cancel
action_name = 'CANCEL'
action_view = lo_action_view
is_default_button = abap_false ).
lo_window->open( ).
It will work fine
Regards,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
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.