Simple FPM message / confirmation box

For a simple message or confirmation box in an FPM application (akin to e.g. MessageBox in UI5), the needs confirmation mechanism of the framework provides a simple option. Next best I know of, would be to implement a full blown Dialog Box, there are nice community blogs for that.

In summary, the FPM event loop provides an option to pause the event processing, display a dialog and then abort or resume the event processing based on the user dialog input. This is exposed by additional interfaces for the GUIBB feeder classes. They are located in package APB_FPM_GUIBB, same as the feeder class interfaces, named like the corresponding feeder class interfaces + …_EXT:

IF_FPM_GUIBB_ATTR_FILTER_EXT

IF_FPM_GUIBB_CAROUSEL_EXT

IF_FPM_GUIBB_CHART_EXT

IF_FPM_GUIBB_FORM_EXT

IF_FPM_GUIBB_FORM_REPEATER_EXT

IF_FPM_GUIBB_LIST_EXT

IF_FPM_GUIBB_SEARCH_EXT

IF_FPM_GUIBB_TREE_EXT

IF_FPM_GUIBB_VISBIZ_EXT

The matching interface must be added to the corresponding feeder class e.g. IF_FPM_GUIBB_FORM_EXT to the form feeder class. The NEEDS_CONFIRMATION method is called in the event loop and you can intercept any event flying around in the loop. The method has an exporting parameter EO_CONFIRMATION_REQUEST. Just create an instance for it and pass the constructor the title, details and button texts. The framework pops up a message box and depending on the user input stops or continues the event processing.

HowTo “MessageBox”

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.

Pick or choose an event to trigger the message box, e.g. an event on a button.

Add and implement the …_EXT interface in the GUIBB’s feeder class, e.g. IF_FPM_GUIBB_FORM_EXT

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.

The event loop pauses while the “message box” dialog is shown. Very nice to use for Are you really sure and know what you are doing? kind of confirmations…