Enabling Push Notifications

Objective

After completing this lesson, you will be able to configure Push Notifications to the SAP Service and Asset Manager client

The Process Steps of SAP Service and Asset Manager Push Notifications

End-to-end push notification process for the SAP Service and Asset Manager application involves the following steps:

  1. Business event triggered from AP business object data change, which sends a push notification from the SAP back-end system to SAP Business Technology Platform Mobile Services push service.

    Push notification contains information such as SAP Business Technology Platform Mobile Services application id, SAP business object type and object key, push recipient user ID, and push message payload.

  2. SAP Business Technology Platform Mobile Services push service receives push notification from the SAP back-end system. It then uses the SAP Business Technology Platform Mobile Services user registration list for the SAP Business Technology Platform Mobile Services application id setup for SAP Service and Asset Manager, to forward push message payload from SAP backend system, to SAP Service and Asset Manager mobile client, either with Apple Push Notification Service (APNS) or Google Firebase Cloud Messaging (FCM).

  3. SAP Service and Asset Manager mobile client receives push notification from SAP Business Technology Platform Mobile Services. Users can acknowledge the push notification and performs on demand sync with the SAP back-end system to download the latest information of the SAP business object that triggered the push notification.

SAP Business Technology Platform Mobile Services Push Configuration

SAP Business Technology Platform Mobile Services can run either in the Cloud Foundry environment or the Neo environment. Push configuration steps are slightly different depending on the environment.

  1. SAP Business Technology Platform Mobile Services Push Configuration in the Cloud Foundry environment:

    1. Enable feature Mobile Push Notification:

      Go to the home page for SAP Business Technology Platform Mobile Services Native/Hybrid application defined for SAP Service and Asset Manager, that is, SAP_SERVICE AND_ASSET_MANAGER_NNNN_OAUTH, under Info tab, in the Assigned Features list, verify feature Mobile Push Notification has been assigned. If not, add the Mobile Push Notification feature.

    2. Configuration settings for the feature Mobile Push Notification:

      Define the configuration setting:

      SettingValue
      Predefined Global Push Configuration.SAP SERVICE AND Asset Manager

      Add a new Service Key:

      SettingValue
      AliasSAPServiceandAssetManagerPushService
      Assign RolesPush_single; push_all; push_multiple; register_onbehalf; pushRegistrations_read

      Note the push API Key and URL for the created Service Key. This information is required in the SAP back-end push setup.

      URL has the following format: https://<host_name>/<push_service_identifier>

  2. SAP Business Technology Platform Mobile Services Push Configuration in Neo Environment:

    1. Enable feature Push Notification:

      Go to the home page for SAP Business Technology Platform Mobile Services Native/Hybrid application defined for SAP Service and Asset Manager, that is, SAP_ASSET_MANAGER_NNNN_OAUTH, under the Info tab, in the Assigned Features list, verify feature Push Notification has been assigned. If not, add the Push Notification feature.

    2. Configuration settings for the Push Notification feature:

      Define the configuration setting as follows:

      SettingValue
      Predefined Global Push ConfigurationSAP Service and Asset Manager
    3. Identify the URL for the push API:

      Go to the mobile application home page, under APIs tab, find the URL for the Enhanced Push API.

      The URL has the following format: https://<host_name>/restnotification.

MAIF Configuration and Setup in SAP S/4HANA or SAP ERP System

  1. Push the Notification Configuration for SAP Business Technology Platform Mobile Services using Cloud Foundry Environment.

    1. Update the Outbound Trigger Configuration:

      MAIF Outbound Trigger configuration objects SSAMnnnn_WORKORDER_TRIGGER_BTPMS and SSAMnnnn_NOTIFICATION_TRIGGER_BTPMS are defined for SAP Service and Asset Manager to send push notification to SAP Business Technology Platform Mobile Services. Configuration setting is updated to indicate the Cloud Foundry environment is used with SAP Business Technology Platform Mobile Services.

      Use tcode /SYCLO/CONFIGPANEL to run the MAIF configuration tool. From ConfigPanel, select Outbound Trigger Configuration, update the outbound trigger configuration using the following settings:

      Settings: Update the Outbound Trigger Configuration:

      AttributeValue
      Outbound Trigger IdSSAMNNNN_WORKORDER_TRIGGER_BTPMS
      CLOUD_FOUNDRYTrue
      BTPMS_WITH_SAP_USERID

      Depends on Identity Provider setup for SAP Business Technology Platform:

      • Set to ‘True’ - If SAP user ID is used to authenticate in SAP Business Technology Platform.

      • Set to ‘False’ – If separate BTP user ID is used to authenticate in SAP Business Technology Platform. In this case, BTP user ID must be updated in MAIF mobile user record.

      The same changes apply to the Outbound Trigger SSAMNNNN_NTOFICATION_TRIGGER_BTPMS.

    2. Define RFC destination to connect to SAP Business Technology Platform Mobile Services mobile application push API:

      In standard configuration for SAP Service and Asset Manager, RFC destination SSAMNNNN_BTPMS_PUSH_NOTIF is the default destination used for connecting to SAP Business Technology Platform Mobile Services push API service.

      Use tcode SM59, define an RFC destination SSAMNNNN_BTPMS_PUSH_NOTIF, using the following settings. RFC destination is not a configuration setting. It must be defined in each SAP system and client manually, such as the Development, Test, and Production system:

      AttributeValue

      RFC Destination

      SSAMNNNN_BTPMS_PUSH_NOTIF

      Connection Type

      ‘G’ – HTTP Connection to External Server

      Target Host

      Use the <host_name> from URL of push API, identified in the previous section ‘SAP Business Technology Platform Mobile Services Push Configuration in Cloud Foundry Environment’

      Service No

      ‘443‘

      Path Prefix

      /<PUSH_SERVICE_IDENTIFIER>/ MOBILESERVICES/PUSH/V1/BACKEND/ APPLICATIONS/<APPLICATION_ID>/ NOTIFICATIONS/USERS

      <push_service_identifier> is from push API URL identified in previous section SAP Business Technology Platform Mobile Services Push Configuration in Cloud Foundry Environment.

      <application_id> is the SAP Business Technology Platform Mobile Services application id defined for SAP Service and Asset Manager, such as com.sap.samnnnn.oauth

      HTTP Proxy Options

      Define Proxy Host and Proxy Service, if it is relevant.

      Logon Procedure

      Use Basic Authentication, provide value user and password to connect to SAP Business Technology Platform.

      SSL

      Active

      SSL Certificate

      DEFAULT SSL Client (Standard)

    3. Define MAIF middleware server for SAP Service and Asset Manager:

      To send push notification from SAP back-end system to SAP Business Technology Platform Mobile Services with Cloud Foundry, information in addition to RFC destination is required. We use an MAIF middleware server to store the information.

      MAIF middleware server is master data for the SAP Service and Asset Manager mobile application. It must be maintained manually in each SAP system and client, such as Development, Test, and Production.

      Use tcode /SYCLO/ADMIN to run the MAIF Administration and Monitoring Portal. From menu AdministrationServer Management, define a MAIF middleware server using the following settings:

      Defining MAIF Middleware Server

      AttributeValue

      Mobile Application

      SAP_ASSET_MANAGER_nnnn

      Server Name

      BTP_MOBILE_SERVICES

      Middleware Svr SerNo

      BTP

      RFC Destination

      SSAMnnnn_BTPMS_PUSH_NOTIF

      Use RFC destination defined in step b)

      Additional Properties

      Property Group

      PUSH

      Property Name

      X-API-Key

      Property Value

      Value of API Key for Service Key alias SAPAssetManagerPushService from previous section SAP Business Technology Platform Mobile Services Push Configuration in Cloud Foundry Environment

    4. Check MAIF Mobile User with BTP user ID:

      If a separate user ID is required to authenticate for SAP Business Technology Platform, the user ID must be updated in MAIF mobile user record. The BTP user id must be included in the push notification sent from the SAP back-end system to SAP Business Technology Platform Mobile Services.

      Use tcode /SYCLO/ADMIN to run the MAIF Administration and Monitoring Portal. From menu AdministrationUser Management, search and find mobile users that can receive push notification in SAP Service and Asset Manager mobile application, in tab Client Registration Info, verify mobile user attribute CPms user ID’ has the correct BTP user ID info. This must be updated automatically when user performs initial sync. If information is missing, update it manually.

  2. Push Notification Configuration for SAP Business Technology Platform Mobile Services using Neo Environment.

    1. Define RFC destination to connect to SAP Business Technology Platform Mobile Services mobile application push API:

      In standard configuration for SAP Service and Asset Manager, RFC destination SSAMNNNN_BTPMS_PUSH_NOTIF is the default destination used for connecting to SAP Business Technology Platform Mobile Services push API service.

      If you want to use a different RFC destination name, you must also update attribute HTTP RFC Destination for Outbound Trigger configuration object SSAMNNNN_WORKORDER_TRIGGER_BTPMS and SSAMNNNN_NOTIFICATION_TRIGGER_BTPMS.

      Use tcode SM59, define an RFC destination SSAMNNNN_BTPMS_PUSH_NOTIF, using the following settings. RFC destination is not a configuration setting. It must be defined in each SAP system and client manually, such as Development, Test, and Production system.

      AttributeValue

      Connection Type

      ‘G’ – HTTP Connection to External Serv

      Target Host

      Use the <host_name> from URL of push API, identified in the previous section ‘SAP Business Technology Platform Mobile Services Push Configuration in Cloud Foundry Environment’

      Service No

      ‘443‘

      Path Prefix

      /restnotification/application/<application_id>/user

      <application_id> is the SAP Business Technology Platform Mobile Services application id defined for SAP Service and Asset Manager, such as com.sap.samnnnn.oauth

      HTTP Proxy Options

      Define Proxy Host and Proxy Service, if it is relevant.

      Logon Procedure

      Use Basic Authentication, provide value user and password to connect to SAP Business Technology Platform.

      SSL

      Active

      SSL Certificate

      DEFAULT SSL Client (Standard)

    2. Update Outbound Trigger Configuration:

      MAIF Outbound Trigger configuration objects SSAMnnnn_WORKORDER_TRIGGER_BTPMS and SSAMnnnn_NOTIFICATION_TRIGGER_BTPMS are defined for SAP Service and Asset Manager to send push notification to SAP Business Technology Platform Mobile Services. Configuration setting is updated to indicate Cloud Foundry environment is used with SAP Business Technology Platform Mobile Services.

      Use tcode /SYCLO/CONFIGPANEL to run the MAIF configuration tool. From ConfigPanel, select Outbound Trigger Configuration, update outbound trigger configuration using the following settings:

      Outbound Trigger Configuration

      AttributeValue

      Outbound Trigger Id

      SSAMNNNN_WORKORDER_TRIGGER_BTPMS

      HTTP RFC Destination

      SSAMNNNN_BTPMS_PUSH_NOTIF

      This must be the RFC destination defined in step a).

      Parameter CLOUD_FOUNDRY

      False

      Parameter BTPMS_WITH_SAP_USERID

      Depends on Identity Provider setup for SAP Business Technology Platform:

      Set to True if SAP user ID is used to authenticate in SAP Business Technology Platform.

      Set to False -f a separate BTP user ID is used to authenticate in SAP Business Technology Platform. In this case, BTP user ID must be updated in MAIF mobile user record.

      The same change applies to Outbound Trigger SSAMnnnn_NTOFICATION_TRIGGER_BTPMS.

    3. Check MAIF Mobile User with BTP user ID:

      If separate user ID is required to authenticate for SAP Business Technology Platform, the user ID must be updated in MAIF mobile user record. The BTP user ID must be included in the push notification sent from the SAP back-end system to SAP Business Technology Platform Mobile Services.

      Use tcode /SYCLO/ADMIN to run the MAIF Administration and Monitoring Portal. From menu AdministrationUser Management, search and find mobile users that can receive push notification in SAP Service and Asset Manager mobile application, in tab Client Registration Info, verify mobile user attribute CPms user ID’ has the correct BTP user ID info. This must be updated automatically when user performs initial sync. If information is missing, update it manually.

Log in to track your progress & complete quizzes