on 02-09-2011 9:47 AM
Hello,
I want to add custom action when i click on my 'Yes' or 'No'.
This the code i used to create my and add actions to it.
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 = 'POPUP_WIND'
title = 'Microsoft Internet Explorer'
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_YESNO
message_type = if_wd_window=>CO_MSG_TYPE_QUESTION
default_button = if_wd_window=>CO_BUTTON_NO
).
lr_view_controller = wd_this->wd_get_api( ).
lo_window->subscribe_to_button_event( button = if_wd_window=>CO_BUTTON_YES button_text = 'Yes'
action_name = 'SUBMIT' action_view = lr_view_controller ).
lo_window->subscribe_to_button_event( button = if_wd_window=>CO_BUTTON_NO button_text = 'NO'
action_name = 'Cancel' action_view = lr_view_controller ).
lo_window->open( ).
In my view that calls the popup i have created the action submit and cnacel.
But when i run the WDA i get this message: Action &OBJECT_ID& does not exist
Does any one have a clue?
Thanks
Hi,
action_name = 'Cancel' should be in action_name = 'CANCEL'
By the way, you could use create_popup_to_confirm method instead of create_window.
Edited by: Baskaran Senthivel on Feb 9, 2011 10:57 AM
Edited by: Baskaran Senthivel on Feb 9, 2011 11:00 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CANCEL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I switched to 'CANCEL' and it works fine.
i want now to close my pase.
i am using fire_plug method.
it works fine and closes my window.
but the web browser is still open.
how can I close the window and the web browser?
thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please do not append questions to the exisiting thread. Open a new thread with new information and it would be clear for the forum readers .
You can define a attribute lo-window of type ref to if_wd_window.
before opening the window
save the instance to the wd_this->lo-window = popup window.
On your action handlers ok/cancel, close the window
wd_this->lo-window->close( ).
regarding the closing browser - you mean to close the parent window ? That is not possible and you should not attepmt to do that as well.
Edited by: Baskaran Senthivel on Feb 9, 2011 11:23 AM
Hi
you should rasie a new thread for a new question.
however it can be achieved by creating an exit plug and firing it in the eventhandler of the buttons cancel or submit of your popup.
1.create an exit plug in your window.with a parameter CLOSE_WINDOW type WDY_BOOLEAN.
2. ADD WINDOW CONTROLER IN THE USED CONTROLLER LIST OF THE VIEW.
3. call the methos fire_exit_plug in the eventhandler.
this will do.
thanks
action_name = 'Cancel' action_view = lr_view_controller ).
IT SHOULD BE IN CAPS I.E. CANCEL NOT Cancel
so write it like
action_name = 'CANCEL' action_view = lr_view_controller ). " cancel in caps CANCEL
This will work.
thanks
sarbjeet singh
Edited by: sarbjeet singh on Feb 9, 2011 3:26 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.