Hi colleagues,
There's a situation:
when the user switch POWL query, from QUERY_1 to QUERY_2, I don't want it switch to the new query immediately. I want to check whether the user meet the switching condition. If yes, then switch to QUERY_2. If NO, it won't switch to QUERY_2, even the user clicked QUERY_2, the user have to do something in QUERY_1's view.
My handle:
METHOD onpowl_ui_notif .
IF name = 'ON_QUERY_SWITCH'.
" when in edit mode, but nothing changed
IF wd_this->ar_main_alv_controller->is_main_alv_changed( iv_process_type = cl_ags_esd_issue=>c_slfi ) = abap_false.
wd_this->ar_main_alv_controller->on_button_cancel( cl_ags_esd_issue=>c_slfi ).
ELSE.
" when change happened, popup a confirm window, the user can choose save the changes or not, in QUERY_1
wd_this->ar_main_alv_controller->popup_confirm_save_win(
ir_view_controller = wd_this->wd_get_api( )
iv_process_type = cl_ags_esd_issue=>c_slfi
iv_yes_action = 'SAVE_AND_REFRESH'
iv_no_action = 'CANCEL_AND_REFRESH'
).
ENDIF.
ENDIF.
ENDMETHOD.
when change happened, popup a confirm window, the user can choose save the changes or not, in QUERY_1, but right now it switch to QUERY_2 immediately.
If there's a way can achieve the result that I want?
Thanks!