on 2011 Jun 21 10:21 PM
Hi Experts,
I have a web dynpro application that has 2 views. Main view calls second on button submit that opens in external window. I am going to use this in MSSportal application. I have done tons of research here and tried everything. Here is what I have done so far.
1) Created application_parameter "iv_user=<User.LogonUid>" in iview.
2) Added iv_user parameter to handeldfault method of MAIN view.
3) Now I want to pass this userid to external window, I tried setting session cookies but did not work.
CALL METHOD cl_bsp_server_side_cookie=>set_server_cookie
EXPORTING
name = 'USER'
application_name = "my web dynpro application name"
application_namespace = 'SAP'
username = sy-uname
session_id = space
data_name = 'USERID'
data_value = iv_user from above
expiry_time_rel = 3600.
I used get_server_cookie passing the same information above but I am not getting any value back.
4) I tried URL approach and added paramter to my second web dynpro applciation that I open in external window. I am not sure how to retrieve this paramter in external window.
I spent almost whole day trying to resolve this but no luck and decided to send this post. Please forward me any information you can to resolve this issue.
Thanks.
Mithun
Thanks everyone. I already resolved it which is same as Srinivas solution.
Thanks.
Mithun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi mithun
follow the below approch, first generate the dynamic url of the 2nd application, and add ur variable to that url, then use that url to call external window.
Data w_url type string,
w_value type string.
get the url of calling aplication
call method cl_Wd_utilities->construct_wd_url
exporting application name = name of second application( to which u want to pass parameter )
importing out_absolute_url = w_url.
***Make the value type compatible that has to passed with url.
w_string = lv_pernr
***Now attach the parameter and its value with url that have to passed to 2nd application
call method cl_http_Server=>append_field_url
exporting name = 'pernr'
value = ' w_value'
changing url = w_url.
then popup window for 2nd application with above url
lo_window = lo_window_manager->create_external_application ( url = w_url ).
lo_window -> open( ).
now to retrieve that value in second application
***now in wddoinit of 2nd application
data lv_param type string
lv_param = wdr_task=>client_window->get_parameter( ' pernr ').
Now you can use lv_param in 2nd application.
Regards
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Writing server cookie works for me. If get cookie not working means that the keys are not matching. Note down in debugging what values you pass on for set cookie and verify if you pass exacty the same for get cookie.
Further, you can get the URL parameter the someway you did it for application parameter. See the interface window inbound plug wdevent object in debugging.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.