- Latest Version 1.128
- Version 1.126
- SAPUI Version 1.124
- SAPUI5 Version 1.122
- SAPUI5 Version 1.120
- SAPUI5 Version 1.118
- SAPUI5 Version 1.116
- SAPUI5 Version 1.114
- SAPUI5 Version 1.112
- SAPUI5 Version 1.110
- SAPUI5 Version 1.108
- SAPUI5 Version 1.106
- SAPUI5 Version 1.104
- SAPUI5 Version 1.102
- SAPUI5 Version 1.100
- SAPUI5 Version 1.98
- SAPUI5 Version 1.96
- SAPUI5 Version 1.94
- SAPUI5 Version 1.92
- SAPUI5 Version 1.90
- SAPUI5 Version 1.88
- SAPUI5 Version 1.86
- SAPUI5 Version 1.84
- SAPUI5 Version 1.82
- SAPUI5 Version 1.80
- SAPUI5 Version 1.78
- SAPUI5 Version 1.76
- SAPUI5 Version 1.74
- SAPUI5 Version 1.72
- SAPUI5 Version 1.70
- SAPUI5 Version 1.68
- SAPUI5 Version 1.66
- SAPUI5 Version 1.64
- SAPUI5 Version 1.62
- SAPUI5 Version 1.60
- SAPUI5 Version 1.58
- SAPUI5 Version 1.56
- SAPUI5 Version 1.54
- SAPUI5 Version 1.52
- SAPUI5 Version 1.50
- SAPUI5 Version 1.48
- SAPUI5 Version 1.46
- SAPUI5 Version 1.44
- SAPUI5 Version 1.42
- SAPUI5 Version 1.40
- SAPUI5 Version 1.38
- SAPUI5 Version 1.36
- SAPUI5 Version 1.34
- SAPUI5 Version 1.32
- SAPUI5 Version 1.28
- SAPUI5 Version 1.26
- Latest Version 1.128
- Version 1.126
- SAPUI Version 1.124
- SAPUI5 Version 1.122
- SAPUI5 Version 1.120
- SAPUI5 Version 1.118
- SAPUI5 Version 1.116
- SAPUI5 Version 1.114
- SAPUI5 Version 1.112
- SAPUI5 Version 1.110
- SAPUI5 Version 1.108
- SAPUI5 Version 1.106
- SAPUI5 Version 1.104
- SAPUI5 Version 1.102
- SAPUI5 Version 1.100
- SAPUI5 Version 1.98
- SAPUI5 Version 1.96
- SAPUI5 Version 1.94
- SAPUI5 Version 1.92
- SAPUI5 Version 1.90
- SAPUI5 Version 1.88
- SAPUI5 Version 1.86
- SAPUI5 Version 1.84
- SAPUI5 Version 1.82
- SAPUI5 Version 1.80
- SAPUI5 Version 1.78
- SAPUI5 Version 1.76
- SAPUI5 Version 1.74
- SAPUI5 Version 1.72
- SAPUI5 Version 1.70
- SAPUI5 Version 1.68
- SAPUI5 Version 1.66
- SAPUI5 Version 1.64
- SAPUI5 Version 1.62
- SAPUI5 Version 1.60
- SAPUI5 Version 1.58
- SAPUI5 Version 1.56
- SAPUI5 Version 1.54
- SAPUI5 Version 1.52
- SAPUI5 Version 1.50
- SAPUI5 Version 1.48
- SAPUI5 Version 1.46
- SAPUI5 Version 1.44
- SAPUI5 Version 1.42
- SAPUI5 Version 1.40
- SAPUI5 Version 1.38
- SAPUI5 Version 1.36
- SAPUI5 Version 1.34
- SAPUI5 Version 1.32
- SAPUI5 Version 1.30
- SAPUI5 Version 1.28
- SAPUI5 Version 1.26
Locking
Intro
When multiple users work on the same work list, there is always a chance that more than one user tries to edit the same object at the same time. This can lead to the loss of important edits due to miscommunication when multiple users submit their changes without knowing from one another.
There are different concepts currently used in SAP Fiori how to handle these situations, such as locking with exclusive editing.
The concept of locking enforces a sequential change of information for objects. This behavior prevents users from updating information simultaneously while working unknowingly on the same objects at the same time. In order to overcome this gap, the concept of locking foresees that users are informed about when someone else is already processing an object. In that case, the object remains locked until the user leaves the editing process or until the lock time expired.
The following guidelines provide detailed information about the interaction of the locking behavior.
Usage
Use locking if multiple users need to work on the same work list and need to be informed about who is working on which object. If the information is only of secondary importance because users work rarely on the same objects simultaneously, consider to show the locking info only in the object view.
Layout
Locking information in a split-screen app, object view, list report, full-screen app:
Example
Types
There are several ways to display the locking information:
Icon Only (1)
Display the icon without text when information on who is locking an entity is not available to you or you need to provide the locking information in the master list of a split-screen app.
The object list item provides a property (set markLocked to ‘true’) to show the locking icon.
Icon and Text – Not clickable (2)
Display the extended version in the object header. For example, in the detail list of a split-screen app or object view.
Icon and Text – Clickable (3)
Use an icon plus link in a responsive table or in the table toolbar when a section is locked.
In a non-responsive table (such as an analytical or hierachical table), display the information in the column Editing Status.
Clicking the link opens a popover with additional data.
Text Only – Clickable (5)
If the lock expired but the draft of another user is still available, display the status Unsaved Changes.
Clicking the link opens a popover with additional data.
(1) Icon only; (2) Icon and text (not clickable); (3) Icon and text (clickable); (4) Table Column (clickable); (5) Text Only (clickable)
Behavior & Interaction
Display
The locking information should be displayed as long as a user is editing an object. In some use cases it makes sense that the lock automatically expires (for example, when the user who is blocking the object has been idle for a certain time). If that is the case, the status Unsaved Changes is displayed instead of Locked.
Edit
Locked
(1) If another user has started editing an object, all other users see that the object is locked by that user.
Please be aware there is no push mechanism – a refresh has to be triggered by the user to get the information. The user can do this by:
- Refreshing the list;
- Triggering roundtrip.
(2) If a user tries to edit the entity, an error message is displayed when clicking the Edit button. Other buttons that would update the object also trigger error messages.
Clicking the name in the error dialog opens the quick view of the user.
Expired Lock
(1) If case another user has started editing an object and the lock expires, all other users see that the object has been modified by someone else.
Please be aware there is no push mechanism – a refresh has to be triggered by the user to get the information, The user can do this by:
- Refreshing the list;
- Triggering roundtrip.
(2) If a user nevertheless tries to edit the entity, a warning message is displayed when clicking on the Edit button. Other buttons that would update the object also trigger warning messages.
Clicking the name in the error dialog opens the quick view of the user.
User 1 Tries to Save: Lock Expired
(1) When the lock time expired due to inactivity of the user and the object in work is not up to date anymore when the user tries to save it, an error message (2) is displayed informing the user that his or her changes have been lost. If no other user has started working on the entity in the meantime, the user can continue to work and the lock time is extended again.
Dialogs and Popovers
(1) An error message is shown if the lock expired due to user inactivity and the object is not up to date anymore when the user tries to save it.
(2) A warning message is shown when another user tries to access the edit mode of an object if the lock has expired but the draft of another user still exists.
(3) An error message is shown when users try to conduct any action in an entity that is locked.
(4) The quick view for the employee is shown when information on the person who locks an object is available and clickable.
(5) The popover is shown when the user clicks on the locked link.
(5.1) The popover shown when the user name is not clickable, as no user information is available.
(6) The popover is shown when the user clicks on Unsaved Changes.
(6.1) The popover is shown when the user name is not clickable, as no user information is available.
Popover Measures
A popover is displayed when clicking the locking information. Use sap.m.popover to show the relevant administrative information.
Guidelines
Tables
If you need to show that an item is locked in a responsive table, place a transparent button in the first column or next to the key information. Clicking the user name opens a popover with additional information.
If you need to show that an item is locked in a non-responsive table, provide an extra column for that information. Name the column header Editing Status. The column should be placed after the key information in the table.
Object List Item and Object Header
In case an object is locked, set the property markLocked of the object list item to ‘true’ and use the status property of the object header to show by whom the object is locked. Existing status properties should not be overwritten, rather use an additional status line to guarantee that no information gets lost.
Object Page Header
If an object is locked, set the MarkLocked property of the object page header to “true”.
Clicking the icon displays the locking information as responsive popover (on desktops).
Form Sections
In some cases, only sections of an object might be locked. In order to indicate that a section is locked, use a button in transparent style with the corresponding icon (icon name: private) and the text Locked by [name] next to the Edit button in the section toolbar. Clicking the button displays additional information about the locked status.
Resources
Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.
Elements and Controls
- Button (guidelines)
- Object identifier (guidelines)
- Object header (guidelines)
- Object status (guidelines)
- Responsive table (guidelines)
- Analytical table (guidelines)
- Tree table (guidelines)