Skip to Content
Author's profile photo Paul Aschmann

S2F: Developing an iPad app using SAP Netweaver Gateway – Part 2

In the Introduction and Part 1 of this 2 part blog series, we looked at the platform and prerequisites needed to develop an iPad using Netweaver Gateway as your data provider. In this part, we will step through the app itself and look at the System Development Life Cycle (SDLC), and some of the common points when dealing with each stage.

Slides
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.

Why did you use a native app versus HTML5? This is another blog post all together, but essentially my argument is it depends on the job at hand and what is trying to be accomplished. A bit like a decision of when do you add a web page to your portal versus developing windows form app, there is no simple or straight – once size fits all answer. Both have their place.

So that’s an overview of the presentation and content, I know this may have been slightly drawn out, but for those who would have liked to attend, this is a close second 🙂

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.