Mobile SAP Client (Android): android SAP Customer search client demo
The app currently available on the market doesn’t work with the default settings anymore. The default settings use the SDNs ES Workplace ERP server as backend and uses the function module “RFC_READ_TABLE” directly via web service. But a necessary service on the server was deactivated.
So it is only possible to use/test the app at the moment if you connect it with your “own” SAP backend. You can do this by using “Menu -> Settings” and provide endpoint, username and password of your externally accessible SAP system.
The android mobile OS is one of the buzz words seen very often in the media in the last weeks or month. The OS that can be used by all mobile phone vendors free of charge is one of the most important challengers of the iPhone and the Blackberry phone.
One of the ideas behind the OS was making app development for the platform quite easy for 3rd party developers and provide a tool to easily distribute or sell the apps to all interested users to them: the android market — comparable to the iPhone app store.
So the only thing you need to start developing whatever app you can think of is some spare time. You can find all the necessary tools here: http://developer.android.com. You don’t event need a android phone. The android emulator is enough to develop.
Because of this I developed a simple android demo/proof of concept app that searches SAP ERP clients by name — by name patterns –, comparable to a standard SAP search help and that displays the customer data.
Find the necessary ingredients
To do this, I simply utilized the SAP function module “RFC_READ_TABLE” exposed as a web service. Of course there are a lot of more specific web service available in SAP to search customers, but this one is a fast approach for this POC. After all, this function module is available in every ABAP system and SAP version.
Because the android phone needs to access public available web service — outside corporate firewalls — , I decided to use the SAP ERP system of the SDN ES Workplace. You can find the wsdl-file to the ws here ( you have to apply for a user for the es workplace first):
The android version 1.6 and up is capable of connecting to your corporate network via VPN. This could be used to connect your phone to the SAP backend. One other possibility is to deploy a kind of proxy ( or middleware) between the SAP and the internet. Or just make the http port of your sap server available to the internet (at own risk).
The next problem is that the android SDK does not provide a soap client implementation. Some Google searches pointed me to an old fellow: the kSOAP2 (http://ksoap2.sourceforge.net/) lib. This is a soap client implementation targeted at J2ME application. Though i found out later that it has it’s limitations, it did a good job in this POC.
Put it all together
I don’t want to go to much into detail, but if your interested, i can send the code.
Android SDK provides UI Element (view) that with the name AutoCompleteTextView (http://developer.android.com/reference/android/widget/AutoCompleteTextView.html).
This is a simple text input box that displays predefined suggestions after every letter the user types into it. e.g. an auto complete for county search would perhaps suggest “Germany” and “Georgia” if the user types “Ge”.
This view does a query for suggestions each time a new letter is typed ( or deleted).
So my implementation queries the SAP (via web service) for clients that match the letters (2 letters minimum). In my case, i do the matching against the name (kna1-Name1), customer number, street and city. So, IF the user types “Ne Wa”, SAP could find customer “John Washington” in “New York” or customer “Isaak Newton” in Washington 🙂
When the customer is found and selected, the app displays it’s master data and enables the user to view his location an Google maps. ( you can think of more – e.g. show his sales history, his sales charts)
There is also a settings screen for the web service. With this settings, your able to connect to your server. The EndPoint looks like “http://yoursaphost:saphttpport/sap/bc/soap/rfc“.
See yourself. The video provides a real device demo.
Look at the video or just install from the market place (even without a android phone http://android.modaco.com/content/general-discussion/289928/testing-getting-an-emulator-up-and-running-a-full-rom-with-the-market-etc/ ).
I was surprised how fast the online search is, even on medium quality network connection.
This is only my first POC. Think what is possible. Create orders in ERP/CRM … . Look up all kind of data. Combine SAP ERP with non-SAP data … Ideas welcome
See the app on an real device: