Skip to Content
Technical Articles
Author's profile photo Mahesh Palavalli

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

Durable locks in S4HANA

 

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: 

…/resources/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties

you can check different texts that you can configure from the above URL

 

Examples:

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: 

…./resources/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties

Examples

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.

https://ui5.sap.com/#/topic/f5a04c7ddd054a33a84e48525a51b5fb

 

Please let me know if I missed anything or for any other suggestions 🙂 🙂

 

Thanks & Regards,

Mahesh

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo PRASAD VSRK
      PRASAD VSRK

      Interesting read. Thanks for the blog Mahesh Kumar Palavalli .

      Author's profile photo Mahesh Palavalli
      Mahesh Palavalli
      Blog Post Author

      Thanks Prasad 🙂

      Author's profile photo Nabheet Madan
      Nabheet Madan

      As always great tip my friend! Thanks for sharing this very valueable!

      Author's profile photo Mahesh Palavalli
      Mahesh Palavalli
      Blog Post Author

      ? Thanks Nabheet!!

      Author's profile photo Enric Castella Gonzalez
      Enric Castella Gonzalez

      Great! Congratulations Mahesh

      Author's profile photo Sophia Scott
      Sophia Scott

      Thanks for sharing this very useful blog!!

      Author's profile photo Angshuman Chakraborty
      Angshuman Chakraborty

      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.

      Author's profile photo Wilbert Sison
      Wilbert Sison

      Hi Mahesh,

      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.

      https://ui5.sap.com/1.71.25/resources/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties
      https://ui5.sap.com/1.71.25/resources/sap/suite/ui/generic/template/ListReport/i18n/i18n_en.properties

      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

      Regards,

      Wilbert

       

      Author's profile photo Mahesh Palavalli
      Mahesh Palavalli
      Blog Post Author

      🙂 Thanks for the tip Wilbert!!