Raise Data loss Pop up or Confirmation dialog in FPM ABAP

SAP Tech Pro

SAP Technical Blog
Magzter [CPS] IN

Raise Data loss Pop up or Confirmation dialog in FPM ABAP

Raise Data loss Pop up or Confirmation dialog in FPM ABAP

In FPM applications, you would implement interface IF_FPM_UI_BUILDING_BLOCK and this brings in a method NEEDS_CONFIRMATION in the component controller. Please remember to set exporting paramter AND_RESET to abap_false.



  METHOD needs_confirmation .
    
    DATA lt_change_log TYPE wdr_context_change_list.
    CASE io_event->mv_event_id.
* if READ_ONLY was selected
      WHEN cl_fpm_event=>gc_event_read_only.
* get context change log (internal table)
        lt_change_log = wd_this->go_context->get_context_change_log(
        and_reset = abap_false ).
        IF lt_change_log IS NOT INITIAL.
* if context change log contains any data, send data loss popup
          eo_confirmation_request = cl_fpm_confirmation_request=>go_data_loss.
        ENDIF.
    ENDCASE.
    
  ENDMETHOD.

Add comment

Before Buying, Compare Prices at Topprice.in

Topprice.in