C4C: How to provide a Mass Update Feature on the Opportunity OWL
Provide a feature on the C4C Opportunities Work List for updating multiple Opportunities with the same value or set of values (kind of mass update feature). Use the SAP Cloud Applications Studio to achieve this.
The Opportunity BO (root) can be extended with a (multi-instance enabled) action. A corresponding action button can be added to the Opportunity OWL. The action implementation can be used to update a set of Opportunity instances that have been selected on the OWL.
However, since custom actions added in the Cloud Applications Studio cannot have parameters, this approach alone doesn’t allow the user to specify the values to be updated.
- Create a custom business object that stores the current set of update values per logon user id (respectively current Identity UUID).
- In addition to the custom action button, place an OBN button on the Opportunity OWL, that triggers navigation to the update value maintenance screen.
- The custom Opportunity action implementation then retrieves the values to be updated from the custom BO and sets them for the selected Opportunity instances.
1. Create a Custom BO to keep User specific Update Values
1.1 BO Definition
A "set..." indicator attribute is defined for each update propoerty, to allow for a selective update of the corresponding values.
1.2 Implement the After Modify Script
2. Extend the Opportunity BO
2.1 Add extension fields (for the purpose of this demo) and custom action
2.2 Implement the Action Script (mass enabled)
3. Create UI Artifacts for the Custom BO
3.1 Create a Screen Scenario with Object-based Navigation
Remark: This creates a Quick Activity Floorplan for editing the Opportunity Update Container values and a Port Type Package as handover structure for screen navigation. Since the QAF doesn’t seem to be supported (yet!?) on the responsive UI, it may be better to create a Thing Type based scenario with a Quick Create Floorplan. This has to be sorted out yet (any comments on this welcome!).
3.2 Adjust the layout of the QAF screen
The Identity UUID should be removed from the screen, as it is only handled internally, and the entry fields can e.g. be grouped as follows:
4. Extend the Opportunity SADL OWL
UI Repository Path: BYD_COD/SalesOnDemand/Opportunity/UI/COD_Opportunity_SADL
4.1 Add Buttons to the OWL
Add OBN Button:
Configure the OBN to call the Custom BO QAF:
Add Action Button:
4.2 Add Extension Fields to the OWL
Select the Opportunities Table:
Add Extension Fields: