cancel
Showing results for 
Search instead for 
Did you mean: 

Opening html-site in WEB Dynpro

Former Member
0 Kudos

Hi Experts.

Is it possible to open an External WWW-Site in WEB-Dynpro.

Link-To-Action opens a www-site in an external window, but I would like to open it as WEB-Dynpro window. Is there an UI-Element doing it ?

Thanks

Wojciech

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

You can go like this..

DATA lo_nd_schedule_details_tab TYPE REF TO if_wd_context_node.

DATA lo_el_schedule_details_tab TYPE REF TO if_wd_context_element.

DATA ls_schedule_details_tab TYPE wd_this->element_schedule_details_tab.

DATA lv_deliv_numb LIKE ls_schedule_details_tab-deliv_numb.

  • navigate from <CONTEXT> to <SCHEDULE_DETAILS_TAB> via lead selection

lo_nd_schedule_details_tab = wd_context->get_child_node( name = wd_this->wdctx_schedule_details_tab ).

  • @TODO handle not set lead selection

IF lo_nd_schedule_details_tab IS INITIAL.

ENDIF.

  • get element via lead selection

lo_el_schedule_details_tab = lo_nd_schedule_details_tab->get_element( ).

  • @TODO handle not set lead selection

IF lo_el_schedule_details_tab IS INITIAL.

ENDIF.

  • get single attribute

lo_el_schedule_details_tab->get_attribute( EXPORTING name = `DELIV_NUMB` IMPORTING value = lv_deliv_numb ).

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,

lc_url type string.

api_component = wd_comp_controller->wd_get_api( ).

window_manager = api_component->get_window_manager( ).

lc_url = 'http://logtrack.dhl.com/amd/public/index.jsp?deliveryNote='.

SHIFT lv_deliv_numb LEFT DELETING LEADING '0'.

concatenate lc_url lv_deliv_numb into lc_url.

window = window_manager->create_external_window(

url = lc_url

modal = abap_false ).

window->open( ).

arjun_thakur
Active Contributor
0 Kudos

Hi,

You can use Link To Action to open the URL in the same window.

Follow this steps:

1) To the window-->outbound plug.

2) Create an Exit plug. Use plug type as Exit

3) Go to the event handler of the Link to Action and use the following code:



  data lo_view_cntr type ref to if_wd_view_controller.
data lo_win_cntr type ref to if_wd_window_controller.
data: l_parameter_list type wdr_event_parameter_list,
l_parameter type wdr_event_parameter,
l_val type ref to data,
l_val_url type REF TO data.

field-symbols: <fs> type any,
<fs_url> type any.

lo_view_cntr = wd_this->wd_get_api( ).
lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).

CREATE DATA l_val type c.
CREATE DATA l_val_url type string.
ASSIGN l_val->* to <fs>.
ASSIGN l_val_url->* to <fs_url>.
<fs> = 'X'.
<fs_url> = 'http://sdn.sap.com'. "Give the url here

l_parameter-name = 'URL'.
l_parameter-value = l_val_url.

INSERT l_parameter INTO TABLE l_parameter_list.
CALL METHOD LO_WIN_CNTR->FIRE_PLUG
  EXPORTING
    PARAMETERS = l_parameter_list
    PLUG_NAME  = 'EXIT' "exit is the name of the outbound plug
    .

Edited by: Arjun Thakur on Mar 17, 2010 10:53 AM