on 09-17-2009 8:26 AM
HI all,
I have created a popup window and it has a 'OK' button by default.
Now i want to write some logic when i click this default OK button. So where to write the coding?.
Also, i want to close the popup window when i click that OK button.
Can anyone provide me the coding for closing the popup window?
Regards,
Shanthi
The Subscribing code should be written in the WDDOINIT method of the View.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For writing any code on the click of OK button, u have to create an action. Go to action tab and create an action say OK_POPUP.
Now use method subscribe_to_button_event of wondow to create action for OK button, as amit has explained.
Now in the OK_POPUP action write ur logic for Ok button and at the end for closing the pop-up use the following code.
data lo_view_controller type ref to if_wd_view_controller.
lo_view_controller = wd_this->wd_get_api( ).
data lo_wdw_controller type ref to if_wd_window_controller.
lo_wdw_controller = lo_view_controller->get_embedding_window_ctlr( ).
data lo_popup_window type ref to if_wd_window.
lo_popup_window = lo_wdw_controller->get_window( ).
lo_popup_window->close( exporting delete_window = abap_true ).
Regards,
Pankaj Aggarwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in the ONACTION_OK method , u can fire exit plug ,
u can refer these article as well :
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Shanthi ,
u must be obtaining ur pop up in ur view .suppose view1
lo_window->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
action_name = 'OK_POPUP'
action_view = l_api
is_default_button = abap_true ).
here action name is OK_POPUP
so in the method name ONACTIONOK_POPUP of view1 , write the appropriate coding which u want to perrform on OK button.
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.