Start 2 Finish: Developing an iPad app using SAP Netweaver Gateway

Essentially, these are some of my slides from a TechEd presentation last week (MOB205). My position with this presentation is to depict the overall process I use when developing an app, a few of the *many* considerations to make, as well as the simplicity of using a product like Gateway to actually connect and “consume” ERP/CRM/Back office data in a few lines of code.

Slides
Capture.PNG
Why Mobile?Needs no introduction, mobile was one of the hottest topics at TechEd this year, if it had a “girly” name or acronym like “HANA” … I am convinced it would have been “the” hottest topic 🙂 Why Gateway?The mobile landscape is fairly complex right now, lot sof vendors, lots of choices and not particularly easy to navigate. One this is for sure, services are here to stay – particularly REST based web services and that is exactly what Gateway is built for.Another great product: XS Data Services for HANA …. 
Capture2.PNG
So this is the app being designed during the presentation. Essentially my goal was to develop a “template” type app which the attendees could download and use as a starting point for their mobile app development and encourage them to get their feet wet.
The app makes 2 service calls. 1 to pull a list of customers from SAP ERP, once selecting a customer, the app would download the additional details of the customer including the address. And lastly – the “idea” … anyone wanting to customize the app could pull additional data in, a good example would be: An Accounts Receivable Clerk who attends a weekly open payables meeting, may want to take their iPad, get a list of customers, select one in question and see all open payables which are relevant … easy to do with this type of structure and simple to implement.Another example was a Business Development road warrior who could select a customer, and see a list of Open Quotes.Your app … here is some starter type code and you decide …
I skipped a couple of the slides related to the Gateway platform … this included this slide/blog post I added a couple of weeks ago:http://scn.sap.com/community/netweaver-gateway/blog/2012/10/02/what-sap-netweaver-gateway-is-not
Slide3.PNG
During the presentation I also reminded folks that mobile apps can be powered by a variety of data providers, including a method we (Lithium labs) did a couple years ago which was actually using SAP.Net Connector (v2.0) to create a ASP.NET Web Service (XML) which was called from the mobile device which worked and is still in production today.
Capture5.PNG
In this app, all the components are distributed. The Netweaver Gateway instance in the cloud at AWS (Thanks John!) and connected to a ERP backend which is in Walldorf (ES Workplace). The app talks to the AWS GW machine which pulls the data from the ERP and gives it back to the iPad via a REST web call.
Slide10.PNG
Now that we have covered the platform, we will go through the prerequisites for developing the iPad app. We will cover the development machine types, software need and useful tools.
Slide12.PNG
A mac development machine is recommended, when I started out 3 years ago, I tied to put together a hackintosh … didnt work, first update and it bombed… waste of time. A used mac mini off craigslist goes for +- $300 … worth the investment.
Slide13.PNG
This is an overview of the developer accounts – most important point was that with the free account you cannot run your app on a physical device … (boo). Pay the $99 if you are getting started and if you develop something your company wants to deploy on a larger scale … i.e. > 10 devices, pony up to the Enterprise Program.Click here for additional details:https://developer.apple.com/programs/start/ios
Slide14.PNG
Development options.I am a native kind of guy …
Slide15.PNG
Useful tools include a solid graphics editor … I estimate that I spent +- 50% of my time when developing an app from start to finish with graphics and the UI. If you have access to a graphic or UI designer … USE THEM 🙂 RESTClient for Firefox has saved me multiple hours … a quick and easy way to test your services before development.
Slide17.PNG
In this case the 5 steps simply outline the general direction needed to take a app from conception to production.
Slide18.PNG
From a requirements point of view and as mentioned in the introduction, the app was built to provide a framework for the participants and encourage them to “Extend” it.
Slide19.PNG
When starting the app it makes an initial service call from BAPI_CUSTOMER_GETLIST, selecting one of the records will make a second call usig BAPI_CUSTOMER_GETDETAIL and populate the detail page.
Slide20.PNG
Another suggestion I made was to proof out the data access portion first, not necessarily build from the bottom up, but rather ensure that all data fields which are required are accessible. I have spent countless hours developing front end apps, with a “wishlist” of datasets which were not feasible when I started modelling the data services and had to reconsider many points.
Checkpoint
Slide21.PNG
So next up from a design perspective and as mentioned above, we walked through the data exposure piece, essentially using SE80 to take your BAPI and create a web service. From SP04 – this should be done in SEGW, not SE80. 
Slide24.PNG
Once the service has been created and exposed, RESTClient for firefox is a great tool for testing the service before even touching any code. This to me is part of the “data access” test I do before design.
Slide25.PNG
Executing our service in this case produced the results showing a list of the customer details.
Checkpoint
Slide26.PNG
Data has been exposed and seems to be working. Next up design the app UI.
Slide27.PNG
Slide28.PNG
Slide29.PNG
As mentioned, a point people found interesting in the presentation was that I spent on average 50% of my time in a graphics editing program like photoshop, designing icons, UI elements, etc. IMO – UI is the difference between a good app, and a great app. The iPad/iPhone graph paper is very handy and you can print or even buy your own from this site: http://sneakpeekit.com/pad-sketchsheets/
Slide30.PNG
I also suggested that open source software should be considered when developing mobile apps, in our case the app will be using 2 packages to make life simpler, JSONKit and AFNetworking. Cocoacontrols.com is a great website for discovering open source code.
Checkpoint
Slide31.PNG
At this stage the data source created, the UI designed and its time to do some coding in XCode. I will be going into more detail behind these steps in an upcoming blog series called “S2F”.
Slide33.PNG
Start with a master – detail template (from XCode). Add your UI elements comprising of labels and buttons.
Slide35.PNG
Create a 20 line method for fetching data from your gateway service and displaying it on the screen. Very quick and simple. Obviously *good* programming takes considerably more time, but as a POC and starting point, this is perfect.
Checkpoint
Slide36.PNG
Data, design and code done, next up some testing and deployment options.
Slide38.PNG
We did a quick test and spoke about the deployment options. If you are a partner and would like to certify your app, work needs to be done to package your content using the AAK toolkit and developing in your own namespace.Also keep in mind that with a apple enterprise license:“An app will not run if the distribution certificate has expired. Currently, distribution certificates are valid for one year. A few weeks before your certificate expires, request a new distribution certificate from the iOS Dev Center, use it create create new distribution provisioning profiles, and then recompile and distribute the updated apps to your users.”
Slide39.PNG
Wrapping things up, we can see that with only a few lines of code you can easily (and without any additional tools) can connect and consume data from Netweaver Gateway. Also keep in mind that if you would like to cache that data in a local sqlite db, it really only takes a few more lines to make data available offline. (differential control when writing data is a WHOLE nother story!)

At the end a couple of the questions included:

I see you are passing the username and password in the URL? Yes, in this example that was the case to display the simplicity. Pratically you would want to definitively use SSL, pass your params in the header of the HTTP request and also possible hash/encrypt these variables. read more

iCRM – a free mobile app powered by ES Workplace

A *little* while ago, I developed and blogged about a app which used ES Workplace’s enterprise services to power a simple CRM client on the iPad – I also mentioned it was going to be a free downloadable app in the app store, well that time has finally arrived. You can now download iCRM for SAP in the app storecreate an accounton the ES Workplace landscape and test it out. The best part is that if you have any of these ES Workplace services/configured or implemented in your own CRM landscape you can connect to them by simply changing the configuring in the app’s settings.

Some of the app features:

– View your business partners. read more

What SAP Netweaver Gateway is NOT ….

I believe that there is a lot of talk online where people are asking the question … Why should I use Netweaver Gateway if I have Netweaver Process Integration (PI) or vice versa. I was recently on a SAP mobility call which included a great slide entitled “What SAP Netweaver Gateway is and is not!”. I thought I would share this with everyone and a couple other posts and links I have come across on the web, which hopefully people wanting to learn more about what Gateway has to offer, will find useful.

SAP Netweaver Gateway is NOT:

– The SAP Gateway process in the Netweaver Application Server ABAP that enables external communication (e.g. RFC). read more

Notes Viewer for Mac

Since I have been spending the last few weeks getting some Netweaver instances running on my new Hyper V server, I have spent a considerable amount of time on the SAP Notes website debugging and troubleshooting everything from installation to master guides. Since my SAP Note Viewer apps for iPhone and iPad are fairly popular and I was tired of having to login so many times, I figured I would develop a “clone” for the Mac.

The free app features a pretty basic status bar menu and when you open it for the first time, requests your s-id and password and your search language (German and English). Once opened, you can enter a Note number or search term, submitting will automatically bring up the note in your browser. If you enter a search term, the app will search and return a list of results which you can select, opening the note. The search is fairly slow, as it is, in essence, making two round trips (one for the page and the second for the results). read more

Supplier Analytics – a new free iPad app

After writing about utilizing javascript charts in iOS apps a little while ago, I decided it would be a good marketing tool for my company (Lithium Labs) to develop a free/public app which demonstrated the features of using such technologies on handheld devices. The free app is called Supplier Analytics and when using the sample dataset gives you some insight into how a enterprise app could be used in an automotive manufacturing/supplier environment. The app gives operations or managers insight into the performance and operational well-being of a company globally, and nationally by subsequently drilling down into a production facility or branch. read more

Using Netweaver Gateway Development Tool for XCode and Gateway 2.0 SP03

I recently downloaded the Linux pre-configured gateway trail along with the developer tool for XCode and ran into some issues that none of my newly created services were being displayed in the service list from the tool. 

After doing some digging it seems the tool was originally developed for Gateway 2.0 SP02 and currently does not seem to support SP03 perfectly. When trying to discover the services it is checking the SData ICF Node versus the OData node which is where all services are defined for Gateway 2.0 SP03. Whats even more odd, is that the services show up only when the new OData Node is completely disabled.

If you are having issues discovering the services you have created (possibly in one of the awesome pre-configured gateway trials) open up the /IWFND/MAINT_SERVICE Tcode and try to disable the OData ICF Node. By default the services are created with both SData and OData nodes for backwards compatibility. Then refresh your services in the tool to check if the service is now available. read more

Integrating Apple Siri with SAP Gateway

After hearing about folks hacking Apple’s Siri to do things like starting their Viper and controlling their thermostat, I thought about utilizing voice based integration with SAP to retrieve data. By default, Apples technology is pretty well locked down, but it didn’t take long for a developer to introduce a small workaround using a ruby app and a DNS filter. The filter intercepts the call to apple and allows you to inject your own questions, responses and data. If you are interested in learning more, this summary can guide you through the process of setting up and actually communicating with SAP from Siri.

Click here for a short demo video on youtube. read more

Insight for SAP – A new free app from Lithium Labs

Here is a little app we threw together for SAP Customers, developers, users and generally interested parties in the ERP world.

We wanted to aggregate mutliple, interesting sources of SAP data and news and present it in a simple easy to use interface. The app pulls data from google, SDN, interesting blogs and the SAP news site.

As usual our apps always welcome news ideas and constrctive critism, so feel free to provide some feedback!


Here is a link to the app in the iTunes app store

SAP Note Viewer for iPad and iPhone v2.0 Released

Thanks to everyone who has downloaded the app to date (roughly 9000 of you!). Also thanks to all the people providing feedback and ideas for future versions, keep them coming. 

Version 2 of the app has been given some major improvements to the iPhone version including the ability to review the comment attributes (version, applications and status) which was already in the iPad version. Another improvement to the iPhone app is the ability to launch the note in Safari on the device. Basically a quick link to the note but you will still need to authenticate yourself.

The biggest improvement in v 2.0 is the ability to now search for notes rather than having to know the specific note numbers, as per the previous releases. Another interesting improvement is the ability to “Tag” notes, currently, Implemented, Deleted, Success and Failed are the options. A bunch of bug fixes were also made. read more

A Proof of Concept: The social aspect of enterprise data

Something I truly enjoy about my job is that fact that I am given freedom to explore creative solutions to business challenges. Being in manufacturing and the extremely demanding automotive industry, we are consistently challenged to produce better product, at a lower cost and in a shorter time in order to maintain reasonable margins. We are often faced with implementing solutions which augment our manufacturing processes and enable production employees to have better insight to the products being produced which ultimately ensures better quality. Some of these solutions include real time production labeling (tightly integrated from PLC’s to SAP), On-line visual display of requirements and products being produced and even include metrics like OEE.  read more