on 06-09-2009 9:18 AM
Hi All,
i have created a WDA ALV Report,and for one of the field i assigned a cell editor 'Button"
Whenever i click on that button( which was in the ALV grid) i need to display some other data in the modal window...
1.How can we create a modal window...& where exactly i need to write the code ?
Please help me to sort out this...
Regards,
Ravi
Hi Ravi,
1) Go to the methods tab of the view containing your ALV & create an event handler method for event ON_CLICK of ALV. This method would be called by the system whenever you click the button within your ALV cells.
2) For this create a new view say POPUP_VIEW & a new window say POPUP_WINDOW.
3) Now embed your POPUP_VIEW within your POPUP_WINDOW.
4) Now within the view which displays your ALV, go to the event handler method for ON_CLICK & call the popup window.
This can be done by making use of the code wizard. Just start the wizard and select the "Generate Popup" radio button. When you do an F4 help within your component use you would now be able to see an entry with the name of your new window that you have created i.e, POPUP_WINDOW. Just select that entry and press on enter. That's it you have done the needful for achieving your desired functionality.
Regards,
Uday
Am just pasting you the code from my event handler mthod for ON_CLICK event:
METHOD call_popup .
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_WINDOW'
message_display_mode = if_wd_window=>co_msg_display_mode_selected
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( ).
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a separate view and design as per the requirements.Create a window.Embed the view in the window and write this code in the OnAction event of the button.
* Popup
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_POPUP' " your window name
message_display_mode = if_wd_window=>co_msg_display_mode_selected
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
).
DATA: l_api TYPE REF TO if_wd_view_controller.
l_api = wd_this->wd_get_api( ).
lo_window->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
action_name = 'ON_OK
action_view = l_api
is_default_button = abap_true ).
lo_window->open( ).
Regards,
Radhika.
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 method for opening a modal window(as popup) and call tihs method in the button handler.
There is a OnClick event handler for that ALV where you can write the code to open the popup.
Is the view that you want to call is another ALV or another view in same window or other view in other window.
check the standard example component WDR_TEST_POPUPS_RT_00
http://help.sap.com/saphelp_nw04s/helpdata/en/43/bccdcfe326332ee10000000a11466f/content.htm
Regards,
Lekha.
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.