Problem with button event on PopUp
I have a problem with a button event on the popup. The problem is that I'm in the Componentcontroller so I dont knwo what I have to write here:
Data: TYPE REF TO if_wd_view_controller. l_window->subscribe_to_button_event( EXPORTING button = if_wd_window=>co_button_no action_name = What have I write here? ...There is no action tab in the componentcontroller action_view = What have I write here? ... maybe: l_api_main ? Which view is this? is_default_button = abap_true ).
Thanks in advance
hi sap user,
The subscription of the button in the popup have to be done in the view level.
In the component controller u can use this one.
lo_window = lo_window_mgr->create_window(
window_name = 'WINDOW_NAME'
close_button = abap_true
button_kind = if_wd_window=>CO_BUTTONS_OKCANCEL
default_button = if_wd_window=>co_button_ok
in the view level u can subscribe the button in the wddoinit method.
button = if_wd_window=>co_button_ok
button_text = 'YES'
action_name = 'YES'
action_view = lv_view
Hope the above piece of code help u.
Reward points if useful.