on 11-24-2011 11:07 AM
Hello experts
I am trying to close a window in the portal.
I used the below code.
DATA: lr_view_cntr TYPE REF TO if_wd_view_controller,
lr_win_cntr TYPE REF TO if_wd_window_controller,
lt_parameter_list TYPE wdr_event_parameter_list,
ls_parameter TYPE wdr_event_parameter,
lr_val TYPE REF TO data.
FIELD-SYMBOLS <fs> TYPE any.
lr_view_cntr = wd_this->wd_get_api( ).
lr_win_cntr = lr_view_cntr->get_embedding_window_ctlr( ).
Set this value because we have to close the window
ls_parameter-name = 'CLOSE_WINDOW'.
Set parameter value to 'X' - true
CREATE DATA lr_val TYPE c.
ASSIGN lr_val->* TO <fs>.
<fs> = 'X'.
Add Parameter into parameter list
ls_parameter-value = lr_val.
INSERT ls_parameter INTO TABLE lt_parameter_list.
Call outbound exit plug of the window in which this view is embedded
lr_win_cntr->if_wd_view_controller~fire_plug(
EXPORTING plug_name = 'EXIT_PLUG'
parameters = lt_parameter_list ).
It is well being executed in web dynpro application but the same is not happening in the portal instead a message
"The application has closed and you can now close the window" is being displayed. but the window is not being closed.
Could anyone please help me achieving this in portal.
Thanks
Shravan
Hi Shravan
If it is a pop up you are speaking of, I have tried this approach and it has worked.
Say MAIN is your default view and PopUpWin is your window holding the pop up view, define a node called POPUPNODE and an attribute under it called PopUpWin (type ref to - if_Wd_window). Map this to the component controller and also create and map the same in your pop up view.
When you are calling the popup view you get a reference to the pop up window right, say it is lv_window (The reference to the Pop Up window you get when you autogenerate code for a pop up.), set this reference to the PopUpWin attribute under the POPUPNODE. As this is present in CC and Pop up view, it gets mapped automatically.
Now in the pop up view in the action where you want this pop up window to close just read the attribute & get reference to this attribute popupwin under POPUPNODE and say the reference is lv_window. Writing the code lv_window -> close ( ) will close this window.
Thanks & Regards,
Gayathri Shanbhag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Senthil,
Thanks for your response, i tried to pass the parameter in the exit plug but i could not able to do it.
Could you send the piece of code on how to pass the parameter in the exit plug in the below code.
Call outbound exit plug of the window in which this view is embedded
lr_win_cntr->if_wd_view_controller~fire_plug(
EXPORTING plug_name = 'EXIT_PLUG'
parameters = lt_parameter_list ).
Please help me.
Let me know if there is any other approach to close the window in portal.
Best Regards,
Shravan.
you need to supply close_window = abap_true parameter along with exit_plug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.