Let's imagine the following application example: An application is to be created to support service employees. The service employees are on the road at customer sites to perform repairs or maintenance, so they need a mobile application for their work.
This provides service staff with data on the customer's devices and maintains a service history for each device. The device data is held and maintained in an SAP system.
The service application manages the service histories. Parts of the service data have to be transferred back to the SAP system, for example, to create invoices.
Master for master data
Thus, in order to implement the application, a mobile application is required as the front end, as well as a back end for data management and access to SAP data. The communication between front-end and back-end is done via a REST interface.
There are various technological approaches for the implementation - in the following, all components will be realized using the technology stack offered by SAP. From a technological point of view, the backend of the application is a Hana infrastructure with XS services and an SAP system.
The latter acts as the master for the master data. The Hana system, the master for the transaction data, contains not only a pure database but also a web server that provides web content and can also execute JavaScript on the server side thanks to an integrated runtime environment (the so-called XS engine).
If only simple read or write operations are required, the data can be accessed via so-called ODATA services. These follow the REST principle and are easy to use with JavaScript, among other things.
The developer thereby receives the complete set of CRUD operations for a table. Complex business logic can be implemented with the XS engine already mentioned or directly in the Hana database.
Access to the services and data is protected by the integrated SAP rights system. Data is synchronized between Hana and SAP via the Landscape Transformation Server (LTR).
This is a service that keeps two data sources - in this case database tables - in sync using given strategies. For example, the LTR has the necessary functions to immediately synchronize changes to master data into the associated Hana database tables.
However, for reverse synchronization, corresponding services must first be implemented on the SAP system, which can then be triggered by Hana as soon as data has been changed via the front end.
SAPUI5 and OpenUI5
For the development of mobile frontends, because the primary use of the application is on-site, the JavaScript framework SAPUI5 or the corresponding open source variant OpenUI5 is the best choice.
This JavaScript MVC framework, comparable to the popular AngularJS, is based on jQuery and can therefore be learned relatively quickly. SAPUI5 already contains ready-made interface components and functionalities for accessing data.
These provided components are designed for the connection of ODATA services. This facilitates databinding in an application such as the one described here and makes it possible to easily implement even complex searches or filters.
Unlike AngularJS, SAPUI5 comes with ready-made solutions for the layouting and styling of the application. The layouting is responsive, which simplifies the broad support of different mobile devices.
With the help of the prefabricated look and feel, graphically appealing applications can be created in a short time, but adjustments are often very time-consuming. SAP now provides a theme designer for this purpose, which is intended to simplify adjustments to the look and feel.
Apache Cordova is additionally used to package the SAPUI5 application in a native application framework. Another important aspect for mobile applications is offline capability.
The application should be able to at least partially retain the data stored in the Hana database in order to compensate for any connection disruptions or even enable complete offline operation.
Unfortunately, SAPUI5 does not offer a ready-made solution for this. The technical implementation makes use of so-called "storages", a SAPUI5 construct for storing any data locally in a structured manner, and the possibility of registering callbacks to the data queries.
All accesses to data can thus - if necessary - be redirected to the local database. When the backend is available, the local database can then be synchronized with the backend again.
The hardware requirements for a Hana system are very high - the minimum configuration for a system requires at least 128 GB of main memory and an unspecified amount of disk storage.
Our installation is currently running with 500 GB of disk space. Alternatively, there is the option of using Hana instances in the cloud, either via SAP or via Amazon Web Services. This saves time and costs for installing the hardware; usage costs are incurred depending on the system size and computing load.
This makes cloud use particularly suitable for development purposes, but there are some limitations in operation with regard to data modeling and access options to the Hana instance.
To escape these limitations, it is recommended to operate your own Hana installation. Especially when connecting another SAP system for the purpose of synchronizing data, an own platform offers significantly more flexibility.
Conclusion
In summary, Hana is fundamentally suitable as a platform for complex mobile-centric applications. With SAPUI5, the Walldorf-based software company relies on modern web technologies.
For both frontend and backend development, you're moving into the JavaScript world: since SAP uses well-known components like jQuery, developers can draw on their existing JavaScript knowledge.
The creation of services using existing database tables is simple, but still offers sufficient flexibility to map even more complex cases. The framework is tuned for interaction with Hana, so in this combination it leads quite quickly to useful results, while without Hana it offers hardly any advantages over other alternatives.
Due to the costs associated with the licenses and the operation of the hardware, the deployment is primarily suitable for operators who already have SAP systems in use.