Display/ Edit mode in the FPM OVP Floorplan:
According to the SAP UI guidelines there is an explicit display mode and an explicit edit mode for an overview page. The behavior of these modes should be the following:
Normally, an overview page is opened in display mode. This means all assignment blocks show their data display-only and there are no editable fields. The buttons Save and Cancel in the page toolbar are disabled. An Edit button in the assignment block title bar offers the possibility to switch the assignment block into the edit mode and hence, to change the data of this assignment block. An optional global Edit button in the page toolbar of the overview page changes all assignment blocks into edit mode. If one or several assignment blocks of the overview page are in edit mode, the Save and Cancel buttons in the page toolbar are enabled; the global Edit button in the page toolbar is disabled as well as the Edit button in those assignment block that are in edit mode. An assignment block that was switched to edit mode stays in this mode until the user clicks Save (saving all changes in all assignment blocks) or Cancel (discarding all changes in all assignment blocks) in the page toolbar. A save or cancel event sets all assignment blocks on the overview page back into display mode (if the overview page has a display mode).
Figure 1: Overview Page (with central Edit button) in Display Mode
Figure 2: Overview Page (with central Edit button) in Edit Mode
In order to enable an explicit display/ edit mode in an overview page the FPM offers three possibilities:
- Via the parameter ‘Edit Mode’ in the ‘General Settings’ of the OVP floorplan configuration
- Via the application parameter FPM_EDIT_MODE
- Via the URL parameter FPM_EDIT_MODE
Alternative 1 has the lowest priority whereas alternative 3 has the highest. This means that the application parameter overrules the configuration setting whereas the URL parameter overrules both, the application parameter and the configuration setting. Currently, the following parameter values are supported:
- ‘ ‘: No Mode Handling (default)
- ‘E’: Edit
- ‘R’: Read-Only
In the case of the value ‘ ‘ (No Mode Handling), which is the default setting, no special logic is processed by the FPM regarding display or edit mode. This means that the application behaves as before the display/edit mode feature has been introduced. There is no automatic enablement or disablement of Edit, Save, or Cancel buttons done by the FPM. The UIBBs do not receive information about their current edit mode state.
In the case of the value ‘R’ (Read-Only) the application starts at runtime displaying all UIBBs read-only whereas in the case of the value ‘E’ (Edit) the application starts at runtime displaying all UIBBs in edit mode; the latter is typically used for ‘create scenarios’. There is an automatic enablement or disablement of Edit, Save, or Cancel buttons done by the FPM. All GUIBBs receive information about their current edit mode state via the importing parameter IV_EDIT_MODE of method GET_DATA of the respective feeder interface. All free-style UIBB can access information about their current edit mode via method GET_UIBB_EDIT_MODE of the FPM runtime interface IF_FPM.
If the edit and display mode is used in an OVP application a local Edit button can be configured in the assignment block toolbar of any UIBB. This button must trigger the FPM event FPM_LOCAL_EDIT. If this button is pressed at runtime the UIBB is transferred into edit mode and is no longer read-only. In the global toolbar, Save, Cancel, and Edit buttons can be configured with the FPM events FPM_SAVE, FPM_CANCEL and FPM_EDIT, respectively. FPM_SAVE and FPM_CANCEL transfer the application globally into display mode, i.e. no UIBB stays in edit mode. FPM_EDIT transfers the application globally into edit mode i.e. all UIBBs are transferred into edit mode. In global edit mode, the global Edit button and all local Edit mode buttons are disabled whereas the global Save and Cancel buttons are enabled. In global display mode, the global Edit button and all local Edit mode buttons are enabled whereas the global Save and Cancel buttons are disabled. In local edit mode of an assignment block, the local Edit mode button of that assignment block is disabled and the global Edit, Save, and Cancel buttons are enabled.
Besides the Edit buttons there are also other buttons imaginable for a UIBB that should transfer the UIBB directly into the local edit mode. One example is an Add button for list GUIBBs. The functionality to trigger such an ‘implicit edit’ mode switch is supported in the following way:
- In order to enable automatic switching of a GUIBB into the local edit mode when a button is pressed a new indicator IS_IMPLICIT_EDIT is available in structure FPMGB_S_ACTIONDEF which is used in the feeder method GET_DEFINITION for defining non-exposable or exposable feeder actions. Setting this indicator to ‘X’ for a feeder action will automatically switch the GUIBB to edit mode when the action is triggered.
- In order to enable switching an application-specific UIBB into the local edit mode when pressing an application-specific button two cases have to be distinguished: In the case of exposable actions the structure FPMGB_S_ACTIONDEF is used again for the action definition and therefore the indicator IS_IMPLICIT_EDIT is available; however, in the case of non-exposable actions, a new attribute can be set at the FPM event of the button in order to enforce switching to the edit mode. This attribute is defined in class CL_FPM_EVENT; its name is MV_IS_IMPLICIT_EDIT.
Important Remarks & Preconditions:
- The display/ edit mode functionality of the FPM OVP Floorplan is available as of release NW 7.31.
- In order to use the display/ edit mode in the FPM OVP Floorplan the UIBBs that are used in the OVP configuration must support the display/ edit mode, i.e. they need to react appropriately on their current display/ edit mode state.