When a user deletes a line in a table on the object page, a confirmation dialog box is displayed. You can adapt the displayed default texts for every table.
For details about how to adapt the displayed default texts for every table, refer to the separate sections below.
To adapt the displayed default texts for every table, you have to provide these custom texts in the application's i18n file, under the respective entitySet
. This is the key for those texts:
<i18n_Key>|<EntitySet>|<navigationProperty>|com.sap.vocabularies.UI.v1.LineItem
If the annotation has a qualifier for the line item annotation, then the i18n key should be:
<i18n_Key>|<EntitySet>|<navigationProperty>|com.sap.vocabularies.UI.v1.LineItem|<qualifier>
DELETE_SELECTED_ITEM|STTA_C_MP_Product|to_ProductText|com.sap.vocabularies.UI.v1.LineItem=Delete this row?
You can use these i18n keys:
#YMSG, 100: Delete selected item text. "item" to be redefined. DELETE_SELECTED_ITEM=Delete the selected item? |
#YMSG, 100: Delete selected items text. "items" to be redefined. DELETE_SELECTED_ITEMS=Delete the selected items? |
#YMSG, 30: Delete success message. Parameter: {0}= deleted items count. "items" to be redefined. DELETE_SUCCESS_PLURAL_WITH_COUNT={0} items have been deleted. |
#YMSG, 30: Delete success message. Parameter: {0}= deleted item as count (1). "item" to be redefined. DELETE_SUCCESS_WITH_COUNT={0} item has been deleted. |
#YMSG, 30: Delete error message. Parameter: {0}= non-deleted items as count."items" to be redefined. DELETE_ERROR_PLURAL_WITH_COUNT={0} items cannot be deleted. |
#YMSG, 30: Delete error message. Parameter: {0}= non-deleted item as count (1)."item" to be redefined. DELETE_ERROR_WITH_COUNT={0} item cannot be deleted. |
#YMSG, 30: Delete error message. "items" to be redefined. DELETE_ERROR_PLURAL=The selected items cannot be deleted. |
#YMSG, 30: Delete error message. "item" to be redefined. DELETE_ERROR=The selected item cannot be deleted. |
#YMSG, 30: Delete success message. "items" to be redefined. DELETE_SUCCESS_PLURAL=The selected items have been deleted. |
#XMSG: Message box text after successfully deleting an object or sub-item. "item" to be redefined. ITEM_DELETED=Item deleted |
#YMSG, 100: Delete undeletable items text: {0}=digit, {1}=digit DELETE_UNDELETABLE_ITEMS={0} of {1} items cannot be deleted. |
Only the keys given below are allowed to be overridden in the custom i18n file for deleting lines in a table:
Keys and Values
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR=Delete this object? |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_UNSAVED_CHANGES=Another user edited this object without saving the changes:{0} Delete anyway? |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_UNSAVED_CHANGES_MULTIPLE_OBJECTS=Other users have edited the selected objects without saving the changes. Delete anyway? |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_PLURAL=Delete the selected objects? |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTINFO_AND_FEW_OBJECTS_NON_DELETABLEC_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTINFO_AND_FEW_OBJECTS_NON_DELETABLE={0} of {1} objects cannot be deleted. |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTINFO_AND_FEW_OBJECTS_LOCKED={0} of {1} objects are currently locked. |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_UNSAVED_AND_FEW_OBJECTS_LOCKED_SINGULAR=The remaining object has unsaved changes. Do you still want to delete it? |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_UNSAVED_AND_FEW_OBJECTS_LOCKED_PLURAL=The remaining objects have unsaved changes. Do you still want to delete them? |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTINFO_AND_FEW_OBJECTS_UNSAVED_SINGULAR=Also delete object with unsaved changes? |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTINFO_AND_FEW_OBJECTS_UNSAVED_PLURAL=Also delete objects with unsaved changes? |
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTINFO_AND_FEW_OBJECTS_LOCKED_AND_NON_DELETABLE={0} out of {2} objects cannot be deleted. {1} of {2} objects are currently locked. |
Manifest Changes
Changes must be made in the manifest file of the application. Add enhanceI18n
to the settings
of the corresponding section as shown below:
"targets":{ "SalesOrderManageList":{ "type": "Component", "id": "SalesOrderManageList", "name": "sap.fe.templates.ListReport", "options":{ "settings":{ "contextPath": "/SalesOrderManage", "enhanceI18n": "i18n/customSalesOrderLR.properties", // This is the line to be added - it provides Fiori Elements with the name of the custom resource bundle . . . } } } }
SAP Fiori elements default values (in the resource bundle of SAP Fiori elements):
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_PLURAL=Delete the selected objects?
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR=Delete this object?
Text values from
i18n/customSalesOrderLR.properties
(custom resource bundle of the application):
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_PLURAL|SalesOrderManage=Do you want to delete the selected Sales Orders?
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR|SalesOrderManage=Do you want to delete this Sales Order?
Format of Custom Keys
For resources which are not shared across multiple entities or by multiple controls (for example, you want the same OK text in all OK confirmation popovers), do not append anything to the existing key.
C_COMMON_DIALOG_OK=OK?
(resource bundle of SAP Fiori elements)
C_COMMON_DIALOG_OK=Okie?
(custom resource bundle of the application)
For resources which are shared across multiple entity sets, append the entitySet
name. For instance, you want different delete messages based on the entity being deleted.
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR=Delete this object?
(resource bundle of SAP Fiori elements)
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTTITLE_SINGULAR |_Items=Do you want to delete this Sales Order Item?
For overriding actions that have parameters, some of the text in the action parameter popovers can be overridden. Confirmation actions also get a confirmation popover which has text that can be overridden. To override these texts, the action name along with the entity set name has to be provided. The entity set name is a mandatory piece of information, even if the application needs the custom text for an action that is used in only one entity set. If the entity set name is not appended, the resource bundle text from SAP Fiori elements will be used as a fallback.
C_OPERATIONS_ACTION_CONFIRM_MESSAGE=Are you sure that you want to execute this action?
(resource bundle of SAP Fiori elements - this text will be shown for all confirmation actions, irrespective of the action name or the entity)
C_OPERATIONS_ACTION_CONFIRM_MESSAGE|SalesOrderManage|ReturnInProcess=Can you please confirm if you really want to trigger the returns?
In the above example, the developer wants to show the custom message only when a user clicks the ReturnsInProcess
action of the SalesOrderManage
entity set. For a second action in the same entity set the last part of the key will be different, since the action name will be different.
If the action name is the same but the entity differs, then the second part of the key name above will be different and SAP Fiori elements will, based on the entity set to which the clicked action is associated, use the correct key.
C_OPERATIONS_ACTION_CONFIRM_MESSAGE|_Items|ReturnInProcess=Can you please confirm if you really want to trigger the returns for the chosen items?
If you don't provide any custom texts, the system uses the default texts listed above.