cancel
Showing results for 
Search instead for 
Did you mean: 

Call an URL using an Action

Former Member
0 Kudos

Hi all,

I have a button and I would like that clicking on it the Action associated make start an URL calling another Web Dynpro Application.

Any suggest for me?

Thanks

GN

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In the button handler, write the code -


** DATA DECLARATIONS
  DATA:
    l_cmp_api        TYPE REF TO if_wd_component,              " Reference for Component
    l_window_manager TYPE REF TO if_wd_window_manager,         " Reference for window manager
    l_popup          TYPE REF TO if_wd_window,                 " Reference for window
    lv_url           TYPE        string.                       " Url of the application

* Generate the url for the component
  CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
      application_name = 'ZWDA_OTHER'     "Application name
    IMPORTING
      out_absolute_url = lv_url.

** GET WINDOW MANAGER
  l_cmp_api = wd_comp_controller->wd_get_api( ).
  IF l_cmp_api IS BOUND.
    l_window_manager = l_cmp_api->get_window_manager( ).

    IF l_window_manager IS BOUND.
      l_popup = l_window_manager->create_external_window( url = lv_url ).
      l_popup->open( ).
    ENDIF.                               " IF l_window_manager IS BOUND
  ENDIF.                                 " IF l_cmp_api IS BOUND.

Regards,

Lekha.

Answers (0)