Saturday, March 10, 2012
Steps involved.
Create one more view POPUP_V
- Create two windows and create view for each window. Embed the views in the corresponding windows.
- In the view of first window, when we click on button, second window should be displayed as popup.
- Need to generate code to create popup window for the button OnAction event of the first window.
- Create Web Dynpro Component and save it as local object.
- When you specify Window and View names when you create Web dynpro component. View START_V would be embedded automatically in the window START_W.
- Go to view START_V -> Layout tab
- -->Create one button UI element-->OnAction event for that button
- Go to ONACTIONGOTO_POPUP event handler method -> Generate code code for popup window as shown below.
METHOD onactiongoto_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_W' * 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_ok message_type = if_wd_window=>co_msg_type_none default_button = if_wd_window=>co_button_ok ). lo_window->open( ). ENDMETHOD.
- Go to view POPUP_V -> Layout tab -> Create TextView UI element and give some text for that.
- Create one more Window POPUP_W
- Embed POPUP_V view in the window POPUP_W as shown.
- Create Web Dynpro Application and save it as local object.
- When you save, System asks Interface view and plug name. We have to give Interface view as START_W and plug DEFAULT.
- Run the Web Dynpro Application.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
nice example
ReplyDelete