cancel
Showing results for 
Search instead for 
Did you mean: 

Popup Windows Buttons

Former Member
0 Kudos

Hi,

we create the buttons when opening the popup windows , like as

lr_popup = lr_window_manager->create_window(
  MODAL               = ABAP_TRUE
  window_name         = 'CHGOFFER'
       "Name of the window created in step 2
  TITLE               = 'Talep Deu011Fiu015Ftir'
  CLOSE_BUTTON        = ABAP_TRUE
  BUTTON_KIND         = if_wd_window=>CO_BUTTONS_YESNOCANCEL
*  MESSAGE_TYPE        = if_wd_window=>co_msg_type_error
*  CLOSE_IN_ANY_CASE   = ABAP_TRUE
*  MESSAGE_DISPLAY_MODE = MESSAGE_DISPLAY_MODE
  ).

** Adds an action to the popup screen buttons
 lr_view_controller = wd_this->wd_get_api( ).

 lr_popup->subscribe_to_button_event(
              button = if_wd_window=>co_button_yes
              button_text = 'Onayla'
              action_name = 'APPROVE'
              action_view = lr_view_controller
              is_default_button = abap_false ).

 lr_popup->subscribe_to_button_event(
              button = if_wd_window=>co_button_no
              button_text = 'Sil'
              action_name = 'DELETE'
              action_view = lr_view_controller
              is_default_button = abap_false ).

 lr_popup->subscribe_to_button_event(
              button = if_wd_window=>co_button_cancel
              button_text = 'Reddet'
              action_name = 'REFUSE'
              action_view = lr_view_controller
              is_default_button = abap_false ).

  lr_popup->open( ).

we can create only 3 buttons as 'YES NO CANCEL' with this method becase of IF_WD_WINDOW interface has type of WDR_POPUP_BUTTON_KIND.

But i want to create 5 buttons for my popup window. is it possible?

Can somebody help me pls?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

It is not possible at popup window level, however you can always insert as many buttons as possible in the view which is embedded in the popup window and write code accordingly.

Question is where to handle the click, Create a method in Component controller and call it from the view itself.

Abhi

Former Member
0 Kudos

i created buttons but i need to create more buttons same there (bottom of popup). Don't i create there?

Former Member
0 Kudos

You can design the view freely as per ur requirement and then use this as a popup view in the window.

Former Member
0 Kudos

i'm creating and opening my popup , there is not any problem here.

only 3 buttons can be created when creating popup window.

i want to create more buttons for my popup. is there anyway to do this?

Thanks.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

As someone has already stated you can design as many buttons as you want into the view that you embed into the popup. However for the bottom bar of the popup, you can only work with the buttons that SAP provides. You can not add custom buttons into this bottom bar.

Personally when I have custom buttons, I go ahead and hide all of the standard buttons in the bottom bar. I recreate them on the same button line as my custom buttons so that the interface looks more consistent.

Former Member
0 Kudos

Hi Thomas,

How did you create that buttons? Can you explain more please?

Thanks.