Object Handling (Create, Edit, Delete)
Foundations / Best Practices / Global Patterns / Object Handling / Object Handling (Create, Edit, Delete)
Intro
In addition to the basic display option, the following actions are available for objects:
-
Create
Objects can be created as follows:- From scratch
Most of the examples in this article show how to create objects from scratch. - Copy an existing object
The source object and copy are of the same object type but are not related. - With reference to an existing object
The object can be of another object type, and both objects are related. For example, the user creates a delivery with a reference to the corresponding sales order.
- From scratch
-
Edit
Objects can be edited at different levels: You can make the complete object editable, or only parts, such as single sections or items. -
Delete
The interaction flows for the “create”, “edit”, and “delete” cases depend on the structure of the object.
Simple vs. Complex Objects
An object can consist of only one page or several nested pages:
- Simple object with one page: All information is on just one page (for example, a leave request). Object pages with navigation bars and wizards are also simple objects. In these cases, the content is still managed in one page but is structured using anchors or tabs (object page) or with a progress bar (wizard).
Simple object with one page in edit mode
- Complex object with nested pages: Information is split between a main page and several subpages (for example, a sales order that lists all sales order items on the main page, and a selected item is managed on a subpage). You can display the object and its pages in either a full screen layout or a flexible column layout.
Complex object with nested pages in edit mode
Simple Objects (1 Page)
Create
For the create flow, see Simple Objects (Create, Edit).
Edit
For 1-page objects, you can set the entire page to edit mode. If only a few sections are editable, set only these sections to edit mode, or open a dialog for editing. For more information, see Partial Edit.
Tip: If your page contains a table and you need to edit specific fields for many items at once, use the mass edit pattern.
Delete
For the delete flow, see Delete Objects.
Complex Objects (Nested Pages)
You can choose between 3 interaction flows for handling objects with nested pages:
- Partial flow
- Local flow (only the page a user is working on is locked)
- Global flow (entire object including subpages is locked)
You can only use one of these flows for any given object. Do not mix them.
Use the following criteria to choose the right flow:
Note that, for technical reasons, an application implemented with JavaScript UI5, cannot display an SAP Fiori message box. Instead, only a native browser popup can be displayed. Typically, this applies to:
- Navigation away from a page with unsaved data using browser controls, for example, when the user clicks the browser back button to leave an object page in an application without draft handling
- Closing a browser page or tab with unsaved data
- Refreshing a browser page with the browser controls
However, the message box can be displayed for the following actions, as described in the SAP Fiori guidelines:
- Navigation between applications
- Navigation away from pages in full or partial edit mode
You can use the mass edit pattern in all flows.
For more information, see Partial Edit, Complex Objects – Local Flow and Complex Objects – Global Flow.
Naming Guidelines
Apply the following naming conventions for the triggering button, finalizing action, title in the shell bar, and the placeholder for newly created objects.
For subitems, apply the following naming conventions.
1) Create: Brand new object that has not yet been created on the database.
2) Add: Existing object that is being added/assigned.
For naming examples, see Creating an object or item in the UI text guidelines.
Dynamic page with header title
Resources
Elements and Controls
- Simple Objects (Create, Edit) (guidelines)
- Partial Edit (guidelines)
- Complex Objects – Local Flow (guidelines)
- Complex Objects – Global Flow (guidelines)
- Form (guidelines)
- Create with Reference (guidelines)
- Copy (guidelines)
- Delete Objects (guidelines)
Implementation
- Form (SAPUI5 samples)
- Simple Form (SAPUI5 samples)
Visual Design
- Form (visual design specification)
Elements and Controls
- Simple Objects (Create, Edit) (guidelines)
- Partial Edit (guidelines)
- Complex Objects – Local Flow (guidelines)
- Complex Objects – Global Flow (guidelines)
- Form (guidelines)
- Create with Reference (guidelines)
- Copy (guidelines)
- Delete Objects (guidelines)
Implementation
- Form (SAPUI5 samples)
- Simple Form (SAPUI5 samples)