on 11-26-2008 11:37 AM
hai i am new to dynpro abap , can any one send me how to create a simple pop up window if u press a button , if complete steps helpful
will be rewarded
Hi,
For popup window you need to create window in the WD Component and on the action method of the button, This code can be generated through wizard as wel.
DATA: lo_window_manager TYPE REF TO if_wd_window_manager,
lo_cmp_api TYPE REF TO if_wd_component,
lo_window TYPE REF TO if_wd_window.
lo_cmp_api = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_cmp_api->get_window_manager( ).
lo_window = lo_window_manager->create_window(
window_name = 'W_POPUP' "Window Name.
title = lv_header
close_in_any_case = abap_false
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_okcancel
message_type = if_wd_window=>co_msg_type_none
* default_button = if_wd_window=>CO_BUTTONS_OKCANCEL
).
lo_window->open( ).
Thanks
Vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
k
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
create a view and create a window. embed view in that window....
on some action like link to action or on button click write this code
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.
data lr_view_controller type ref to if_wd_view_controller.
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 = 'ZREMARKSPOPUP'**************Remember to give name of window here****************
title = 'Harmony'
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_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
).
*lr_view_controller = wd_this->wd_get_api( ).
*
lo_window->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
button_text = 'close'.
action_name = 'ONFREEZE'
action_view = lr_view_controller ).
lo_window->open( ).
also create an event in the pop up view for closing the popup window
data:
l_api type ref to if_wd_view_controller,
l_window_ctlr type ref to if_wd_window_controller,
l_popup type ref to if_wd_window.
l_api = wd_this->wd_get_api( ).
l_window_ctlr = l_api->get_embedding_window_ctlr( ).
if l_window_ctlr is bound.
l_popup = l_window_ctlr->get_window( ).
l_popup->close( 'ZREMARKSVIEWFORBEN' ).
endif.
regards
pranav
Edited by: Pranav Nagpal on Nov 27, 2008 7:50 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai i created a window and in it embeded aview and created a button and on clicking of the button i have used ur code but it retruns soem excpetion CX_WDR_RR_EXCEPTION in the create_window method
and it returns error in application
is my procedure correct or i shoudl create window soem where else
regards
afzal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohammad,
Try go through these 2 tutorials. ( [link1|http://www.sapdev.co.uk/sap-webapps/sap-webdynpro/wdp_displaypopup.htm] & [link2|http://saptechnical.com/Tutorials/WebDynproABAP/Popup/page1.htm] ) They would help you well as they have explained with step-by-step screenshots.
Regards,
Uday
Hi,
go through this article here Joris has given simple steps to create pop ups in WDA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.