on 07-19-2011 12:59 PM
Hi,
I am trying to call another WDA from a view of a currently executing WDA. The current calling WDA needs to be closed once the external WDA is open. I have called method lo_window_manager->CREATE_EXTERNAL_WINDOW to create the external window and closed the current window by firing an Exit output plug (setting input parameter CLOSE_WINDOW = abap_true) in the window where the view is embedded.
Unfortunately the external WDA is never opened but the calling WDA is closed.
However, if the exit plug is not fired, the external WDA does open correctly but the calling application is still open.
Any ideas on how this can be achieved.
Cheers,
John
Edited by: Support Soltius on Jul 19, 2011 2:00 PM
Edited by: Support Soltius on Jul 19, 2011 2:02 PM
Edited by: Support Soltius on Jul 19, 2011 2:03 PM
Hello John,
in the EXIT plug create an parameter URL of type string and while calling the exit plug set the URL value to your webdynpro component. its not required to call the create_external_window method
refer
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0018077-f0c9-2b10-87af-eb9bb40776d4?quicklink=index&overridelayout=true]
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saravanan,
Thanks for your reply.
One important thing I have omitted is that the WDA in question is one of iViews in a portal page and firing an exit plug opens the new WDA in the window of the second iView which unfortunately does not work well in this situation.
It is a very useful piece of functionality though and I have used it in other WDAs.
Cheers,
John
Edited by: Support Soltius on Jul 19, 2011 11:30 PM
This was achieved by creating a timed trigger element for a delay for 1 second and setting an action that fired the Exit plug. A bit crude but effective.
------------------------
Create timed trigger
-----------------------
DATA lr_container TYPE REF TO cl_wd_uielement_container.
DATA lr_matrix TYPE REF TO cl_wd_matrix_head_data.
DATA lr_timed_trigger TYPE REF TO cl_wd_timed_trigger.
wd_this->gr_view is set in the WDDOMODIFYVIEW method.
lr_container ?= wd_this->gr_view->get_element( 'ROOTUIELEMENTCONTAINER' ).
CALL METHOD cl_wd_timed_trigger=>new_timed_trigger
EXPORTING
delay = '1'
enabled = 'X'
id =
on_action = 'CLOSE_WINDOW'
RECEIVING
control = lr_timed_trigger.
lr_matrix = cl_wd_matrix_head_data=>new_matrix_head_data( lr_timed_trigger ).
lr_timed_trigger->set_layout_data( lr_matrix ).
CALL METHOD lr_container->add_child
EXPORTING
the_child = lr_timed_trigger.
-----------------------------
Create external window
-----------------------------
DATA: low_window TYPE REF TO if_wd_window_manager,
lo_comp_api TYPE REF TO if_wd_component,
lo_result TYPE REF TO if_wd_window,
lv_url TYPE string.
lo_comp_api = wd_comp_controller->wd_get_api( ).
low_window = lo_comp_api->get_window_manager( ).
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = WDR_MESSAGE_AREA'
IMPORTING
out_absolute_url = lv_url.
lo_result = low_window->create_external_window(
url = lv_url
title =
modal = abap_false
has_menubar = abap_false
has_toolbar = abap_false
has_location = ABAP_TRUE
).
lo_result->open( ).
*----
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.,
While Firing Exit Plug, Pass the URL of second WDA and close_window = 'X'.
hope this helps u.,
Thanks & Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May be you can do the following;
- add the external WDA as used component in the calling WDA
- create a method as event handler for an event created as interface in component controller in external WDA.
- use an exit plug within this method
- call to this method in the external WDA in the method WDDOINIT
try and tell us if works...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.