Scenario:
Adding a pop-up window to intercept event processing and proceed only when user confirms.
Assumption:
When user clicks on ‘SEND’ button, it should throw a pop-up giving a warning message whether to proceed or not and actual record should not be created until user confirms.
Steps:
This can be achieved through adding a small code in your feeder class.
This method illustrates how to achieve through standard feeder class- CL_HRASR00_FPM_FEEDER.
- Create a post-exit in the method CL_HRASR00_FPM_FEEDERàIF_FPM_GUIBB_FORM_EXT~NEEDS_CONFIRMATION
- Add the below code in the post exit method.
*
DATA: lv_interface_view TYPE string,
lo_confirmation type ref to CL_FPM_CONFIRMATION_REQUEST,
lt_popup_text TYPE STRING_TABLE,
ls_popup_text TYPE STRING,
lv_title0 TYPE string.
lv_title0 = 'Warning'.
ls_popup_text = 'Click on ‘OK’ to proceed.'.
APPEND ls_popup_text to lt_popup_text.
create object lo_confirmation
EXPORTING
it_confirmation_text = lt_popup_text
iv_window_title = lv_title0.
CASE io_event->mv_event_id.
WHEN 'SEND'.
eo_confirmation_request = lo_confirmation.
ENDCASE.
*
Only when user clicks on ’OK’ button, actual record is created in the system.