on 09-22-2008 1:32 PM
Hi,
I have a scenario, where i need to call a new WD application on button click event. The new WD application should open as a pop up and then return a value back to my WD where the call was made from.
How can i solve this issue?
Please explain me the process and any sample code will be appreciated.
Thanks
Hi,
there are 2 approaches
1. Using NWDI, create 2 Webdynpro components and include the 2nd component as a used component in 1st component.
2. Open the window using URL of the 2nd application.
-Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have to create Inbound and outbound plugs of window to do this requirement.
To navigate and get back from the second application.You need to create Outbound plug of type Suspend and when you get back from second application to start the first application create Inbound plug of type Resume of window.
Similarly in the second application create inbound plug of type Startup to start the application and create Outbound plug of type Exit of window to navigate back to first application.
check this Article written by me How to call one application from other.
and also cjeck this wiki How to use Exit plug of a window.
check this SAP document.
http://help.sap.com/SAPHELP_NW04S/helpdata/EN/45/2233b60c21072ce10000000a155369/content.htm
Thanks
Suman
Thanks for the detailed reponse.
Once i call the WD application, i get the following error: Access via 'NULL' object reference not possible.
In wdinit of the second view i have the following code where i get the dump.
DATA view_select_position TYPE REF TO if_wd_view_controller.
view_select_position = wd_this->wd_get_api( ).
***At this line i get the dump
wd_comp_controller->popup_window->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
action_name = 'CLOSE'
action_view = view_select_position ).
Any suggestion?
Thanks
Hi,
i think you are doing mistake in assigning the action_view is wrong.
check this code......
method onactionaction .
data: l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager,
l_popup type ref to if_wd_window,
l_text type string_table,
l_api type ref to if_wd_view_controller.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
insert `Data where changed` into table l_text. "#EC *
insert `Do you want to save?` into table l_text. "#EC *
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_yesnocancel
message_type = if_wd_window=>co_msg_type_question
window_title = 'Test: Popup to confirm'
window_position = if_wd_window=>co_center )."#EC *
l_api = wd_this->wd_get_api( ).
l_popup->subscribe_to_button_event(
button = '07' "if_wd_window=>co_button_yes
action_name = 'YES'
action_view = l_api
is_default_button = abap_true ).
l_popup->subscribe_to_button_event(
button = '08' "if_wd_window=>co_button_no
action_name = 'NO'
action_view = l_api
is_default_button = abap_false ).
l_popup->subscribe_to_button_event(
button = '06' "if_wd_window=>co_button_cancel
action_name = 'CANCEL'
action_view = l_api
is_default_button = abap_false ).
l_popup->open( ).
endmethod.
Thanks
Suman
Sorry for the late reply. I have decided to write my own code since it is a very minor WD which is used as search help to find positions.
I am now able to call the new WD and do what ever operation i need to do. My last step is now to figure out how to send back data to my original WD and close the second WD.
I have awared some points. I will close the thread once i have finished my task. I might as a question if i get stuck.
Thanks for your help so far.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.