Banner
Banner

Attention: open in a new window. PDFPrintE-mail

2009
29
Jan

Call URL from SAP ABAP Web dynpro ACTION

It is a simple process to create a LinktoURL UI element on one of your wdp views which points to a website URL, but what if you want to use and ACTION to perform some ABAP functionality first and then call the URL. The simple answer is add the following code to your ABAP web dynpro ACTION method and it will call and display your desired URL link either in the current web page or call a new page / popup and display it in that.

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.
data: ld_url type string.
lo_api_component  = wd_comp_controller->wd_get_api( ). 
lo_window_manager = lo_api_component->get_window_manager( ).
ld_url = 'http://www.sapdev.co.uk'.
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW   
EXPORTING URL = ld_url
"'http://www.sapdev.co.uk'
RECEIVING WINDOW = lo_window. lo_window->open( ).

See here for more code and information about creating SAP Web dynpro for ABAP applications

 

Last Updated (Monday, 16 March 2009 23:08)
Banner
Free software downloads