cancel
Showing results for 
Search instead for 
Did you mean: 

Open new window

david_fryda2
Participant
0 Kudos

Hi everyone,

I created a new window which name is "BUKRSWINDOW".

In this window, there is a view.

I need to open this window from another view.

Here is the code :


data: l_cmp_api type ref to if_wd_component,
      l_window_manager type REF TO if_wd_window_manager,
      l_ext_win type ref to if_wd_window.

l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
l_ext_win = l_window_manager->create_external_window(
              url = 'BUKRSWINDOW'
              title = ''
              modal = abap_false
              has_menubar = abap_true
              is_resizable = abap_true
              has_scrollbars = abap_true
              has_statusbar = abap_true
              has_toolbar = abap_true ).
 l_ext_win->open( ).

This code doesn't work.

Why ?

Thanks.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

i think you should use an actual url http://hostname/application

in that way if you need to call another window from same component,

create new application, embedding the other window and call that application url

check webdynpro application wdr_test_window_suite eg the view suite_to_error,

grtz,

Koen

david_fryda2
Participant
0 Kudos

Hi,

In java there is a way to call a window of my own without creating a new application.

Is your solution the only way that exist ?

Thanks

Former Member
0 Kudos

hi,

Do it in the following way. Declare a attribute (mr_window)in the View COntroller of type IF_WD_WINDOW

and write the code in the Following Way

data: lr_compcontroller TYPE REF TO ig_componentcontroller,

lr_component_api TYPE REF TO if_wd_component,

lr_window_manager TYPE REF TO if_wd_window_manager.

  • lr_compcontroller = wd_this->get_componentcontroller( ).

  • Component API get instance

lr_component_api = wd_comp_controller->wd_get_api( ).

  • Reference on the Window manager get

lr_window_manager = lr_component_api->get_window_manager( ).

  • Window instance produce

wd_comp_controller->mr_window = lr_window_manager->create_window(

MODAL = 'X'

window_name = 'ZVIN_POPUP1'

TITLE = 'Pop Up Window'

CLOSE_BUTTON = 'X' ).

  • Window indicate

wd_comp_controller->mr_window->open( ).

cheers

david_fryda2
Participant
0 Kudos

Thanks guys!!!

Regards.

Answers (0)