GUIBBs can register to provide possibility to interrupt event prcessing showing a popup. Ths user can decide to continue or break event processing.

This is supported by the FPM framewerok providing data loss popup functionality. The feeder class of the GUIBB needs to implement the extended interface. Name of the extended interface can be easily derived from the standard interface name, simply adding _EXT as postfix. For example when you deal with a search block, you implement the interface if_fpm_guibb_search in your feeder class. To be able to display a data loss/confirmation popup, implementing the interface if_fpm_guibb_search_ext is necessary. The standard  provides you to display the standard message (which is translated in all langauages) in the extended interface. You have the possibility to evaluate your own criterias, and decide to display a popup with eo_confirmation_request = cl_fpm_confirmation_request=>go_data_loss.

METHOD if_fpm_guibb_search_ext~needs_confirmation.

    CHECK iv_raised_by_own_ui EQ abap_true.

    CASE io_event->mv_event_id.
      WHEN if_fpm_guibb_search=>fpm_execute_search.
        IF lv_i_have EQ lv_unsaved_changes.
          eo_confirmation_request = cl_fpm_confirmation_request=>go_data_loss. 


To display the confirmation dialog box with other text than the standard, create your own instance of the class CL_FPM_CONFIRMATION_REQUEST and add your own application specific text.

Share this content: