How SAP Fiori Elements generates SAP Fiori Apps
SAP Fiori Elements is a powerful framework that dramatically simplifies and accelerates the development of SAP Fiori apps by automatically generating the front end from metadata. But how exactly does this process work? Let’s take a look at the technical details.
The basis: OData services
The basic requirement for using SAP Fiori Elements is the existence of OData services that provide the data for the app. These OData services must support the OData V2 or V4 protocol. Other data sources are not supported. The OData services not only provide the data itself, but also contain metadata in the form of annotations that define attributes and relationships of the data.
Generation of the app at runtime
The central concept behind SAP Fiori Elements is the generation of an SAP Fiori app at runtime from an existing OData API with additional metadata (annotations). Not only the content of the application’s pages is generated by SAP Fiori Elements, but also the logic and behavior. This results in very little UI developmentas navigation, filtering, editing, saving, etc. are all handled by SAP Fiori Elements. By using the metadata from the OData services, SAP Fiori Elements can automatically generate the entire app UI, including the layout, forms, lists, and other UI elements. Developers don’t have to worry about the details of UI implementation, but instead focus on providing the right metadata.
Annotations for customization
Although the front end of the app is automatically generated, developers can influence the appearance and behavior of the app by customizing the annotations. The annotations can either be added directly to the data in the backend or overwritten in a local annotation file in the project. To make it easier to create and edit annotations, SAP offers the “SAP Fiori Tools”. These tools allow developers to create new SAP Fiori Elements applications or edit the annotation file using Guided Developments. These guided developments allow developers to walk through the steps required to implement a specific functionality in the application and generate a code snippet that can be easily inserted into the code.
Technical requirements
Like any technology, SAP Fiori Elements also has some technical requirements:
- Execution Environment: SAP Fiori Elements applications are web applications that run in a browser. Native iOS or Android Fiori Elements applications do not exist.
- Data connection: The data source must support the OData V2 or V4 protocol. Other data sources are not supported. Offline use of the app is not supported.
Overall, SAP Fiori Elements offers an efficient and standardized way to develop SAP Fiori apps by automatically generating the user interface from metadata. By reducing the amount of UI development required, developers can focus their attention on providing the right data and metadata instead of dealing with technical details of UI implementation.