Skip to Content
avatar image
Former Member

Understanding UI annotations in O-Data metadata, CATALOGSERVICE and annotations.xml

I am pretty new to o-data based SAP Fiori UI and Smart Templates UI. And I am confused about UI annotations and how they influence the UI.

In any o-data based FIORI launchpad -

O-data service metadata document contains 2 different kind of annotations.

1. One is SAP o-data annotations as described here. These annotations play a role in entity description, relationship and visibility etc. I understood these annotations very well from the link above.

2 (a). However, I see that there is another set of annotations in many o-data services, which do have the element <Annotations>. These are represented as

2 (b). And apart from these annotations, I see annotations are also supplied from

i) - CATALOG SERVICE Url's -> URLs are something like

*sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='*_ANNO_MDL',Version='0001')/$value

ii) - annotations.xml -> application specific annotations provided by javascript app developer.

SAP UI5 somehow merges all the annotations from these resources and produce the UI.

I am interested to know how is this done? Algorithm?

Is there any documentation on this topic i.e. on these UI <Annotations>, their sources and merging?

I need to replicate this logic in java somehow and am wondering if there is a library (O-Lingo does not deal with these kind of annotations) which can help me? If not, then at least if I understand the algorithm behind these annotations and merging them all by javascript - it will help me developing one my own.

Thanks

ui-annotations.jpg (144.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 04, 2017 at 10:51 AM

    Hello Vivek,

    When you Initially create an Smart Template App, the Annotations in the Annotation.XML and Catalog service are both same.

    When creating a OData, we can define the Layout ( Not Everything ) from the Backend using annotations. So smart template picks up these annotations from the backend and then the UI is created. Now, If want to change the Layout or Design coming from the backend, then you override those annotations using Annotations.xml.

    Incase you do not make any changes to annotations.xml, both Catalog and annotation.xml would be the same.

    Hope I was able to help.

    Regards,

    Pratheek

    Add comment
    10|10000 characters needed characters exceeded