Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Participant
0 Kudos
During the last week, I was trying to consume an OData service via SmartTable that I created over CDSs. My OData and SmartTable were ready. However, my Column names in the table came in a different names from CDS. I needed to customize them and give the Label Texts I wanted. It was shared on the forums that it was made over the Annotation file, but I realized that there was no screenshots and details of how it was done, so I decided to write this Blog.


First of all, I assume that our SmartTable is being displayed:


Our aim is to change the Header Lebel Texts here.

We need to have an annotation file. There is no annotation file in a project that you created on Webide.


We are creating a new folder, we call it annotations.

We name our Annotation file and choose our OData connection.

In the window that opens, we proceed through either Annotation Models or Code Editor. I will create my first field using Annotation Modeller, then you can copy and paste this field as code and continue through Code Editor if you want. If you have a ready code, you can continue through the Code Editor or you can prepare your own code manually.

Click on Select Target and select the relevant EntityType and Property.

We add a new annotation by pressing the Plus sign at the end of the Local Annotation line. We add DataFieldDefault property.

We add the DataField by pressing the plus sign in the DataFieldDefault line.

We select the relevant Column from the Value Property section and press the plus sign.

We add a Label to the relevant field.

We write the String we want to use as a Label, either from the i118n File or manually.

We save and refresh our project. We see that the name of our related field has changed.

If you want, you can change the names of all fields in a short time by duplicating the code blocks created for the field fields whose names you know from the code editor.

Thank you for taking the time to read my blog.


Labels in this area