on 03-13-2009 3:49 AM
Hi Colleague,
I need to show a pop-up window on an event. How can i achieve this in ABAP WD.
Code Snippet would be helpful.
Regards,
Piyush
Hi Piyush,
You can get the code for pop up window with the help of code wizard. Just press ctrl + F7 and then select the generate pop up readio button, pass the pop up window name and press enter. You'll get a auto generated code for popup window.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Piyush,
When you create a pop up window using code wizard, you'll get a OK button by default. By clicking on it the pop up window will close. Or if you want to place a OK button in the view that is present in the pop up window and want to close the pop up by clicking on it, that is also possible. Just Put a button in the pop up view and use this code in the ONACTION method of that button:
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( 'l_popup' )." pass the pop up view name here
endif.
Regards
Arjun
Edited by: Arjun Thakur on Mar 13, 2009 10:01 AM
DATA: LR_COMP TYPE REF TO IF_WD_COMPONENT.
DATA: LR_WIN_MGR TYPE REF TO IF_WD_WINDOW_MANAGER.
DATA: LR_CTRL TYPE REF TO IF_WD_VIEW_CONTROLLER.
LR_UPLOAD IS OF TYPE IF_WD_WINDOW
IF wd_comp_controller->LR_UPLOAD IS INITIAL.
LR_COMP = wd_comp_controller->WD_GET_API( ).
LR_WIN_MGR = LR_COMP->GET_WINDOW_MANAGER( ).
wd_comp_controller->LR_UPLOAD =
LR_WIN_MGR->CREATE_WINDOW(
WINDOW_NAME = 'UPLOAD_W'
TITLE = 'Upload File'
BUTTON_KIND = IF_WD_WINDOW=>CO_BUTTONS_OKCANCEL ).
ENDIF.
wd_comp_controller->LR_UPLOAD->OPEN( ).
Create a window(Upload_W) and place your views inside the window and in your event handler use this code to open a window. I have created LR_UPLOAD reference variable in Component controllers attribute tab with type as mentioned.
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
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.