Skip to content

Instantly share code, notes, and snippets.

@cbuckowitz
Last active November 29, 2017 16:58
Show Gist options
  • Save cbuckowitz/a215bae9da8b9946a68fa48ddb171d47 to your computer and use it in GitHub Desktop.
Save cbuckowitz/a215bae9da8b9946a68fa48ddb171d47 to your computer and use it in GitHub Desktop.
How to show a simple message / confirmation box in a SAP FPM application #SAP #ABAP #FPM
  1. Choose a logically suitable GUIBB of your FPM application. This needs to be in the FPM event loop when you want to show the message box.
  2. Pick or choose an event to trigger the message box, e.g. an event on a button.
  3. Add and implement the …_EXT interface in the GUIBB’s feeder class, e.g. IF_FPM_GUIBB_FORM_EXT
  4. In the NEEDS_CONFIRMATION method, filter for your event and create the EO_CONFIRMATION_REQUEST parameter object and pass in your desired message, title and button texts. The approve button will proceed the event processing, the reject button will stop it.
METHOD if_fpm_guibb_form_ext~needs_confirmation.
CASE io_event->mv_event_id.
WHEN io_event->gc_event_send. "filter the FPM event to show the message box for
CREATE OBJECT eo_confirmation_request "the framework will render this as message box
EXPORTING
iv_window_title = |Title for the message box window|
it_confirmation_text = VALUE #(
( |A string table with detail text to show in the window| )
( |Multiple lines supported in the message box window| )
)
iv_button_text_approve = |e.g. Save, will proceed the event processing|
iv_button_text_reject = |e.g. Cancel, will stop the event processing|.
ENDCASE.
ENDMETHOD.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment