cancel
Showing results for 
Search instead for 
Did you mean: 

Open 2 WDA in same browser.

Former Member
0 Kudos

Hi,

I have 2 WDA, one of them opens the second one. lets say App1 opens App2.

Right now, App2 open in different browser.

My Question How to open it in same browser of App1?

Also, I have to pass some data to App2 from App1.

My current code is like this.

*  We will get url of target application
  CALL METHOD cl_wd_utilities=>construct_wd_url
    EXPORTING
      application_name = wf_appl_name
    IMPORTING
      out_absolute_url = str.     "



  CONCATENATE str  '?USERID='  userid INTO str.

*  Get Reference of windows from component.
  l_cmp_api = wd_comp_controller->wd_get_api( ).
  l_window1 = l_cmp_api->get_window_manager( ).


*  Get Reference of windows of target component.
  result = l_window1->create_external_window(
      url = str ).

  result->open( ).

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

First of all, what do you mean that you want them to open in the same browser? Do you want the second App to open in a popup window? If so we can talk about how you can do that using component usage, but I want to make sure that is what you want first.

Second, passing data: You already have the code to pass data via URL parameters. This is necessarily if you are running in a new session since there would be no backend connection.

You don't have to concatenate them on yourself however. You can use the input parameter of

cl_wd_utilities=>CONSTRUCT_WD_URL called in_parameters and they will be added to the URL for you. Do in via the API will also make sure the values get safe encoded for usage in URLs.

Now if you decide to change your application so that the second application opens in a popup, then you no longer need to pass data this way. Both applications would be running in the same server session and you can pass data via cross component context binding.

Former Member
0 Kudos

hi Thomas Jung ,

My application is running in the portal iView.

I want to open my application2 in same iView of application1.

I hope it be come more clear for me to help me.

BR,

Ali

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

By same iView, do you mean as a popup over the current application or do you mean that you want to navigate to the second application from the first and only the 2nd will be displayed in the iView?

Former Member
0 Kudos

hi Thomas Jung,

Not as popup, only the 2nd will be displayed in the iView.

BR,

Ali

vivekananthan_sellavel
Active Participant
0 Kudos

if u want to open in external window

CALL METHOD lv_window->create_external_window

EXPORTING

url = 'http://atind004:50000/######## ur appl URL #####'

title = zfundmgt_common=>gc_external_window

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 = wd_comp_controller->gv_window.

wd_comp_controller->gv_window->open( ).

if want in same iview you can use this

DATA lo_api_component TYPE REF TO if_wd_component.

DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.

lo_api_component = wd_comp_controller->wd_get_api( ).

lo_portal_manager = lo_api_component->get_portal_manager( ).

CALL METHOD lo_portal_manager->navigate_absolute

EXPORTING

navigation_target = PCD Path.

Regards

Vivekananathan

.

Former Member
0 Kudos

hi Vivekananathan,

I will try this and come up with feedback.

Hope it working fine.

BR,

Ali

Former Member
0 Kudos

hi Vivekananathan,

I tried the follwing :

DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.

lo_api_component = wd_comp_controller->wd_get_api( ).
lo_portal_manager = lo_api_component->get_portal_manager( ).

CALL METHOD lo_portal_manager->navigate_absolute
EXPORTING
navigation_target = PCD Path.

But i do nothing.

I try to run my application from the portal but no navigation to second application.

By the way Can i do the test from the R3 or should be thru. portal?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

This must be tested through the portal, as it calls APIs on the portal to effect the navigation. Make sure that you are using a Web Dynpro ABAP iView template and not a URL iView template. Make sure that you are specifying the navigation target correctly. Here is a link to the online help for relative, absolute, and object based navigation.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b0/f86f4132f15c58e10000000a1550b0/frameset.htm

Former Member
0 Kudos

hi Thomas Jung ,

I can not get the below sentence :

Make sure that you are using a Web Dynpro ABAP iView template and not a URL iView template

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There are different types of iView templates. I was simply saying that you should make sure that you used the Web Dynpro ABAP iView template when you created the iView. Otherwise if you used something like the URL iView, the portal APIs might not work.

Former Member
0 Kudos

hi Thomas Jung ,

My current application is running ok in portal. I can see the app1 and doing many actions and validations there, but when i need to navigate to different application it does not work with me.

It does not give me even any error!

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> hi Thomas Jung ,

>

>

> My current application is running ok in portal. I can see the app1 and doing many actions and validations there, but when i need to navigate to different application it does not work with me.

>

> It does not give me even any error!

I understand, but this information doesn't change my advice. Make sure you are using the correct iView template. Rendering will still appear normal in the incorrect iView template, but the portal APIs (like navigation or portal eventing) wouldn't work.

These are just possible things to check. If you are using the correct iView template, then check to make sure your specified the navigation correctly. Also check some of the sample portal navigation applications listed in the online help: WDR_TEST_PORTAL_NAV_PAGE.

Former Member
0 Kudos

Is the prefex 'PCD:' in target parameter of navigate_absolute method is required or not?

CALL METHOD lo_portal_manager->navigate_absolute
EXPORTING
navigation_target = 'pcd:portal...

.

BR,

Ali

vivekananthan_sellavel
Active Participant
0 Kudos

hi Ali Saleh AlAbbad ,

PCD is required. u just copy and paste the PCD path.

Regards

Vivekananthan.S

vivekananthan_sellavel
Active Participant
0 Kudos

hi ,

why cont use this suspend plug conscept.

This is one suggestion:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/19bf8c16f25d7ae10000000a11466f/frameset.htm

Suspend and resume calls are not released for use in a portal environment.

It might be usefull.

Regards

Vivekananthan.S

Former Member
0 Kudos

hi Vivekananthan.S,

You suggestion is not usefull, since my application is running in the portal.

I do every thing but i does not navigate to the second application in the same iView.

BR,

Ali