SAP offers more and more business processes that are running out of the box on mobile devices. This is done by rolling out a growing number of so called Fiori Apps. But also on the technology side SAP is catching up by introducing mobile friendly technologies like UI5, Gateway/Odata, SAP Mobile Platform and HCP Mobile Services.
These applications and technologies are great to mobilize 95% of all online and offline use cases, but there are exceptions where they are not enough. This includes:
- Offline applications with a very high data volume (Millions of records or GB of data)
- Offline applications which require a synchronization that is sub-second
- Applications with an ultra-fast user interface
MobiLink as Middleware
MobiLink is a database replication technology and in our case the heart of the system. It can synchronize a central server database (called Consolidated) with decentralized remote db’s (called the Remote). MobiLink is part of the SQL Anywhere database but offers multiple options for the Consolidated and the Remote.
- SAP HANA
- SAP ASE
- SAP SQL Anywhere
- MS SQL
- SQL Anywhere
While MobiLink itself on the server side can run on Windows Server and Linux, the remote databases are available for all major platforms:
- Windows (32/64bit/Store Apps)
- Windows (32/64bit)
While SQL Anywhere as a remote is a full blown database system, UltraLite is an embedded db with a very small footprint. Never the less, UltraLite can be used to synchronize and store data way beyond the 1 GB border.
Next to the synchronization of structured data/database tables, MobiLink has also a powerful file transfer mechanism. It supports the synchronization of unstructured data such as images, PDFs or any other file type.
MobiLink as a technology is part of the HANA database (called RDS – Remote Data Service) and is utilized in the HANA Cloud Platform (HCP) to implement IoT (Internet of Things) solutions. It is also used within the SAP Mobile Platform to enable offline odata (but limited in its power because of an abstraction layer on top of it).
The power of MobiLink is the synchronization between the consolidated and the remote database. In our scenario, where we want to mobilize a classical SAP ABAP system, we also refer to the Consolidated and MobiLink as the middleware. What MobiLink does not offer is a way to load SAP backend data into the middleware database. For this step – which we call the replication – we use the Exchange Framework, which we will discuss next.
The Exchange Framework was developed by Syclo as part of their Agentry platform to mobilize SAP backend data. It is a powerful tool to track changes within a SAP ABAP system and is still used today within the SAP Mobile Platform and the SAP Work Manager and SAP CRM Service Manager applications.
The Exchange Framework is available as an ABAP AddOn. Once installed it offers a Web DynPro application (/n/syclo/configpanel) that can be used to configure the so called exchange tables. These tables contain information about what has been changed within standard tables in SAP. The framework also offers a way to detect these changes.
SAP has further AddOns which deliver pre-defined exchange objects and tables for the following three scenarios:
- SAP ERP PM/CS - Plant Maintenance/Customer Service (Work Order, Notifications, Function Locations, Equipments, …)
- SAP CRM Service (Service Orders, iBase, Business Partners, …)
- SAP CRM Sales (Leads, Opportunities, Activities, …)
When we want to utilize the Exchange Framework to write data into the Consolidated database, we need to enhance it. Instead of just writing the data locally into the exchange tables, we directly write the changes into the Consolidated on the middleware. This can be done by configuring an external database in transaction dbcon. Now we can write to this external db from within our ABAP code using the SQL dialect of this specific database.
Now that we have the data replicated into our middleware and from their synchronized to the mobile device, we need to access the local offline database, provide business logic and display a user interface. This is where the third component comes into the picture – Apache Cordova.
Example app developed with MobiLink and Cordova
Using Cordova and a MobiLink PlugIn that we developed for iOS, Android and Windows we are able to write client business logic and user interfaces with web technologies and execute them on all three mentioned platforms.
Talking about web technologies – here we are open to all available commercial and open source frameworks like SAP UI5, JQuery or others.
- The plugin has a SQL statement as input parameter (INSERT, UPDATE, DELETE or SELECT)
- It returns a JSON object with the ResultSet
This way we can create powerful queries with joins, inner joins and much more. The following graphic gives an overview of the architecture as a whole:
This blog was just scratching the surface of what is possible. There are many topics that have not been discussed like for example security, scalability, tooling and much more.
This architecture is proven and has been implemented at many customers before. It is the right architecture for the “other 5%”.