/wp-content/uploads/2015/10/logo_817503.pngHi everyone,

 

Attention please…

 

Push Notifications. It’s everywhere in our daily mobile apps. If the pushed information is relevant and interesting, it provides up-to-date relevant information to users, encouraging engagement, sparking recognition and increasing involvement. The messages are simple, uncomplicated. They contain only the essential information, making them user friendly and effective.

 

No doubt it applies to the case of SAP’s mobile portfolio – The ability of “Business Events to Push Notifications” is one of the major value proposition.

 

The question is how to implement it with minimum effort and time, as the push implementation is all about connecting dots. You need to go through all the creation of apps and server config, and making sure if each dot is connected properly. The goal of these H2G series is to cover all the practical aspects so that many of the readers can implement it without spending hours (or days) of try & error.

 

Applicable Releases

 

SAP HANA Cloud Platform Mobile Services (HCPms)

SAP Gateway SP4+

 

 

How It Works

 

Let’s have a look at how it works from the end user perspective. Assuming all the configs are properly done and the device is happily on-boarded to HCPms.

 

As you see in the diagram, it is the very typical landscape – the HCPms and Push Providers are located in the internet while all the SAP specific systems are protected by the firewall.

/wp-content/uploads/2015/10/1_813740.png

1. The device registers with Push Provider. Each Push Provider shall provide the notification token.

 

/wp-content/uploads/2015/10/2_813741.png

2. The device tells HCPms the notification token, which was provided by each Push Provider. HCPms adds and stores the token in the existing user on-boarding information. Now HCPms knows how to talk to each Push Provider when it needs to send the message to your device.

/wp-content/uploads/2015/10/3_813742.png

3. The device “subscribes” to business event. Technically it subscribes the OData collection with which you want to get notified when Create/Update/Delete occurs. The subscription itself is also done via OData. Once the subscription step is done, the ERP Backend keeps track of which application connection ID (of HCPms) subscribes which OData collections.

/wp-content/uploads/2015/10/4_813746.png

4. Now the time to push. If any of the business event happens (most likely the OData collections subscribed has changed), the ABAP code looks up the table so that it prepares which subscribers the push is relevant for, and it triggers the notification via SAP Gateway Hub to HCPms by HTTP POST. As SAP Gateway knows the firewall proxy config, it doesn’t use the HANA Cloud Connector during this step. The message goes through Push Providers via HCPms.

/wp-content/uploads/2015/10/5_813747.png

That’s all. It’s that simple and powerful – but the question is how exactly we implement all the things. In the next section, we’ll go through in details.

 

 

Steps to Implement

 

Let’s implement from a scratch. How do we create each dot and wire them all? The first step is –

 

1. Implement your mobile app so it will work with Push Providers. This requires each platform specific SDK/documentation and Push Provider setup. Each Push Provider offers fairly matured documentation and sample codes. Not to mention, iOS is for APNS, Android for CGM, and Windows Mobile for WNS. These are all generic (3rd party) push implementation.

/wp-content/uploads/2015/10/6_813982.png

> Implementation Details

 

2. Once your platform specific push implementation is done correctly, time to get in the HCPms specific part. Configure the app setting on HCPms so that it will work with Push Provider for each mobile application (identified by the app ID) with HCPms.

/wp-content/uploads/2015/10/7_813986.png

> Implementation Details

 

3. Add small code in your app so that the app can add push registration information (or token) to HCPms. Technically it is the code to add your push token to the existing user on-boarding info in HCPms. By using this token, HCPms can relate the application connection id to the platform specific push receiver identifier. Once it is done, you can test the push message via HCPms to see if the message correctly reaches to your device.

/wp-content/uploads/2015/10/8_813987.png

> Implementation Details

 

> Test the landscape

 

4. Time to work on SAP components, which sit behind the firewall. Deploy and configure HANA Cloud Connector so that HCPms can talk to SAP Gateway Hub system over the firewall.

/wp-content/uploads/2015/10/10_813988.png

> Implementation Details

 

5. Working with SAP Gateway Hub. Major to-do thing here is to configure the bgRFC (Background RFC) to create a queue for push messages. If you don’t need ERP backend access, you can implement OData services in the Hub system. The OData service must be implemented as “subscribable”.

/wp-content/uploads/2015/10/12_821321.png

> Implementation Details

 

> Run the Test Report

 

> Tips & Tricks – Implementing Subscribable OData services & Notification API in ABAP

 

6. If you need ERP backend access for push content (such as SAP Business Workflow), wire the SAP Gateway Hub and its ERP backend. The configuration of bgRFC is required here too for queuing the push messages. Write some ABAP code to trigger the push.

/wp-content/uploads/2015/10/13_821322.png

> Implementation Details

 

> Tips & Tricks – Implementing Subscribable OData services & Notification API in ABAP

 

 

 

That wraps up the implementation, entire landscape is ready to subscribe & notify. Hope this H2G helps you to take a full advantage of push notifications with SAP Mobility Platform.

 

 

– Happy Notifications!!!

 

 

 

 

 

 

 

 

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Christophe BERNARD

    Hi Ken, you have made an amazing work! Again we thank you for the time you took to build that up and of course for your availability when we asked you for help on that matter. Your blog will no doubts help a loooooot of customers!! Cheers, Christophe

    (0) 

Leave a Reply