msc mobile emerging technologies blog

Mobile Offline Applications with a huge data volume for SAP with the Exchange Framework, MobiLink and Cordova

Posted by Alexander Ilg on Feb 24, 2016 3:00:00 PM

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:

  1. Offline applications with a very high data volume (Millions of records or GB of data)
  2. Offline applications which require a synchronization that is sub-second
  3. Applications with an ultra-fast user interface
SAP has another technologies that they acquired together with Sybase and Syclo – MobiLink and the Exchange Framework. This blog will give an introduction an architecture consisting of the Exchange Framework, MobiLink and Apache Cordova. It will explain how they can be utilized to create solutions that can meet the three previous mentioned attributes.

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.

MobiLink Architecture

Consolidated Database

  • SAP HANA
  • SAP ASE
  • SAP SQL Anywhere
  • Oracle
  • MS SQL

Remote Database

  • SQL Anywhere
  • UltraLite

While MobiLink itself on the server side can run on Windows Server and Linux, the remote databases are available for all major platforms:

UltraLite

  • iOS
  • Android
  • Windows (32/64bit/Store Apps)
  • Blackberry

SQL Anywhere

  • Windows (32/64bit)
  • Linux

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.

Exchange Framework

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.

The SAP Agentry Framework Config Panel

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.

Cordova Client

Apache Cordova is the open source version of Adobe PhoneGap. It can be used to create platform independent application that are developed mainly with web technologies like html5, JavaScript and CSS. The power of Cordova is its modular, plugin based architecture. PlugIns – written in native code of the underlying operating system – can access native features of the device. So it is possible to access features like the camera, bar code scanners, RFID readers, the address book or – like in our case – the local MobiLink API and the UltraLite database.

Example app developed with MobiLink and 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 communication between the JavaScript part and the PlugIn is done via SQL statements and JSON:

  • 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: 

Mobile Offline apps for SAP customers


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%”. 

Mobile Offline Apps with SAP MobiLink/ Remote Data Sync White Paper Free  Download!



 

Topics: MobiLink, SAP, Exchange Framework, Cordova