If desired, you can enable certain common actions specific to your use case for list report items. You can choose to display the actions in either the toolbar or within a specific column for line items.
You may wish to display actions in the toolbar to allow users to perform an action for one or more lines in the table.
Common Functions in Toolbar
Action |
Setting |
Comments |
---|---|---|
Create (+) |
sap:creatable="true" for the root entity set |
|
Delete |
sap:deletable="true" for the root entity set |
The Delete feature is enabled by default, as the entity set is already deletable (default value is true). |
Custom Actions in Toolbar (Specify Text)
To specify a text for your action, use the com.sap.vocabularies.UI.v1.DataFieldForAction property and specify the text to display. The example below shows how to display an action to create a copy of the list item in the toolbar:
<Annotation Term="UI.LineItem"> <Collection> <Record Type="UI.DataFieldForAction"> <PropertyValue Property="Label" String="Copy"/> <PropertyValue Property="Action" String="SEPMRA_PROD_MAN.SEPMRA_PROD_MAN_Entities/SEPMRA_C_PD_ProductCopy"/> </Record> <Collection> <Record Type="UI.DataField"> ... </Collection> </Annotation>
For information about setting up annotations for actions within a line item of the list report, see Line Item Actions in Tables.
If you wish to display a popover when the user triggers the action, add the IfActionCritical annotation as shown below:
<Annotations Target="GWSAMPLE_BASIC.GWSAMPLE_BASIC_Entities/RegenerateAllData"> <Annotation Term="com.sap.vocabularies.Common.v1.IsActionCritical" Bool="true"/> </Annotations>