The copy pattern allows you to copy an object and then edit the newly created object.
There are 4 use cases for copying an object:
- The object to be copied is part of the current table.
- The object to be copied is not part of the current table (for example, because it has been approved).
- The object to be copied is a template.
- The whole object is to be copied, for example, from the details view in a master-detail app.
For use cases 1–3, place the Copy function (a transparent button) in the relevant toolbar (for example, above the form or table control).
For use case 4, place the Copy function in the footer toolbar below the details of the object. For more information about the interaction, read about the master list or check out the Manage Products reference app.
Behavior and Interaction
This section describes the interaction flow of the copy pattern for different use cases.
1) The copied object is part of the current table.
The user selects an item to be copied. Multiselection is not possible. Clicking the Copy button takes the user to the details page.
2 + 3) The copied object is not part of the current table or is to be copied from a template.
When the user clicks or taps the Copy button, an action sheet appears. The user can choose one of three actions: Copy, Copy from Object, or Copy from Template. You can also choose to show only one or two of these actions to the user.
When the user selects Copy from Object or Copy from Template, a dialog appears prompting the user to choose an object or a template. When the user chooses one of these and clicks or taps the Create button, the details page appears.
4) The copied object is located in the details view in a master detail app (split-screen layout)
The user selects the item to be copied from the master list. The Copy button appears in the footer toolbar of the master-detail interface. Clicking on the Copy button takes the user to edit mode of the new item.
Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.