on 11-02-2008 9:16 AM
Hi,
I need to open another WD component/application from a WD application. This is not a problem, but I need to open it into a new browser window.
I tried the pop-up wizard (and some of the methods in window_manager) and basically that works great, but pop-up is not really a new window. When the pop-up is opened, you cannot anymore use the "main application" until you close the pop-up.
How can I open a new application in a new browser window?
Regards,
Pa
Hi Pa,
You can proceed as shown below. You need to just get the URL of the component which you want to call from your component using the static method construct_wd_url of class cl_wd_utilities. You then just have to pass this URL to the create_external_window method of if_wd_window_manager. (This part can be done by using the code wizard itself.)
Regards,
Uday
METHOD onactioncall .
DATA : lv_url TYPE string.
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'Z187442_ALV1'
IMPORTING
out_absolute_url = lv_url.
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_window TYPE REF TO if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
CALL METHOD lo_window_manager->create_external_window
EXPORTING
url = lv_url
RECEIVING
window = lo_window.
lo_window->open( ).
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
How can i open multiple new browser windows by using create_external_window?
Currenlty i'm using a loop statement to pass the URLs into create_external_window but it failed to open multiple new browser windows.
It will only open one new browser with the last URL in the table.
DATA: l_window_manager TYPE REF TO if_wd_window_manager,
l_cmp_api TYPE REF TO if_wd_component,
l_window TYPE REF TO if_wd_window.
l_window_manager = lr_comp_api->get_window_manager( ).
LOOP itab into wa_itab.
CALL METHOD l_window_manager->create_external_window
EXPORTING
url = wa_itab-url
has_statusbar = abap_false
has_toolbar = abap_false
has_location = abap_false
RECEIVING
window = l_window
.
l_window->open( ).
ENDLOOP.
Regards,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
I just tried with your code & guess that this is happening coz the system does send out the server request after complete execution of the method call. Because of this create_external_window is only calling the last entry of your internal table in a new window. Will try to check if there's any workaround for the same..
Regards,
Uday
Hi....
like this you can call it in a new browser.......
DATA l_api_componentcontroller TYPE REF TO if_wd_component.
DATA l_appl TYPE REF TO if_wd_application.
l_api_componentcontroller = wd_comp_controller->wd_get_api( ).
l_appl = l_api_componentcontroller->get_application( ).
l_appl->open_help_center( ).
Hope this will help you...
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
just type the following code.
Type URL which u want to open instead 'http://www.google.com'
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_window TYPE REF TO if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
CALL METHOD lo_window_manager->create_external_window
EXPORTING
url = 'http://www.google.com' "just type your URL here
RECEIVING
window = lo_window.
lo_window->open( ).
a new browser window will open.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To call a other WDA in this WDA in an New Window or as a PopUp-
Try to use CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW .
Pls check out this link on the same-
Regards
Lekha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this
IF_WD_WINDOW_MANAGER=>CREATE_EXTERNAL_WINDOW as follows:
DATA: l_window_manager TYPE REF TO if_wd_window_manager,
l_cmp_api TYPE REF TO if_wd_component,
l_window TYPE REF TO if_wd_window.
l_window_manager = lr_comp_api->get_window_manager( ).
" lr_comp_api is Type Ref To IF_WD_COMPONENT.
CALL METHOD l_window_manager->create_external_window
EXPORTING
url = lv_url
has_statusbar = abap_false
has_toolbar = abap_false
has_location = abap_false
RECEIVING
window = l_window
.
l_window->open( ).
Hope it will work.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.