Leveraging SAP HANA Live for Real-Time Insights
In today’s fast-paced business environment, organizations demand real-time insights to make informed decisions. SAP HANA Live delivers a powerful framework for accessing transactional data in real time using Core Data Services (CDS) Views. To visualize and interact with this data effectively, SAPUI5—the UI development toolkit for HTML5—offers a rich, responsive interface tailored for analytical applications.
This article explores how SAPUI5 and CDS Views can be combined to build modern analytical applications within the SAP HANA Live ecosystem.
CDS Views serve as the semantic data model layer on SAP HANA. They provide:
SAPUI5 is a client-side JavaScript framework optimized for building responsive, intuitive, and performance-driven web applications, especially SAP Fiori apps. It offers:
Start by defining CDS Views with relevant annotations for analytics and UI.
Example:
@AbapCatalog.sqlViewName: 'ZSALES_OVERVIEW'
@OData.publish: true
@Analytics.dataCategory: #CUBE
define view Z_SalesOverview as select from vbak {
key vbak.vbeln as SalesOrder,
vbak.erdat as OrderDate,
@DefaultAggregation: #SUM
vbap.netwr as NetValue,
@UI.lineItem: [{ position: 10 }]
vbak.waerk as Currency
}
@OData.publish: true annotation automatically exposes the view as an OData service.@UI.lineItem guides the UI which fields to display.Use SAP Gateway or SAP Cloud Platform to register the OData service generated from CDS Views.
In SAPUI5, create a model linked to the OData service:
var oModel = new sap.ui.model.odata.v2.ODataModel("/sap/opu/odata/sap/Z_SALESOVERVIEW_SRV/");
this.getView().setModel(oModel);
Use SAPUI5 controls like sap.ui.table.Table, sap.m.List, sap.ui.chart.Chart, or sap.ui.comp.smarttable.SmartTable to build interactive and analytical views.
Example of a SmartTable bound to the CDS view OData service:
<smartTable:SmartTable
id="salesTable"
entitySet="Z_SalesOverviewSet"
tableType="Table"
useExportToExcel="true"
showRowCount="true"
enableAutoBinding="true"
header="Sales Overview"
persistencyKey="salesTableKey"
enableVariantManagement="true"
enableTableFilter="true"
/>
Smart controls leverage CDS annotations automatically, simplifying UI configuration.
SAPUI5 smart controls automatically support filtering and sorting based on CDS metadata. You can further customize filters using SmartFilterBar tied to the same entity set.
Since CDS Views run in the HANA layer, the backend data retrieval is highly optimized. However, monitor your app with:
Optimize CDS definitions or OData query options as needed.
Combining SAPUI5 with CDS Views empowers developers to create powerful analytical applications that deliver real-time, meaningful business insights directly from SAP HANA Live data models. This approach ensures high performance, semantic richness, and a seamless user experience aligned with SAP’s modern UX standards.
Mastering this integration unlocks the potential of SAP’s digital core, enabling businesses to thrive in an increasingly data-driven world.