on 03-29-2009 8:00 AM
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( ).
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
.
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?
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
>
> 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.
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
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.