Calling an URL is nothing but hyper linking some text to an external link or website. This feature can be achieved in Webdynpro ABAP very easily. Simply create an Webdynpro ABAP application and insert a button or text in the screen. Now for that text or button create an on-click method.
In that method put the below code.
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 = ' Enter Website Address Here' MODAL = ABAP_FALSE HAS_MENUBAR = ABAP_TRUE IS_RESIZABLE = ABAP_TRUE HAS_SCROLLBARS = ABAP_TRUE HAS_STATUSBAR = ABAP_TRUE HAS_TOOLBAR = ABAP_TRUE HAS_LOCATION = ABAP_TRUE RECEIVING WINDOW = lo_window.
lo_window->open( ).
Now activate your application and then test. You can see the text of button on the screen, as soon as you click on that button or text your given website will open in a new window.
0 comments:
Post a Comment