on 04-30-2013 11:21 AM
Hello Gurus,
My requirement is to open a popup with with button click. I have implemented the same using the code below:
*********************************************************************************************************************************
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window(
window_name = 'W_PROTYPE'
* title =
close_in_any_case = abap_true
message_display_mode =
if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_close
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_close
).
lo_window->open( ).
***********************************************************************************************************************************************
I have created new window say 'W_PROTYP' . In this window I have embedded one view. This view contains one dropdown, where I need to select the value and submit button.
When user click on 'Submit' button, it should navigate from POPUP window to parent Window another view(not calling view) with value selected in the parameter.
Please let me help, Its urgent.
Hi Chandan,
You can do this to solve your problem.
Add this code between the methods "create_window" and "open".
data: lr_view_controller type ref to if_wd_view_controller.
* Adds an action to the popup screen buttons
lr_view_controller = wd_this->wd_get_api( ).
lo_window->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
button_text = 'Go to view'
action_name = 'NAVIGATE'
action_view = lr_view_controller ).
Then create an action "NAVIGATE" in your main view and you'll be able to do your navigation in this method.
Hope this helps.
KR,
Christophe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Christopher
Thanks for your quick help. It was realy helpful to me. I have another doubt related to Webdynpro. Kindly help me on this. Please check the link below.
Waiting forward for your reply....
Hi Chandan,
Simply you can close the window which you have opened and use global controller to share the data between the views. To do that please follow the below things
1)Capture the window instance lo_window in global variable( declare the attribute in component controller).
2)When you click on submit button close the window and pass the data to global controller.
3) Then the data would be shared.
To close the window use the global variable lo_window and method close as lo_window->close( ).
Thanks and regards,
Srikanth Pullela
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandan,
I guess it is what you are looking form . Check this.
Hope this helps.
regards,
Xiang Li
Message was edited by: xiangli heah Sorry I just release your are not working on Adobe Form in HCM P&F. Just to let you know that there is possibility to call ABAP WDP from Adobe Form, as search help or to do others action in the WDP and return value to form, using form scripting. All scripting needed for pop up are already-built in HCM P&F. If you want to do the same, you might to do it manually and copy a few scripting over into your form. Let me know if you want the form scripting in detail. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi chandan,
On the click of submit close the popup and call the inbound plug of the parent view and while calling the inbound plug pass the neccessary data.......
wd_this->fire_ob_view1_plg(
p_city = ' '
p_name = ' '
p_state = ' '
).
thanks and regards,
narayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandan
You can create an event handler in the calling view for the Summit button. In the event handler, you can then fire an outbound plug linked to the inbound plug of the view you want to display. Send the value selected through event parameter or by context mapping.
Regards
Swati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Swati,
Thanks for your reply. but I don't have both the view in the single window, this is the main problem. Popup is opening in the 2nd window created to open the popup. Linking with the Outbound to Inbound Plugs is not possible in that case.
Currently I do not have any problem with passing the value as we can get it by assigning to global variable. but problem is how to navigate from POPUP window to calling window another view (not calling window.).
I think now we are able to understand the problem I am facing.
thanks again.
Hi Chandan
I think you misunderstood my reply.
I was asking you to first go to the calling view and from there you can navigate to the another view.
create an event handler in the calling view by subscribing to the button event( as mentioned by Christophe). Then in the event handler, you can call the second view easily as now you will be in the same window.
I hope I am clearer this time.
Please refer to the link for example
Regards
Swati
User | Count |
---|---|
88 | |
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.