SAP for Mobile

2 Posts authored by: Mark Teichmann

Currently we are switching our SAP Mobile Platform (SMP) from Version 2.3 to 3.0. One result of developing for the new platform is that we have to redesign an Approval app built on Hybrid Webcontainer (HWC) using MBOs to a new design using Kapsel and an OData source. While MBOs and the HWC have their pro's and con's the data transmission worked really nice using Workflow DCN and RFC for the connection between SAP and the SMP. And you could use the app also offline due to the cached data.


Redesign for SMP 3.0 in this case means we have to rebuild the whole backend logic and application from scratch. Therefore I am digging me through example code in order to learn about the new programming paradigms.


One thing that I stumble upon very often here is that there is made heavy use of the Busy Indicator. In terms of user experience this means that you as a user have to wait very often until some data show up.


You can easily experience this by yourself if you build a Workflow Starter Application using the SAP NetWeaver Gateway Productivity Accelerator (GWPA) based on the standard WFSERVICE. Of course this Starter App is only to see as a help to get started and no performance optimization is included there. But still the same mechanism is used in all Gateway Online apps and you cannot rely on good network coverage during daily use.



For my taste an app has to perform always well and I never want to see a Busy Indicator when I use an App. The only exception from this may be some Online transactions like bookings where I need to get a confirmation immediately.


Now what are you thinking about Gateway services and Online apps? Am I giving a theoretical example here because all apps out there are highly optimized or are using fast WiFi connections? Or maybe it does not annoy you if you see these fancy whirling Busy Indicators from time to time on your device? Or is this only a temporary problem until SMP 3.1 will offer Offline OData for Kapsel apps?



Inspired by some blogs about RESTFul Webservices (e.g. Android and RESTFul web service instead of SOAP  (Android and RESTFul web service instead of SOAP) ) I will show you a short example how easy it is to consume SAP data in a mobile app built with rhomobile.

Mobile Frameworks


There are several different frameworks for web apps  ( available. Here I will show you an example built with Rhomobile which makes use of the Rhodes framework. It is an open source Ruby-based framework to build native apps for iPhone, Android, RIM and Windows Phone. In order to get started you only need to install Rhostudio  ( which includes the Rhodes framework, the RhoStudio Eclipse IDE and RhoConnect, a server that connects your mobile devices with your backend systems like SAP.

Steps involved

Building my example app was done by the following steps:

  • Creating a Rhoconnect application

  • Creating a Rhoconnect Source Adapter

  • Creating a Rhodes Application

  • Creating a Rhodes Model


For step 1 I created a simple web service that reads table SCARR and serves the result as a JSON object created using the ABAP JSON Document Class  ( from SAP CodeExchange. The result looks like this:


The remaining steps are done in the RhoStudio Eclipse IDE. For steps 2 to 5 you only need to follow the 'Create ...'-Wizards in Eclipse.

Consuming the SAP data needs only inserting some lines of Ruby code into the generated SourceAdapter class that you can see below:


This is all that is needed for our RhoConnect application for synchronizing the data between SAP and the RhoConnect server (please keep in mind that I only implemented the READ functionality in this example).  The model of our 'Airline' data object is createdby simply naming the fields of table SCARR:


After these steps you only need to enable sync of data between the application and the RhoConnect server (by uncommenting 'enable: sync' in the model class) and implement the model into the view by adding "<%= url_for :controller => :Airline %>" into the generated code.

Running the example Application

After starting the simulator and logging in you get the following overview:


Selecting an entry directs you to the detail view of the entry. In the standard generated code the CRUD (Create-Read-Update-Delete) functionality is already implemented. Therefore in the example code you can edit the data but synchronizing it to SAP does not alter the data unless I implement it in SAP.



Filter Blog

By author:
By date:
By tag: