PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

agiguere/SCPmsPushNotificationREST_API

ABAP classes that send push notifications from an SAP backend to iOS devices through the REST API of SAP Cloud Platform Mobile Services, reached through an RFC destination on NetWeaver 731 or higher.

Sending a mobile push notification from an SAP backend means calling SAP Cloud Platform Mobile Services' own REST API, so this project wraps that call in a set of ABAP classes. It currently supports push notifications to iOS devices, sent to an application, a user's devices, a list of users or a specific device registration, with the maintainer noting it could be extended for Google FCM. It runs on any SAP Business Suite system on SAP NetWeaver 731 or higher, reaching the service through an RFC destination configured per system.

Facts

Last pushLicenceMIT

Where it sits

Lives in
Provides
NotificationsABAPNotificationscapabilityTelling a person something happened when they are not looking at the screen — a notification in the launchpad, an email, a message somewhere they already are.
Requires
abapGitabapGitartifactInstalling and importing the project's ABAP classes into the SAP system

Who is behind it

Alexandre GiguereAlexandre GiguerePersonMaintains this
In the atlas: maintains 1, contributes to 1
@agiguere
maintaineralsp80PersonContributes to this
In the atlas: contributes to 2
@alsp80
1 contributor

Before choosing this

Signals

ActivityQuietNo published releases; repository quiet for 54 months

It publishes no releases, and its repository has been quiet for at least 24 full months. This may be normal for stable software; check whether its current state still fits your use.

What it declares

Every artifact

Type
Package
Origin
Independently maintained

As a package

Where it runs
does not say
Distributed through
abapGit

Connections2

README

quoted from agiguere/SCPmsPushNotificationREST_API under MIT, read
agiguere/SCPmsPushNotificationREST_API/README.mdOn GitHub

SCPmsPushNotificationREST_API

SCPms Push Notification REST API for ABAP.

These ABAP classes will help you sending push notification from your SAP backend to SAP Cloud Platform Mobile Services, right now I only support push notification for iOS but it could easily be extended for Google FCM.

Backend Compatbility

Any SAP Business Suite systems (ERP, HCM, SRM ...) runnning SAP NetWeaver 731 or higher.

Installation & Configuration Steps

Step 1 - Create and configure an RFC destination

Create an RFC destination of type G in transaction SM59

Named it SCPMS_ENHANCED_PUSH as an example or whatever you prefer.

Under the tab Technical Settings enter the target host of your SCP mobile services, the URL pattern should look something like

mobile.<subaccount>.<region>.hana.ondemand.com

for the port, enter 443 and the path prefix is /restnotification.

Under the Logon & Security tab, select basic authentication and enter your SAP user.

A good practice is to create a dedicated S-user only for push notification, you could ask your basis team to create this user for you and enter it in the destination.

To conclude, click SSL active at the bottom and make sure the SSL certificate is set to DFAULT SSL Client (Starndard).

Step 2 - Import SCP certificate to the SAP System Trust Store

Make sure the SAP Cloud Platform root certificate has been imported in transaction STRUST under default SSL client (Starndard). If it is not there, go to your mobile services sub-account and download the root certificate to your desktop. If you don't have access to transaction STRUST, ask any basis from your team to import it on your behalf.

In chrome, you can download the certificate by clicking the lock icon in the URL toolbar, then click Certificate.

A popup window will appears with the certificate hierarchy chain of trust. Select the root certificate (the top one) and drag it to your desktop.

After importing the certificate, restart ICM.

Step 3 - Test your connection

Go back to your RFC destination in transaction SM59 and test it.

Click the Connection Test button and you should have an HTTP 404 Not Found, rest assure, that is perfecly fine, this is because of the path prefix.

Step 4 - Install abapGit

Install abapGit.

Step 5 - Import the SCPmsPushNotificationREST_API repo in your system

Run abapGit and clone this repo by installing an online repo.

Step 6 - Configure mobile services

There is 2 things you need to do in mobile services in order to work.

  1. In mobile services, make sure your native app has been configured for push notifications. Your app should have the Push Notification feature assign to it. Under the Push Notification feature, configure the Apple APNS section, I suggest you to use Token-based rather Certificate for authentication.

  2. We need to give permission to our S-user to be able to send notifcations, the same user we have configured in our RFC destination. In SCP, go to Services -> Mobile Services -> Configure Mobile Services -> Roles -> Click the Notification User then assign your S-user that was created in step 1

Step 7 - Use the API to send push notifications

Please consult the API documentation below for examples.

Step 8 - Configure your other systems

You probably want to replicate these configuration in your system landscape (sandbox, development, quality and production). The only thing that should differ is the URL of your subaccount, it should be different in all your RFC destination.

A good strategy and common scenario is to have 1 SCP sub-account per system.

Example:

  • SCPms Sub-account A --> SAP Gateway Production --> SAP ERP Production
  • SCPms Sub-account B --> SAP Gateway Quality --> SAP ERP Quality
  • SCPms Sub-account C --> SAP Gateway Development --> SAP ERP Development

API Documentation

ZCL_SCPMS_PUSH_NOTIFICATION

MethodDescription
GET_INSTANCEFactory method
PUSH_TO_APPLICATIONPush notification to devices registered to an application
PUSH_TO_APP_USER_DEVICESPush notification to all devices registered to a particular user.
PUSH_TO_APP_USERSPush notification to a list of users.
PUSH_TO_APP_REGISTRATIONPush notification to a device using the application registration ID.
PUSH_TO_APP_REGISTRATION_LISTPush notification to a list of registrations
CLOSE_CONNECTIONClose RFC connection

ZCL_SCPMS_APNS_NOTIFICATION subclass of ZCL_SCPMS_NOTIFICATION, implement interface ZIF_SCPMS_NOTIFICATION.

Example: How to create a notification

  DATA(notification) = zcl_scpms_notification=>create_apns_notification( ).

  notification->set_title( alert_title ).

  notification->set_body( alert_body ).

  notification->set_badge( CONV #( badge_value ) ).

Example: How to send a push notification to a list of users

  DATA scp_users TYPE zscpms_user_t.

  TRY.
      DATA(push) = zcl_scpms_push_notification=>get_instance( ).

      APPEND INITIAL LINE TO scp_users ASSIGNING FIELD-SYMBOL(<scp_user>).
      <scp_user>-name = 'myUserID'.

      DATA(response) = push->push_to_app_users(
        application_id = application_id
        users          = scp_users
        notification   = notification ).

        response->get_status(
          IMPORTING
            code   = DATA(code)
            reason = DATA(reason) ).

        IF code BETWEEN 200 AND 299.
          "Success  
        ELSE.
          "Handle network error  
        ENDIF.

    CATCH zcx_scpms_push_notification INTO DATA(ex).
      "Handle exception error
  ENDTRY.
MIT, read
Notifications
  1. aditheos/ApplicationLogsNotificationToFioriFiori launchpad notification for application log errors
  2. ABAP-PRCFramework for multi-step ABAP processes with monitoring
  3. DryDumbHead/easyHtmlEmailABAP helper class building HTML emails from templates
  4. peterlangner/zrssRSS feed publisher for content from an SAP NetWeaver ABAP system

Details

Sources3
Added by handdiscovered herechecked
github.com/agiguere/SCPmsPushNotificationREST_APItree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domainabap, integration-and-messaging
abaplint
issues under its own abaplint configuration298
lines939
statements473
objects16
files10
analysed, master
abaplint version2.120.84
Contributors1

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:agiguere-scpmspushnotificationrest-api
JSON
/artifacts/agiguere-scpmspushnotificationrest-api.json
MCP
Connecting an agent