on 08-19-2010 3:50 AM
Hi Friends,
Could you please help me in resolving below webdynpro issue.
With a button (SAVE) click on 1st webdynpro application, Iu2019m calling a confirmation popup window using CREATE_POPUP_TO_CONFIRM method ("Data has been saved" is the message in the popup window). Then with the OK button on confirmation popup window, Iu2019m calling the EXIT plug to go to another webdynpro application
Issue is: If I execute this webdynpro application in Enterprise Portal then the confirmation popup window is not getting closed even after reaching to the 2nd webdynpro.
But If I execute direct webdynpro URL, confirmation pop is getting closed and there is no issue.
CODE:
Code for SAVE button action: Here Im calling the confirmation popup window.
DATA: lt_text TYPE string_table.
DATA: mr_popup_window TYPE REF TO if_wd_window.
pop a confirmation window for display purpose
DATA: l_window_manager TYPE REF TO if_wd_window_manager,
l_cmp_api TYPE REF TO if_wd_component,
l_window TYPE REF TO if_wd_window.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
APPEND 'Data has been saved' TO lt_text.
CALL METHOD l_window_manager->create_popup_to_confirm
EXPORTING
text = lt_text
button_kind = if_wd_window=>co_buttons_ok
default_button = if_wd_window=>co_button_ok
RECEIVING
result = mr_popup_window.
associated the action handling methods with the window
DATA: view_controller TYPE REF TO if_wd_view_controller.
view_controller = wd_this->wd_get_api( ).
mr_popup_window->set_remove_on_close( abap_true ). CALL METHOD mr_popup_window->subscribe_to_button_event
EXPORTING
button = if_wd_window=>co_button_ok
action_name = 'ON_SUCCESS_OK'
action_view = view_controller.
mr_popup_window->open( ).
Code for OK button action of POPUP window: Here Im calling the EXIT plug.
DATA: lr_ref TYPE REF TO ig_yics_userdefault,
lv_url TYPE string.
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'YICS_HOMEPAGE'
IMPORTING
out_absolute_url = lv_url.
lr_ref = wd_this->get_yics_userdefault_ctr( ).
lr_ref->fire_go_exit_plg( url = lv_url ).
Regards,
Vijay.
Does it help if you close the popup window explicitly?
in your event handler:
mr_popup_window->close( ).
before you fire the application exit plug?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishal,
Please check my code now. I have cloed the window before EXIT plug. Pease check the 2 lines highlighted in BOLD. Still its not working.
CODE:
Code for SAVE button action: Here Im calling the confirmation popup window.
DATA: lt_text TYPE string_table.
DATA: mr_popup_window TYPE REF TO if_wd_window.
pop a confirmation window for display purpose
DATA: l_window_manager TYPE REF TO if_wd_window_manager,
l_cmp_api TYPE REF TO if_wd_component,
l_window TYPE REF TO if_wd_window.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
APPEND 'Data has been saved' TO lt_text.
CALL METHOD l_window_manager->create_popup_to_confirm
EXPORTING
text = lt_text
button_kind = if_wd_window=>co_buttons_ok
default_button = if_wd_window=>co_button_ok
RECEIVING
result = mr_popup_window.
wd_comp_controller->mr_popup_window = mr_popup_window.
associated the action handling methods with the window
DATA: view_controller TYPE REF TO if_wd_view_controller.
view_controller = wd_this->wd_get_api( ).
mr_popup_window->set_remove_on_close( abap_true ). CALL METHOD mr_popup_window->subscribe_to_button_event
EXPORTING
button = if_wd_window=>co_button_ok
action_name = 'ON_SUCCESS_OK'
action_view = view_controller.
mr_popup_window->open( ).
Code for OK button action of POPUP window: Here Im calling the EXIT plug.
DATA: lr_ref TYPE REF TO ig_yics_userdefault,
lv_url TYPE string.
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'YICS_HOMEPAGE'
IMPORTING
out_absolute_url = lv_url.
wd_comp_controller->mr_popup_window->close( ).
lr_ref = wd_this->get_yics_userdefault_ctr( ).
lr_ref->fire_go_exit_plg( url = lv_url ).
Regards,
Vijay.
Exit plugs do not work in a portal environment.
Refer the SAP Online Help :
http://help.sap.com/saphelp_nw04s/helpdata/en/45/1bc575ba064574e10000000a114a6b/frameset.htm
>Exit plugs do not work in a portal environment.
This is a good point that I feel silly for not remembering...
You can check if your application is running in the portal using the IF_WD_APPLICATION->GET_CLIENT_ENVIRONMENT method
lo_api_componentcontroller = wd_this->wd_get_api( ).
lo_api_application = lo_api_componentcontroller->get_application( ).
l_client_environment = lo_ap_application->get_client_environment( ).
if it is - then you can use the IF_WD_PORTAL_INTEGRATION interface
lo_portal_integration = lo_api_componentcontroller->get_portal_manager( ).
and the you can use the IF_WD_PORTAL_INTEGRATION methods to navigate eg - NAVIGATE_ABSOLUTE
call method lo_portal_manager->navigate_absolute
exporting
navigation_target = 'ROLES://portal_content/blah/test_URL'
navigation_mode = if_wd_portal_integration=>co_show_inplace
If you're navigating in the portal you should probably have iViews set up for the apps you are calling, but it is possible to create a pass-through iView which will redirect to a URL passed as a parameter.
[Setting the URL at Runtime - in URL iVIew|http://help.sap.com/saphelp_nw04/helpdata/en/45/85087d755d1f88e10000000a1553f6/frameset.htm]
data lo_api_component type ref to if_wd_component.
data lo_portal_manager type ref to if_wd_portal_integration.
data lt_params type wdy_key_value_list.
data ls_param type wdy_key_value.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_portal_manager = lo_api_component->get_portal_manager( ).
ls_param-key = 'forcedURL'.
ls_param-value = 'http://www.google.com'.
append ls_param to lt_params.
call method lo_portal_manager->navigate_absolute
exporting
navigation_target = 'ROLES://portal_content/blah/test_URL'
navigation_mode = if_wd_portal_integration=>co_show_inplace
use_sap_launcher = abap_false
launcher_parameters = lt_params.
Hope this helps
Chris
Chris
Hi Chris,
I have used the code given by you. Still not working. With this code, popup window is getting closed but staying back in the same screen. actually it should go to home page of the portal. I have tried giving different portal application URL also, but not moving any where. jus staying back in the same screen.
Is there any configuration required at portal side?
Regards,
Vijay.
Hi Chris,
In your last post,
You can check if your application is running in the portal using the IF_WD_APPLICATION->GET_CLIENT_ENVIRONMENT method
This method returns me 1, which is STANDALONE.
But Im running this application in our staff portal only. I have given homepage webdynpro application URL to our portal consultant, he added it in our staff portal.
but this method returns 1? where did I might have done yhe mistake?
Regards,
Vijay.
Hi Vijay,
I'm confused - I thought that the API should tell you that you are in the portal or not - as we seem to think it is because the app is in portal that the exit plugs don't work... (as you say when you run directly from SE80 it does work...)
[Note 1039479|https://service.sap.com/sap/support/notes/1039479] tells us the supported packages. I'm really not sure why this is not working for you... When I run the same code I get a 2 when running in the portal...
How is your portal consultant adding the app to the portal?
Anyone else like to put forward a suggestion on how to know if app is running in portal or not?
Chris
Hi Chris,
Yes, when I run directly from SE80 it does work. Only when I run from our staff portal its not working. but when I debug in staff portal also that method returns me 1(standalone).
2) How is your portal consultant adding the app to the portal?
I have created HomePage also using webdynpro. I have given that app URL to portal consultant. I just chcked with him, he created an iView to the homepage URL and added it in the staff portal.
Regards,
Vijay.
>
> Exit plugs do not work in a portal environment.
>
> Refer the SAP Online Help :
> http://help.sap.com/saphelp_nw04s/helpdata/en/45/1bc575ba064574e10000000a114a6b/frameset.htm
BINGO
Tim,
that's why we're trying to use the portal navigation API instead.
I've actually got a working example in a portal which does allow the user to select from any URL they want and then navigate to that URL.
Given the issues we been having here, I'm considering blogging the steps to make it a bit easier to follow. Especially as it involves both portal and WDA work, it's sometimes hard for people to follow/know both.
Chris
Hi Chris,
Thanks. After creating ABAP webdynpro iView, method returns 2 and started recognizing portal eventing methods also.
I need your advise on one more issue here.
My homepage is a webdynpro application, which I have given to portal consultant to create iView as discussed in previous posts. I have few links in homepage and each of them calls different webdynpros. These webdynpros still returning 1(Standalone). So do I need to ask portal guy to create iView for all those webdynpro applications called from homepage.
Need one more suggestion on homepage creation. Do I need to use Homepage Framework (SPRO Tcode) to create homepage or is that okay creating homepage using webdynpro application (as I have done). Which is the correct way? Please suggest.
Suggestion to other forum members, if you are developing a complete custom project using ABAP webdynpros, then from day1 you test your project in portal and not using SE80. Everything that works from SE80 may not work from portal.
Regards,
Vijay.
Hi Vijay,
how you set up your portal is really up to you... (and probably a question better answered in the Portal forum) There are multiple methods, Homepage Framework, LaunchPad, etc. One point is pretty consistent though, all iViews pointing to WDA applications should be WDA iViews.
As an aside, the current Homepage Framework application is developed in WDJ - and has some issues when tied in heavily to WDA apps. (if you have a WDA app in your area page then the link from the area group page doesn't work - the WDA refuses to render - may be fixed in a later SP but I'm not sure.) I'm really not sure what will replace it in EhP5 - if anything.
Cheers,
Chris
Hi
Could you update the results of GET_CLIENT_ENVIRONMENT and GET_APPLICATION_INFO and the actual code .
How did you achive the solution in portal. kindly provide the method with code.
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.