cancel
Showing results for 
Search instead for 
Did you mean: 

WD View in new Fenste

Former Member
0 Kudos

Hi,

I would like to open a View in new browser window. The navigation should be started from an aktion. The view, I want to show, and view, froma the navigation should be started, are parts the same WD Component. How can I implement tje Navigation?

Regards Bogdan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

depending on the usage there can be number of ways to achieve this-

if view is launched like a pop up and it is required to return some value to calling window then you can use following code on the action -

  • call view propose names

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 lr_view_controller TYPE REF TO if_wd_view_controller.
  DATA lv_text            TYPE string.

  lv_text = wd_assist->if_wd_component_assistance~get_text( '008' ).

  lo_api_component  = wd_comp_controller->wd_get_api( ).
  lo_window_manager = lo_api_component->get_window_manager( ).
  lo_window         = lo_window_manager->create_window(
                     window_name            = 'W_PROPOSE_NAME'  "your window name which needs to be called
                     title                  = lv_text
                     close_in_any_case      = abap_true
                     message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                     close_button           = abap_true
                     button_kind            = if_wd_window=>co_buttons_okcancel
                     message_type           = if_wd_window=>co_msg_type_none
                     default_button         = if_wd_window=>co_button_ok
                     ).

  CALL METHOD lo_window->set_window_size
    EXPORTING
      width  = '350'
      height = '50'.

  lr_view_controller = wd_this->wd_get_api( ).

  CALL METHOD lo_window->subscribe_to_button_event
    EXPORTING
      button      = if_wd_window=>co_button_ok
      action_name = 'ADD_PREFIX'
      action_view = lr_view_controller.

  lo_window->open( ).

2) If you are launching a new webdynpro application then try exploring LaunchPad...

Hope this helps

regards

manas dua

Former Member
0 Kudos

Hi Manas,

thx for your answer. I'm afraid It not solved my problem. I need to show another view from the same application in not modal, separate browser window. It mustn't be started a new instance of application (source and target view operate on the same instance of Context).

Regards Bogdan

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

If you want to open in seperate browser window :

  • Set Application name

lv_application_name = 'ZRM_ADM_CV_TOOL_APP' .


  CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
      application_name = lv_application_name"pass you wd  application name
    IMPORTING
      out_absolute_url = lv_out_absolute_url.


   CALL METHOD l_window_manager->create_external_window
          EXPORTING
            url    = lv_out_absolute_url
          RECEIVING
            window = l_window.

        IF l_window IS NOT INITIAL.
          l_window->open( ).
        endif.

so this will open in diff browser window.

Priya

Former Member
0 Kudos

Hi Chaitanya,

thanks for your answer. It's right, it open the applikation in new Window. But it is another Instance of application, so i can use context of source applcation.

Regards Bogdan

Former Member
0 Kudos

Hi,

When opened in external window, you may not have the data at all..

Usually the data is passed to the window handlerdefault event parameters inorder to use the data of the source application

Or

You can use the component controller methods of the first application that can be accessed in teh 2nd one.

Try to test both of them.

Regards,

Lekha.

Answers (0)