cancel
Showing results for 
Search instead for 
Did you mean: 

custom button in pop up

former_member182337
Participant
0 Kudos

Hello,

Is it possible to create custom buttons in a pop up screen. My requirement is to display two alv in a pop up and have to place a button 'CHANGE' and on click of the change button the users can edit few fields in the alv.

I am aware that this is easily possible in alv but i have to display my alv ( infact two ) in a pop up and place custom buttons in the pop up. Can some one help?

Thanks,

Prem         

Accepted Solutions (0)

Answers (2)

Answers (2)

chengalarayulu
Active Contributor
0 Kudos

Hi Prem,

you can write the below for popup window:

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            = 'WINDOW2'
*                    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
                     ).

******* To assign your own action ************

data lr_view_controller type ref to if_wd_view_controller.


  lr_view_controller = wd_this->wd_get_api( ).


  call method lo_window->subscribe_to_button_event
    exporting
      button            = if_wd_window=>co_button_ok
      button_text       = 'Change'
*     tooltip           =
      action_name       = 'CHANGE'
      action_view       = lr_view_controller
*     is_default_button =    ABAP_FALSE

  lo_window->open( ).

Former Member
0 Kudos

Hi,

Use the following code before opening the pop up window:

   data lr_view_controller type ref to if_wd_view_controller.
  lr_view_controller = wd_this->wd_get_api( ).
  call method lo_window->subscribe_to_button_event
    exporting
      button            = if_wd_window=>co_button_ok
      button_text       = 'Change'
*     tooltip           =
      action_name       = 'CHANGE'
      action_view       = lr_view_controller
*     is_default_button =    ABAP_FALSE
    .

Please let me know if you need any more inputs.

Regards,

Sayan

former_member182337
Participant
0 Kudos

Hello Sayan,

Thanks for your inputs. This is my first webdynpro work so am not aware about the navigation and the logic to implement this. Do you have any code sample which i can use as a reference?

Thanks,

Prem

Former Member
0 Kudos

Check some webdynpro tutorials