Nowadays it becomes more and more necessary to think, to react and above all to act globally. Simultaneously in this huge network, it is very difficult to get the information you want, at the moment you need it. Handy apps on your mobile device help you to reconcile both.
SAP helps the businesses do, what they do best, even better. But who helps you to run straighter and to navigate easily to SAP locations all over the world?
So the idea of a ‘SAP Labs Finder App’ was born. An app which guides you through the next SAP office depending on your current GPS coordinates. Other POIs, this app can find and route you to, are hotels nearby and airports. Additionally this so called ‘SAPsidiary Finder’ provides you with information about each POI in the selected range, like the exact address in the country language and format. Furthermore you are able to call the selected POI and to visit the homepage.
In this blog I will focus on the steps that were necessary to create a beta version of the ‘SAPsidiary Finder’. First impressions and very useful hints I got from Ivan Femia’s blog you can find here: The specified item was not found.. Also information about Layar and what Augmented Reality is, he provided there.
At first I maintained (name / address) some SAP offices, hotels and airports as business partner in the transaction bp.
Then I created a database table to collect the special data for each POI and a report to fill it (e.g. longitude, latitude, imageURL, tel, website…).
Via SAPLINK I installed the ZGEOCODE.nugg created by Gregor Wolf, which you can find here: http://wiki.sdn.sap.com/wiki/display/ABAP/ZGEOCODE. I customized the report, which retrieves longitude and latitude, so that it writes the geodata from my database table into the table geoloc.
The method find_surrounding_bps I used to get all POIs from geoloc, which are in range the user selects.
After that, I built the Web Service ZLAYAR, which is reachable for Layar. In the request_handler method, the requestURL from Layar is analyzed first. Then the method find_surrounding_bps is called. After that, the special POI information is added to each found item.
Layar requires a response in JSON. I installed the NUGG_JSON-0.2.0.nugg created by Uwe Fetzer, which you can find here: https://cw.sdn.sap.com/cw/releases/viewall/1077. I modified the method add_stru to meet all requirements of Layar. Now the request_handler method parses the POI information into JSON and the created JSON document into an XSTRING. The Web Service sends this XSTRING as response to Layar (content type application/json).
The last step was to establish a valid layer. Therefore I used very good tutorial you can find here: http://layar.pbworks.com/w/page/30832324/First%20Layar%20Tutorial%20-%20Create%20a%20simple%20layer.
That’s it 🙂
And this is just a basic layer in a 2d space. There are so many other opportunities if you create a 3d layer! I hope the final version of this ‘SAPsidiary Finder’ will help you all, to reduce efforts and stress while traveling to a SAP office all over the world.
Many thanks to Ivan Femia, who enabled me, with the information in his blog, to create my layer. And many thanks to Martin Lang for his support.