Skip to Content
Author's profile photo Kenichi Unnai

#6 How To… Implement End-to-End Push Notifications with HCPms and SAP Gateway

#6.pngThis is a part of the implementation details of How To… Implement End-to-End Push Notifications with HCPms and SAP Gateway.


Implementation Plan

/wp-content/uploads/2015/10/11_820384.png

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


Steps to Implement


1. Import Root CA Certificate from HCPms to SAP Gateway system

2. Configure HTTP Destination to HCPms

3. Configure bgRFC

1. Import Root CA Certificate from HCPms to SAP Gateway system


As HCPms requires SSL, we need to import the Root Certificate into SAP Gateway Hub system. Open your HCPms URL in the browser (Firefox is recommended to export the Root Certificate).

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

Click on the lock icon left side of the URL. Click on More Information.

In the popup, select Security tab and click View Certificate.

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

Select Details and choose your root certificate. Press “Export” and save the cert file on the disk (the format doesn’t really matter – choose the default PEM format).

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

In the Gateway Hub box, run the transaction code STRUST. Select “SSL client SSL Client (Anonymo” as shown.

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

Find and click the small icon for Import certificate. Select the Root Certificate file just downloaded.

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

Click on “Add to Certificate List”. (If you see the button is not activated, make sure your screen is in edit mode).

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

Be sure to save the imported Root Certificate file by pressing the Save icon.

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


2. Configure HTTP Destination to HCPms


Now we’re going to configure the HTTP connection between SAP Gateway Hub and HCPms. Run the transaction code SM59. Create a new entry with the Connection Type = G (HTTP connection). Type the Target Host for your HCPms instance server name with the port# 443. Enter the Path Prefix /Notification/ .


In addition to it, supply the http proxy server information so that SAP Gateway Hub can go through the proxy to the HCPms server.

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

Switch to the tab Logon & Security. Enter your HCPms account credential.

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

Scroll down – and select SSL = Active, SSL Certificate = ANONYM SSL CLIENT (Anonymous). This ensures the connection will use the Root Certificate you had imported.

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

After saving the configuration, press the connection test button. It should return “405 Method Not Allowed“. This is the expected result.

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


3. Configure bgRFC


Let’s create a bgRFC configuration. We need to do this step to create a push message queue for HCPms.

bgRFC1.png


Run the transaction code SBGRFCCONF. First thing is –


a. Define Supervisor Destination


(Note – formal help document: Configure the bgRFC Supervisor Destination – SAP NetWeaver Gateway – SAP Library)


Click on the Define Supervisor Destination tab. Here you need to define Supervisor Destination, a kind of the system user setting. Click on the Create icon and name your Supervisor Destination = BGRFC_SUPERVISOR.

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

Enter the Destination Name and select Create User with the User Name = BGRFCSUPER (actually, the name can be anything). As the formal help document states, this user needs a SAP Role “SAP_BC_BGRFC_SUPERVISOR” assigned. No password needs to be set.


Note – the User generation in this window might not work well, depends on the password policy of your system. If you find it doesn’t work, create the user BGRFCSUPER via the transaction code SU01. (as a system user of type B)

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

In the transaction code SM59, now you have a RFC Destination “BGRFC_SUPERVISOR” in Connection Type 3. And the system user for bgRFC is assigned in the Logon & Security tab.

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


b. Define Inbound Destination


(Note – formal help document: Maintaining Inbound bgRFC Queue on the Hub System – SAP NetWeaver Gateway – SAP Library)


Run the transaction code SM59. Create a new RFC Destination “IWFND_ODATA_PUSH” in Connection Type 3. Supply Target Host = <the local SAP Gateway Hub server name> and its System Number.

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

Click on the Special Options tab, and scroll down to select Transfer Protocol = Classic with bgRFC. Save the config.

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

Run the transaction code SBGRFCCONF. Select the Define Inbound Dest. tab. Click on the create icon.

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

Here you enter the IWFND_ODATA_PUSH value you had created. This is going to be the name of the queue. Make sure to choose Logon/server group value too.

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

Now you had configured the bgRFC setting to create a push queue.

bgRFC1.png

What’s next? Let’s try the push test.


#7 How To… Implement End-to-End Push Notifications with HCPms and SAP Gateway

Assigned Tags

      17 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mathew Davis
      Mathew Davis

      Hi Ken

      Thank You for this blog.

      In the step Configure HTTP Destination to HCPms

      After creating RFC, getting message as

      ICM_HTTP_SSL_PEER_CERT_UNTRUSTED

      Regards

      Author's profile photo Mathew Davis
      Mathew Davis

      ssl.PNG

      Author's profile photo Mathew Davis
      Mathew Davis

      Hi Ken

      This is how we have done, is this correct?

      /wp-content/uploads/2015/12/image_853585.png

      Author's profile photo Kenichi Unnai
      Kenichi Unnai
      Blog Post Author

      I see your CN is *.dispatcher.hana..

      Perhaps you should make sure if you chose the Root "Baltimore CyberTrust Root" http://scn.sap.com/servlet/JiveServlet/showImage/102-68561-4-821358/6.15.png

      Author's profile photo Mathew Davis
      Mathew Davis

      Hi Ken,

      Its working fine now

      Thank you

      Author's profile photo Former Member
      Former Member

      Hi Ken,

      In my case, i tested to send notification by using restClient to SMP server is using http (http://publicIP:8080/), so do i need to import the certificate?

      Author's profile photo Former Member
      Former Member

      i get the following:

      Status HTTP Response 404
      Status Text Not Found
      Duration Test Call 1667 ms
      Author's profile photo Jeff Gebo
      Jeff Gebo

      404 means you hit a server, but the resource you are trying to access is not found there. What SMP server version are you using?

      Author's profile photo Former Member
      Former Member

      Hi Jeff

      I'm using SMP3 SP9.

      Author's profile photo Kenichi Unnai
      Kenichi Unnai
      Blog Post Author

      Here's a tip.

      In SMP Admin cockpit, find the app you want to use and there's "Push URL" value. Copy and paste it in the REST client, invoke it with HTTP GET. It should show "405 Method Not Allowed".

      Author's profile photo Former Member
      Former Member

      Hi Ken,

      My Push URL is :

      REST Client display Status 404:Not Found

      "notification targetID is not specified, Cannot process the notification"

      Author's profile photo Former Member
      Former Member

      Hi Ken,

      My mistake. I was accidentally set the REST Client as POST, After change the method as GET then i got the 405: Method Not Allowed.

      So the smpPushUser with "Notification User" role will do.

      Besides, i'm able to get "405: Method Not Allowed" in my SM59 too.

      Thank you.

      P/S : No any certificate imported in my case.

      Author's profile photo Former Member
      Former Member

      Hi Ken,

      I am little confused. This total 6th document work is on NetWeaver Box or some process on ERP backend system also.

      In my case, my OData service (Fetches Sales orders list) is created in the backend ERP system. But registered the service in my Netweaver box, so I can view that service from SICF T-Code in Netweaver box.

      When ever a New sales order has been created in the backend ERP system, I need to send notification to the HCPms.

      Now my main doubt is, Where we need to create the bgRFC and where to Monitor. ETC...


      Please help.

      Thank you.

      Ravinder.

      Author's profile photo Kenichi Unnai
      Kenichi Unnai
      Blog Post Author

      >registered the service in my Netweaver box

      This is GW Hub.

      >Where we need to create the bgRFC and where to Monitor

      I think your landscape is exactly what is explained in the H2G. You need to create bgRFC queues for both GW Hub and ERP backend.

      Author's profile photo Former Member
      Former Member

      Hi Kenichi Unnai

      Thanks for the response. I have another question.

      Do we need to install Cryptographic Library before uploading our root CA certificate ?

      Thank you.

      Ravinder.

      Author's profile photo Kenichi Unnai
      Kenichi Unnai
      Blog Post Author

      Actually I never installed SAP Gateway by myself.

      If you have a working SAP Gateway correctly installed - I believe you won't need to do any additional libs installation.

      Author's profile photo Navdeep Singla
      Navdeep Singla

      Hi Kenichi,

      We have gone through the blog and imported the certificate in STRUST.

      We have set up the SM59 RFC connection – when we are trying to do connection test – we are getting login window and if we try putting the username and password – we are getting 401 error.

      We have also tried executing the SCP Mobile Service URL from REST client and we are getting same 401 - error.

      The objective is to send Push notification from SAP to SAP Cloud platform.

      Can you please let us know if there are any settings we need to do to achieve this.

      Thanks,

      Madhur K