on 10-08-2009 3:35 PM
Hi experts,
I am new to webdynpro, so please kindly help me on this requirement. I am displaying list of data in a table in which each record is a link. when i click on the link, it should open a Html file in a new internet explorer, and the files may be in different network location also. How do i do it? please help me.
Regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the Link to aciton handler, call the popup and open it in external window.
In the popup window parameter you can give the full path of the URL.
** GET WINDOW MANAGER
l_cmp_api = wd_this->wd_get_api( ).
IF l_cmp_api IS BOUND.
l_window_manager = l_cmp_api->get_window_manager( ).
IF l_window_manager IS BOUND.
CALL METHOD l_window_manager->create_external_window
EXPORTING
url = lv_url "Check this out.......Give full URL name
modal = abap_false
has_menubar = abap_false
is_resizable = abap_true
has_scrollbars = abap_false
has_statusbar = abap_false
has_toolbar = abap_false
has_location = abap_false
RECEIVING
window = l_popup.
l_popup->open( ).
ENDIF. " IF l_window_manager IS BOUND
ENDIF. " IF l_cmp_api IS BOUND.
Hope this works.
Regards,
Lekha.
Edited by: Lekha on Oct 9, 2009 11:37 AM
Hi Lekha,
i used the same coding but nohing is happening, the processing indicator is just running in the browser and no new window is opening,
please kindly help.
path = 'C:\Documents and Settings\xxxxx\Desktop'.
CONCATENATE path lv_zhol_pkg INTO lv_pack SEPARATED BY '\'.
CONCATENATE lv_pack 'htm' INTO lv_pack_res SEPARATED BY '.'.
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( ).
IF lo_api_component is BOUND .
lo_window_manager = lo_api_component->get_window_manager( ).
IF lo_window_manager is BOUND.
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = lv_pack_res
MODAL = ABAP_FALSE
HAS_MENUBAR = ABAP_FALSE
IS_RESIZABLE = ABAP_TRUE
HAS_SCROLLBARS = ABAP_FALSE
HAS_STATUSBAR = ABAP_FALSE
HAS_TOOLBAR = ABAP_FALSE
HAS_LOCATION = ABAP_FALSE
RECEIVING
WINDOW = lo_window.
lo_window->open( ).
endif.
endif.
regards,
Arun
Hi,
Do one thing...
I have created one html file and ran it in Explorer window (C:\Documents and Settings\8754\Desktop\test.html)
Same i passed to the below method
* Generate the url for the component
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'C:\Documents and Settings\c08390\Desktop\test.html'
IMPORTING
out_absolute_url = lv_url.
Now pass this URL to the popup window.
Try this out...
Regards,
Lekha.
Edited by: Lekha on Oct 9, 2009 12:34 PM
Hi Lekha,
I coded the same way but still not opening the html, now it is opening new browser but i cannot see any page inside the browser, if i run the html file seperately it is working good.New parameter have got added in the URL, please help i got stuck
http://wltapp.xxxx.com:5000/sap/bc/webdynpro/sap/c:\documents and settings\XXXX\desktop\alpine club.htm
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'c:\documents and settings\XXXX\desktop\alpine club.htm'
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( ).
IF lo_api_component is BOUND .
lo_window_manager = lo_api_component->get_window_manager( ).
IF lo_window_manager is BOUND.
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = lv_url
MODAL = ABAP_TRUE
HAS_MENUBAR = ABAP_TRUE
IS_RESIZABLE = ABAP_TRUE
HAS_SCROLLBARS = ABAP_TRUE
HAS_STATUSBAR = ABAP_TRUE
HAS_TOOLBAR = ABAP_TRUE
HAS_LOCATION = ABAP_FALSE
RECEIVING
WINDOW = lo_window.
lo_window->open( ).
endif.
endif.
Hi,
No any error or anything, but i sorted out some how by creating the MIME object and importing the files and using the exporting paramter out_local_url in the construct url method, so if i pass the mime repository path, the file is opening without any problem.But wondering is there any way to open a file in the desktop in a new web browser. Lekha any inputs on this, it will be very helpful.
Thank you,
Regards,
Arun
It doesn't make any sense to use cl_wd_utilities=>construct_wd_url in this case. That is always going to try and append the server address to the front of the generated URL. That won't do anything for you. Have you tried just feeding the url 'file://
C:\Documents and Settings\c08390\Desktop\test.html'?
User | Count |
---|---|
85 | |
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.