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
Where it sits
Who is behind it
In the atlas: maintains 1, contributes to 1@agigueremaintaineralsp80Contributes to this
In the atlas: contributes to 2@alsp801 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
Connections
Telling a person something happened when they are not looking
Git client written in ABAP that runs inside the system
Download
README
quoted from agiguere/SCPmsPushNotificationREST_API under MIT, readSCPmsPushNotificationREST_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.
-
In mobile services, make sure your native app has been configured for push notifications. Your app should have the
Push Notificationfeature assign to it. Under thePush Notificationfeature, configure the Apple APNS section, I suggest you to use Token-based rather Certificate for authentication. -
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 Userthen 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
| Method | Description |
|---|---|
| GET_INSTANCE | Factory method |
| PUSH_TO_APPLICATION | Push notification to devices registered to an application |
| PUSH_TO_APP_USER_DEVICES | Push notification to all devices registered to a particular user. |
| PUSH_TO_APP_USERS | Push notification to a list of users. |
| PUSH_TO_APP_REGISTRATION | Push notification to a device using the application registration ID. |
| PUSH_TO_APP_REGISTRATION_LIST | Push notification to a list of registrations |
| CLOSE_CONNECTION | Close 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.Others providing
Compare all 10 on the Notifications page →- aditheos/ApplicationLogsNotificationToFioriaditheos/ApplicationLogsNotificationToFioriRaises a Fiori launchpad notification when an application log records an error, and the notification opens the Application Logs app (F1487) on that log for review and corrective action.independent, abapFiori launchpad notification for application log errorsfrom ABAP
- ABAP-PRCABAP-PRCA framework for custom multi-step ABAP processes: a process class declares the states, and the framework runs each document through them and monitors the run.independent, abapFramework for multi-step ABAP processes with monitoringfrom ABAP
- com.sap.cds:cds-feature-notificationscom.sap.cds:cds-feature-notificationsSends business notifications from a CAP Java application through SAP Alert Notification service, delivered to SAP Build Work Zone or email, or logged to the console in local mode.sap official, capBusiness notifications from CAP Java via SAP Alert Notificationfrom CAP
- @cap-js/notifications@cap-js/notificationsPublishes business notifications to SAP Build WorkZone from the application, so a user is told something happened without the UI polling for it.sap official, capBusiness notifications from CAP to SAP Build WorkZonefrom CAP
- @cap-rp/notifications@cap-rp/notificationsA derived copy of the official notifications plugin under a different scope; its readme is @cap-js/notifications' with the name swapped.independent, capRenamed copy of @cap-js/notifications under another scopefrom CAP
- DryDumbHead/easyHtmlEmailDryDumbHead/easyHtmlEmailA helper class that builds HTML emails in ABAP from an HTML template uploaded through SMW0, with placeholders replaced at runtime, so only the dynamic values are handled in code.independent, abapABAP helper class building HTML emails from templatesfrom ABAP
- @expertum/cap-email-plugin@expertum/cap-email-pluginSends mail on entity lifecycle events from an annotation — @email.enabled on an entity, an HTML template with {{placeholder}} substitution, and a plugin-owned log entity recording what went out and what failed.independent, capAnnotation-driven mail on CAP entity lifecycle eventsfrom CAP
- @neoimpulse/cap-js-notifications@neoimpulse/cap-js-notificationsA copy of the official @cap-js/notifications plugin republished under another scope, whose README points at the original and says nothing about what was changed.independent, capCopy of @cap-js/notifications published under another scopefrom CAP
- peterlangner/zrsspeterlangner/zrssAn ABAP package that publishes content from an SAP NetWeaver ABAP system as an RSS feed for ABAP Development Tools and other RSS readers, stated for ABAP 7.00 and installed with abapGit.independent, abapRSS feed publisher for content from an SAP NetWeaver ABAP systemfrom ABAP
Details
Sources
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
abaplint
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:agiguere-scpmspushnotificationrest-api- JSON
- /artifacts/agiguere-scpmspushnotificationrest-api.json
- MCP
- Connecting an agent