on 11-29-2007 3:57 PM
Hi all!!
I have to execute an url from a Web Dynpro ABAP.
Initially, I have used the FM 'CALL_BROWSER', but I got an error, I think because a Web Dynpro is an external application and is not recognized the Operating System where is running my application.
Alternatively, I have user the method 'cl_gui_frontend_services=>execute', but I get the error message 'Access via 'NULL' object reference not possible.'
Somebody knows where is the error, or give me another way to call the url, please?
Helpful answers will be rewarded.
Thanks and regards,
Manuel Míguez.
Hello Miguez,
you can use the method CREATE_EXTERNAL_WINDOW of the interface IF_WD_WINDOW_MANAGER to open an external browser window.
Regards,
Rainer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rainer,
I´m trying to execute the method but I get the error message 'Access via 'NULL' object reference not possible'.
This the call I have done.
DATA: lv_url TYPE string.
data: wa_window type ref to IF_WD_WINDOW.
data: if_window type ref to IF_WD_WINDOW_MANAGER.
CALL METHOD if_window->create_external_window
EXPORTING
url = lv_url
receiving
window = wa_window
Can you see something wrong?
Try this code:
DATA: api_component TYPE REF TO if_wd_component,
window_manager TYPE REF TO if_wd_window_manager,
window TYPE REF TO if_wd_window.
api_component = wd_comp_controller->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
window = window_manager->create_external_window(
url = 'http://www.google.com'
modal = abap_false ).
window->open( ).
Raja T
I got the url:
http://capgemecc.capgemini.es:8000/sap/bc/webdynpro/sap/zne_link/myURL
I can´t see anything wrong in the code.
METHOD onactionlink .
DATA: lv_url TYPE string.
data: wa_window type ref to IF_WD_WINDOW.
data: if_window type ref to IF_WD_WINDOW_MANAGER.
DATA lo_nd_parametros TYPE REF TO if_wd_context_node.
DATA lo_el_parametros TYPE REF TO if_wd_context_element.
DATA ls_parametros TYPE wd_this->element_parametros.
navigate from <CONTEXT> to <PARAMETROS> via lead selection
lo_nd_parametros = wd_context->get_child_node( name = wd_this->wdctx_parametros ).
get element via lead selection
lo_el_parametros = lo_nd_parametros->get_element( ).
get all declared attributes
lo_el_parametros->get_static_attributes(
IMPORTING
static_attributes = ls_parametros ).
lv_url = ls_parametros-url.
DATA: api_component TYPE REF TO if_wd_component,
window_manager TYPE REF TO if_wd_window_manager,
window TYPE REF TO if_wd_window.
api_component = wd_comp_controller->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
window = window_manager->create_external_window(
url = lv_url
modal = abap_false ).
window->open( ).
ENDMETHOD.
Hi, Could someone explain in detail, line by line, what the below code does? (including "TYPE REF")
I'm an abapper and it's all greek to me. (Code works great though!)
DATA: API_COMPONENT TYPE REF TO IF_WD_COMPONENT.
DATA: WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
DATA: WINDOW TYPE REF TO IF_WD_WINDOW.
API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
WINDOW_MANAGER = API_COMPONENT->GET_WINDOW_MANAGER( ).
WINDOW = WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW( URL = BP_URL MODAL = ABAP_FALSE ).
WINDOW->OPEN( ).
Hi Raja,
I have written code to call the standard transaction in wddoinit method of view since i need the transaction to be opened as soon as the screen opens. but i am getting 'Access via 'NULL' object reference not possible' . Its throwing error at
CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW.
Can you please suggest me on this.
Thanks
you cant use class 'cl_gui_frontend_services=>execute' to call URL in WDA. you need to use FM 'CALL_BROWSER'. What error message did you get when you use FM?
Raja T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The error is the generic error 'Error during the send of data'.
I´ll try to explain you the error.
Debugging I can see that on the FM 'WS_QUERY' inside on the FM 'CALL_BROWSER', it must to be retireved the parameter window_system (WN32), but I get the value '??'.
I think Web Dynpro ABAP can´t run an url.
What do you think, Raja?
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.