cancel
Showing results for 
Search instead for 
Did you mean: 

open new tab

Former Member
0 Kudos

hy,

i have a 2 views in my component, in the first view i have a link to action which takes my to the second view.

my question is can i open the second view in a new tab in my browser?

can please anybody give my a code that helps my.

regards tony.

Accepted Solutions (0)

Answers (3)

Answers (3)

uppu_narayan
Active Participant
0 Kudos

Hi Tony,

         only two things either you call the exit plugs or call another view using create_external_window but first case it will be replacing the same view if in the same window or new browser if in new window, while in the second case it will open in new browser. so the new tab is not possible...

regards,

narayan

Former Member
0 Kudos

Hi Tony,

What i assume is you have created two views and embedded it in a window. The view 1 contains a link to action and on click on link to action you are navigating to the second view using plugs.

Try these suggestions. it may help you.

1. Create two windows and bind one view in each window.

2. Create two applications for the webdynpro component with each window as an interface view.

3. Write the following code in the method for link to action.

  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 lv_str    type string.
  lo_api_component = wd_comp_controller->wd_get_api( ).
  lo_window_manager = lo_api_component->get_window_manager( ).

  call method cl_wd_utilities=>construct_wd_url
    exporting
      application_name = 'ZCSK_APP2'      " App name created with 2nd window as interface view
    importing
      out_absolute_url = lv_str.

  call method lo_window_manager->create_external_window
    exporting
      url            = lv_str
      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( ).

There is  a bit more lot of works to do if you want to share data between the views.

Best Regards,

Arun Krishnamoorthy

Former Member
0 Kudos

Hi Tony,

Using Tabstrip you can display views in tabs.

Please go through this..

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/000334e2-f34d-2c10-dd8c-94194607e...

http://scn.sap.com/thread/1527548

Cheers,

Kris.

Former Member
0 Kudos

Krishna,

I want to open the second view in a "new tab in browser" like in the case of "linktoURL" when you click on linktoURL elemet it opens a new tab with the link you binded.

In my case in the first view i have a linktoaction, and when i click it , its opening my second view with a form , i also can create a "back button" in the second view for return to the first view but i want to use the "open in new tab" option if its possible.

thanks,

Tony.

Former Member
0 Kudos

Hi Tony,

In browser you can view only one view at a time. And while navigating to sec view, your sec view will open in same browser only. I think there is no option like new browser tab in webdynpro.

Cheers,

Kris.