on 07-31-2007 8:46 AM
hi experts,
Can u send me a step by step procedure to create a pop up window in a screen.
I gone thro the example pgms, but i couldn't exactly how to start my things.
if u can able to send me a step by step procedure it will be of great help to me.
Regards...
Arun.
Hi Arun,
Try with the code snippet below:-
DATA: L_API_MAIN TYPE REF TO IF_WD_VIEW_CONTROLLER,
L_CMP_API TYPE REF TO IF_WD_COMPONENT,
L_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
DATA: MR_POPUP_WINDOW TYPE REF TO IF_WD_WINDOW.
DATA: L_I_QUESTION TYPE STRING_TABLE.
L_CMP_API = WD_COMP_CONTROLLER->WD_GET_API( ).
L_WINDOW_MANAGER = L_CMP_API->GET_WINDOW_MANAGER( ).
CALL METHOD L_WINDOW_MANAGER->CREATE_POPUP_TO_CONFIRM
EXPORTING
TEXT = L_I_QUESTION
BUTTON_KIND = IF_WD_WINDOW=>CO_BUTTONS_OK
RECEIVING
RESULT = MR_POPUP_WINDOW.
CALL METHOD MR_POPUP_WINDOW->SUBSCRIBE_TO_BUTTON_EVENT
EXPORTING
BUTTON = IF_WD_WINDOW=>CO_BUTTON_OK
ACTION_NAME = 'CLOSE_WINDOW'
ACTION_VIEW = L_API_MAIN
IS_DEFAULT_BUTTON = ABAP_TRUE.
MR_POPUP_WINDOW->OPEN( ).
U have to then write the event handler for the action 'CLOSE_WINDOW'.
Or else change the SICF services..for the logoff pages.
Reward if useful..!!
Warm Regards,
Smita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun,
Firstly, create the new window say ('POPUP') that you would like to display as a popup under your Web Dynpro Component. Embed the required views on it.
Now, lets say you have a button in a view of the current window, on click of which, you would like the popup to open. In the action handler of the button, type in the following -
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 = 'POPUP'
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
).
lo_window->open( ).
Here, you first get the window manager from the api, then create a window with the name 'POPUP' and then open that popup.
Regards,
Neha
<i><b>PS: Reward if helpful</b></i>
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 window name 'POPUP_WINDOW' and embed the required view/text in the window and use the following code to create a popup window
data:
api_component type ref to if_wd_component,
window_manager type ref to if_wd_window_manager.
api_component = wd_comp_controller->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
wd_comp_controller->window = window_manager->create_window(
title = 'EXIT VIEW'
window_name = 'POPUP_WINDOW'
close_button = abap_true ).
wd_comp_controller->window->open( ).
Pls assign reward points if useful
Regards,
Shruthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.