With the Analytics Designer, it is possible to create analysis applications in the SAP Analytics Cloud (SAC). However, there are scenarios where the capabilities of the Analytics Designer are not enough. The solution is custom widgets, which offer an almost unlimited range of functions. In this blog post, you will learn how an Analytics Designer custom widget is structured and what advantages you benefit from.
SAC und Analytics Designer
Within the SAP Analytics Cloud, the Analytics Designer is a component for complex reporting applications. With the help of ready-made report elements, interactive applications can be designed and expanded with individual functions thanks to extensive scripting options. Compared to the classic on-premise report applications from SAP, the Analytics Designer is the successor to the SAP Lumira Designer. While not all of the functionalities from the Lumira Designer have yet been integrated into the SAC, SAP is clearly focusing the development on the Analytics Designer and preferably provides it with new features.
Structure of a custom widget in Analytics Designer
A custom widget for the SAP Analytics Cloud consists of the following four components:
The custom widget metadata is represented by a simple JSON file containing the basic properties and configuration parameters. Only this metadata file is uploaded to the SAC. The other three components are only linked in the file and must be hosted externally on a dedicated web server. For development purposes, external hosting can be implemented using a local web server or a Github repository with Github Pages, for example.
Here the styling panel is implemented for configuration in analytics designer to do that Appearance of the components via the graphical interface of the Analytics Designer.
This is where the builder panel for configuration in Analytics Designer is implemented. The panel is relevant when a Data source connected to the custom widget shall be.
A custom widget is shown below as an example use case, which integrates a SAPUI5 control for displaying a calendar in the SAC. The already available SAPUI5 framework is used for this and addressed in the custom widget. While in principle any SAPUI5 controls can be integrated in this way, the SAPUI5 version currently used in the SAC must be checked beforehand. Otherwise, newer controls may not yet be compatible. The integration looks as follows within an Analytics Designer application:
On the one hand, the application logic contains the XML view of the components, which is translated into HTML at runtime. The basic structure can be adopted for various SAPUI5 controls from the Samples Library at ui5.sap.com and can look like this:
According to the methodology used, the SAPUI5 control shown can be exchanged as desired, resulting in a wide range of possible applications. Alternatively, other frameworks can be integrated in order to implement visualizations or purely technical custom widgets. The latter are not displayed in reports, but can, for example, read additional data from third-party systems or implement logic that is not available with the native options of Analytics Designer. Through the simple construction of custom widgets development effort is also reduced compared to previous solutions such as the SAP Lumira Designer. Missing functionalities of the Analytics Designer can be quickly implemented as a custom widget. If you have use cases for custom widgets in the SAP Analytics Cloud, please contact us!
Was this article helpful to you? Or do you have any questions? Write us a comment or give us a call.
Lennart Scholand works as a SAP consultant at CONET Business Consultants GmbH and advises partners and customers on the topics of SAP BusinessObjects, SAP Analytics Cloud and SAPUI5.