Fiori Elements/ABAP Programming model for Fiori – Learning about customizing the UI texts like “Object saved” message
Target Audience & Links
This blog is for those who has a basic level of understanding in ABAP Programming model for Fiori or the Fiori Elements based apps(List Report template). If not please check out my other blogs as the example in this blog is taken from the below:
ABAP Programming model for Non GUID Keys
Customizing the texts for List Report & Object Page
Recently there was question in the community about customizing the standard success message “Object Saved” which will come in the Fiori app generated using the List report template based on ABAP Programming model for Fiori (Draft).
I got curious and started to debug the standard ObjectPage Template API and found that “Object Saved” message is the fallback message that is called if the i18n text for the property “OBJECT_SAVED” is not found in the ui5 that we generate.
In fact, we don’t need to debug it, if we go the i8n file that is auto generated by SAP WebIDE, we will find that information there itself.
Now, I just went to the respective i18n file (Object Page) and added the text.
That’s it, after a quick refresh, the new success message will come.
Wow!! Thanks to the team who designed it by providing such an easy customization.
Now apart from that success message what other sort of texts I can customize? I went a head and played around with them and here are the results.
List Report URL:
you can check different texts that you can configure from the above URL
Customizing the Add button tooltip. Instead of “Create Object” I am showing “Create a new Sales Order”.
i18n Text Used: CREATE_NEW_OBJECT=Create a new Sales order
We can configure the delete popup box as well. Unfortunately the i18n text provided in the above URL didn’t work. So I debugged and found a place where the i18n texts are read for the ListReport template UI.
Then I found that the text in the delete popup comes from the i18n property: ST_GENERIC_DELETE_SELECTED. As this is not provided in the URL, “Please do at one’s your own risk”.
Object Page URL:
For changing the “No data found.” text for the object page items.
You can go through the different texts available in the above URL’s for more details. Incase if you don’t find one, maybe try debugging at the spot I’ve provided (of course, at own risk 😛 )
You can also find couple of examples at SAP UI5 documentation.
Please let me know if I missed anything or for any other suggestions 🙂 🙂
Thanks & Regards,
Interesting read. Thanks for the blog Mahesh Kumar Palavalli .
Thanks Prasad 🙂
As always great tip my friend! Thanks for sharing this very valueable!
? Thanks Nabheet!!
Great! Congratulations Mahesh
Thanks for sharing this very useful blog!!
If I want to generate the “save” message from BOPF and display that to the object page, how to do that? We have a requirement to show the same message along with some dynamic value.
Nice blog. You got me into debugging it out too.
Regarding this "ST_GENERIC_DELETE_SELECTED. As this is not provided in the URL, “Please do at one’s your own risk”."
It really depends on what you're using in your project (as described in the ui5.yaml file)
For example : My log will show that these resources are being loaded for 1.71.19.
and the ST_GENERIC_DELETE_SELECTED can be found on the first one.
But if I just look at the generic resource file, it won't be there https://ui5.sap.com/resources/sap/suite/ui/generic/template/lib/i18n/i18n.properties
🙂 Thanks for the tip Wilbert!!