Product Lifecycle Management Blogs by Members
Get insider knowledge about product lifecycle management software from SAP. Tap into insights and real-world experiences with community member blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
This blog is regarding development of a hybrid mobile app using Phonegap with SAP MII as backend. We can create Web Pages Dashboards or Reports using SAP MII Workbench. We can open those pages in Tablet/Smartphone’s browser also. But if the requirement is there for an application then there are multiple ways by which we can create an app. One of them is to use Apache Cordova/Phonegap.
What is Apache Cordova/Phonegap?



Phonegap is an open source mobile application framework that enables development of mobile application using HTML, JavaScript and CSS. This type of application are called as Hybrid applications. Code development in hybrid app is irrespective of platform like Android, iOS etc.
How do we create a hybrid app using Phonegap?

  1. We can install Phonegap CLI (Command Line Interface) using following link http://docs.phonegap.com/getting-started/1-install-phonegap/cli/

  2. Once installed we can create app using following link http://docs.phonegap.com/getting-started/3-create-your-app/cli/

  3. Once the app project is created in Phonegap directory, we can put all the web code in “www” folder.

  4. Then, we need to add platform specific libraries to phonegap project. For example: To add Android specific lib, Go to Command Line -> Change Dir to project root folder -> Type command :
    >phonegap platform add android --save


  5. We can test the app on desktop web browser using Phonegap server. For this we need to open cmd prompt (for windows). Then go to project directory using “cd” command. Then type command “phonegap serve”. This will give a URL on which the application will be hosted.


This way we can test the app before deploying on device.


How do we deploy application project from Phonegap to Android device?

  1. First, we need to install Android Studio from Android web site. (https://developer.android.com/studio/index.html )

  2. Once Android Studio is installed, we can import Phonegap project in Android Studio by going to “File -> New -> Import Project”.

  3. Then, we can see the project in the workspace.

  4. We can connect the device via USB port. Once device is detected, click on the Run icon in green to deploy the application on the device.


How do we connect hybrid application with SAP MII to run Transactions?

We can fire Ajax call from application’s JavaScript code. The URL for Ajax should contain following parameters:·

  • QueryTemplate

  • Params

  • Content-Type

  • IllumLoginName

  • IllumLoginPassword


Example URL:
http://<serverName>:<portNo>/XMII/Illuminator?QueryTemplate=<; XacuteQueryName> &Param.1="+p1+"&Param.2="+p2+"Content-Type=text/xml&IllumLoginName="+username+"&IllumLoginPassword="+password

With all the above steps we can create a Hybrid mobile application that can get data from SAP MII Transactions. Please feel free to comment on the blog and suggest your invaluable improvements.
2 Comments