on 03-08-2011 5:05 PM
hi friends for closing a window we created one close button in view and we implemented code for this event handler but according to my requirements iam placing the code under wddoonexit method of component controller but iam getting errors.how i can close application by using code that is written under component controller wddoexit method without using closing button
data : l_view_cntr type ref to if_wd_view_controller,
l_win_cntr type ref to if_wd_window_controller,
l_window type ref to if_wd_window,
l_parameter_list type wdr_event_parameter_list,
l_parameter type wdr_event_parameter,
l_val type ref to data.
field-symbols <fs> type any.
l_view_cntr = wd_this->wd_get_api( ).
l_win_cntr = l_view_cntr->get_embedding_window_ctlr( ).
l_parameter-name = 'CLOSE_WINDOW'.
create data l_val type c.
assign l_val->* to <fs>.
<fs> = 'X'.
l_parameter-value = l_val.
insert l_parameter into table l_parameter_list.
l_win_cntr->if_wd_view_controller~fire_plug(
exporting plug_name = 'EXIT_PLUG'
parameters = l_parameter_list ).
explain what the above code doing
Edited by: ravidanda on Mar 8, 2011 6:06 PM
Hi Folks,
This site is very helpful who want to learn SAP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What was the reason that you coded this in wddoonexit and not in the event handler of the close button in the view ?.
wddoonexit method is called by the framework when the component is destroyed. Like my friend Saarbjeet already said , if your intention is to close this application then you might have to stick with firing exit_plug.
See info on the exit plug [https://cw.sdn.sap.com/cw/docs/DOC-24322|https://cw.sdn.sap.com/cw/docs/DOC-24322]
Edited by: Baskaran Senthivel on Mar 8, 2011 10:14 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ravi,
what is the requirement that you want to achieve by writing this code in wddoexit method.
however this code is firing a plug EXIT plug and it will close the application no tsure whether it is working.
and anyways doexit itself will come into play only when you exit the application.
thanks
sarbjeet singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi friends,
by using close button some action will trigger but i want to get that action by closing(X) symbol of window or component also that's why iam writing code under wddoexit method.
For example if we are closing a window by using close button we will get information like 'you are closed window" .my requirement is i will get this information whenever we close a window by using X symbol of window.
Hi Ravi,
Try this.. it mights solve your problem.
http://wiki.sdn.sap.com/wiki/display/WDABAP/CloseParentWindow-WDA
Cheers,
Kris.
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.