Configuring Notifications

Objective

After completing this lesson, you will be able to configure notifications

Introducing Notifications

Figure offers an introduction to Notifications

Notifications in enterprise applications are an effective way to make users aware of situations that require their timely action or attention. Examples include workflow scenarios, such as the assignment of new purchase order approvals or invitations to join SAP Jam groups. Push notifications can be presented to the user in the launchpad.

SAP Fiori launchpad can consume notifications from the SAP Gateway Notification Channel, which is part of the SAP_GWFND software component. The SAP Gateway Notification Channel is a framework for applications to deliver notifications to end users through various channels. Notifications are disabled by default in the launchpad, and none of the notification-related UI elements are made visible to the user.

The notifications center can be enabled per user role in the SAP Fiori launchpad. Notifications are created by notification providers and can be based on SAP Workflow or the ABAP notification framework. They can offer quick actions and are able to start a suitable app showing details for the notification topic.

Figure offers an overview of the how-to guide

Besides SAP online documentation, there is a how-to guide, How to Setup Notifications in Fiori 2.0 Step-by-Step for 1809, by Wilson Wei, available at https://help.sap.com/docs/SUPPORT_CONTENT/fioritech/3362177584.html. The following is inspired by that guide.

When this material was created, the above how-to guide was only available for SAP S/4HANA release 1809 – however, most of the content is release-independent.

Configure Notifications – Hub Part

Figure gives you an overview of the Notifications in the Hub Part

In the following figures, you will learn which configuration steps on the hub are required to configure notifications.

Configuration Steps in the Hub System

The figure, Configuration Steps in the Hub System, shows the list of steps required to configure notifications. Each step is covered in more detail in the next figures.

Activate ICF Service for OData V4

Notifications are based on OData V4. To enable OData V4, make sure that the /sap/opu/odata4 ICF service is active (using transaction SICF).

Note

ICF service /sap/opu/odata4 is activated by task Activate HTTP Services for NW Gateway (SICF) of task list SAP_GW_FIORI_ERP_ONE_CLNT_SETUP.
Figures shows screenshots of two panes: SAP Gateway Service Publishing and SAP Gateway Service Administration

Service groups are published in transaction /IWFND/V4_ADMIN on the FES system. Publishing of service groups is a pure configuration task and does not create ABAP repository objects, hence does not entail artifacts with lifecycle for new services on the hub.

Only services of published service groups can be addressed by a consumer. During publishing, service groups can be retrieved from SAP back-end systems for which a system alias has been maintained in the routing configuration of the transaction /IWFND/V4_ADMIN. When a service group is published, the currently used system alias is automatically assigned to this service group.

For notifications, publish service group /IWNGW/NOTIFICATION with system alias LOCAL.

Note

Service group /IWNGW/NOTIFICATION is published by task Publish Service Groups Foundation (/IWFND/V4_ADMIN) of task list SAP_FIORI_FOUNDATION_S4.
Figure shows you an example of how to activate the ICF Service for Push Channels - in the screenshot from the system, you care choosing Activate Service

Notifications make use of the ABAP Push Channels (APC) framework. To enable the underlying APC WebSocket protocol, make sure that the /sap/bc/apc/iwngw/notification_push_apc ICF service is active (using transaction SICF).

Figure shows you how to ensure that the /sap/bc/apc/iwngw/notification_push_apc ICF service is active is active

To maintain push channels, launch transaction SPRO and navigate to ABAP PlatformNotification ChannelNotification Channel HubAdministrationPush Channel SettingsActivate and Maintain Push Channels. This Customizing activity allows you to manage push channels using published or unpublished registered channels, as well as activating published push channels.

For notifications, maintain and activate the SAP_WEBSOCKET push channel ID (using the F4 help).

You have two options for making notifications available in the SAP Fiori launchpad:

  • FLP configuration
  • Target mapping
Enable Notifications – Configuration using FLP Settings

To enable notifications using FLP configuration, the following settings are required:

  • NOTIFICATIONS = true
  • NOTIFICATIONS_UI = true

These settings can be performed on two configuration levels:

  • System-wide (cross-client) using transaction /UI2/FLP_SYS_CONF
  • Client-specific using transaction /UI2/FLP_CUS_CONF

As you can see in the figure, Enable Notifications – Configuration using FLP Settings, there are further settings regarding notifications available.

Alternatively, you can prepare a target mapping for the Shell-reconfigure intent:

Figure shows you how you can prepare a target mapping for the Shell-reconfigure intent

To enable push notifications in the launchpad, you need to configure the following parameters:

ParameterDescription
services/Notifications/config/enabled

Set this parameter to true to activate the Notification UShell service and enable the consumption of push notifications in the launchpad.

Default value: false

services/Notifications/config/serviceUrlSet this parameter to refer to the Notification OData service root URL (or base URL). This path is a combination of the hostname, the published Notification Channel service group, repository ID, service name, and the service version.
services/Notifications/config/pollingIntervalInSeconds

The Notification UShell service uses either a WebSocket connection or a polling mechanism to retrieve updates from the SAP Gateway Notification Channel. The WebSocket protocol is the preferred communication method. If the notification service cannot establish a WebSocket connection from the browser to the notification channel, then it will implement the fallback polling policy at an interval (in seconds) that is determined by this parameter.

Default value: 60 (seconds)

Hint

SAP provides a default catalog that contains the relevant target mapping for conveniently enabling notifications in SAP Fiori launchpad:/UI2/CONFIG_NOTIFICATION. By assigning this default catalog to user roles, you can quickly configure notifications for your launchpad users.

Configure Notifications – Provider Part

Figures shows an overview of notifications - the hub part

In the following figures, you will learn which configuration steps on the provider are required to configure notifications.

This figure shows the configuration steps in the Provider System

The figure, Configuration Steps in the Provider System, shows the list of steps required to configure notifications. Each step is covered in more detail in the following figures.

Figure shows you how to provide the Back-End Alias

The notification gateway on the Back-End Server (BES) must send its system alias (SAP origin) to the front-end server (FES) so that operations can be invoked from the FES system to the BES system, for example, Approving a Leave Request requires the FES to invoke the approval on the BES.

To provide the Back-End alias, launch transaction SPRO and navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementConfigurationConnection SettingsEnter the Backend System Alias (alternatively, enter transaction /IWNGW/BEP_SET_ALIAS).

Figure shows you how to provide the RFC Destination to FES

The notification gateway on the BES system needs to send notifications to the FES system. This is done using an RFC and as such an RFC destination needs to be configured.

To provide the RFC destination to the Frond-End Server, enter transaction SPRO and navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementConfigurationConnection SettingsEnter the Notification Hub RFC destination (alternatively, start transaction /IWNGW/BEP_SET_HUB_D).

Figure shows you how to create the bgRFC Destination

The RFC service uses outbound queues to reliably send information to a consumer. These outbound queues use Background Remote Function Call (bgRFC) technology.

To create the IWNGW_BGRFC RFC destination, enter transaction SPRO and navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementConfigurationConnection SettingsCreate bgRFC Destination (alternatively, enter transaction SM59).

Figure shows you how to register the bgRFC inbound destination

Notification channel uses outbound queues to reliably send information to a hub system. These outbound queues use bgRFC (Background Remote Function Call) technology.

To register the IWNGW_BEP_OUT_BGRFC bgRFC inbound destination, launch transaction SPRO and navigate toABAP PlatformNotification ChannelNotification Channel Provider EnablementConfigurationConnection SettingsRegister RFC Destination for Background Processing (alternatively, enter transaction SBGRFCCONF). Use Q as queue prefix.

Figure shows you how to register notification providers

You can register new notification providers that can be used as sources of notifications within the notification gateway.

To register notification providers, enter transaction SPRO and navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementAdministrationNotification Provider SettingsRegister Notification Providers (alternatively, enter transaction /IWNGW/BEP_NPREG).

Figure shows you how to activate Notification Providers

You have to manage notification providers using activating/deactivating registered notification providers.

To manage and activate notification providers, launch transaction SPRO and navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementAdministrationNotification Provider SettingsManage Notification Providers (alternatively, start transaction /IWNGW/VB_REG_P). Use the F4 key (that is, help) to choose from the available notification providers.

(Optional) Configure Notifications

Business Example

Note

In this exercise, whenever a value or an object title contains ##, replace ## with the number your trainer assigned to you.

Task 1: Optional: SAP Gateway OData V4

Steps

  1. In your SAP S/4HANA system, check if ICF service /sap/opu/odata4 for OData V4 is active. If it is inactive, activate it.

    1. Log on to your SAP system using the train-## user.

    2. Start transaction SICF.

    3. Choose Execute (F8).

    4. In the ICF services tree, navigate to /sap/opu/odata4.

      In the figure, you see the ICF services tree, where you navigate to /sap/opu/odata4

      Note

      ICF service /sap/opu/odata4 was activated by task Activate HTTP Services for NW Gateway (SICF) of task list SAP_GW_FIORI_ERP_ONE_CLNT_SETUP.
    5. Only if the ICF service is inactive (not black), perform the following steps:

      1. Right-click odata4.
      2. Choose Activate Service.
      3. In the popup, choose the left Yes button.
  2. In your SAP S/4HANA system, check if service group /IWNGW/NOTIFICATION is published. If it is not published, publish it.

    1. Continue working in your SAP system using the train-## user.

    2. Start transaction SPRO.

    3. Select SAP Reference IMG.

    4. Navigate to ABAP PlatformNotification ChannelNotification Channel HubConfigurationConnection SettingsPublish the Notification OData Service (alternatively, start transaction /IWFND/V4_ADMIN).

      Figure shows screenshot of the system to illustrate the sub-step

      Note

      Service group /IWNGW/NOTIFICATION was published by the task, Publish Service Groups Foundation (/IWFND/V4_ADMIN), of the task list, SAP_FIORI_FOUNDATION_S4.
    5. Only if service group /IWNGW/NOTIFICATION is not published, perform the following steps:

      1. In the system function bar, choose Publish Service Groups.
      2. In the System Alias field, choose LOCAL.
      3. Choose Get Service Groups.
      4. Select the /IWNGW/NOTIFICATION group and choose Publish Service Groups.
      5. In the popup, choose Continue.Screenshot highlights the Publish Service Groups option in the SAP Gateway Service Publishing pane
      6. If required, provide a Customizing request.Figure shows a Customizing request in the system

      Result

      The /IWNGW/NOTIFICATION OData V4 service group has been published.

Task 2: Push Channels

Steps

  1. In your SAP S/4HANA system, check if the /sap/bc/apc/iwngw/notification_push_apc ICF service is active. If it is inactive, activate it.

    1. Continue working in your SAP system using the train-## user.

    2. Enter transaction SICF.

    3. Choose Execute (F8).

    4. In the ICF services tree, navigate to /sap/bc/apc/iwngw/notification_push_apc.

      Figure shows you navigating to /sap/bc/apc/iwngw/notification_push_apc in the ICF services tree and choosing Activate Service
    5. Only if the ICF service is inactive (not black): right-click notification_push_apc and choose Activate Service. In the pop-up, choose the left Yes button.

  2. In your SAP S/4HANA system, maintain and activate the push channel SAP_WEBSOCKET.

    1. Continue working in your SAP system using the train-## user.

    2. Start transaction SPRO.

    3. Select SAP Reference IMG.

    4. Navigate to ABAP PlatformNotification ChannelNotification Channel HubAdministrationPush Channel SettingsActivate and Maintain Push Channels (alternatively, enter transaction /IWNGW/VNPUSHP).

    5. Choose New Entries.

    6. In the Push channel ID field, choose SAP_WEBSOCKET (using the F4 help). In the Push channel sequence number field, enter 10. Select the Is Active flag.

      Figure shows the New Entries: Overview of Added Entries pane in the system
    7. Choose Save.

    8. If required, provide a Customizing request.

Task 3: Optional: FLP Settings

Steps

  1. To the client-specific FLP configuration, add the following setting:

    NOTIFICATIONS_POLLING_INTERVAL = 30 (seconds)

    1. Continue working in your SAP system using the train-## user.

    2. Enter transaction /UI2/FLP_CUS_CONF.

    3. Choose New Entries.

    4. In the FLP Property ID field, select NOTIFICATIONS_POLLING_INTERVAL.

    5. In the Property Value field, enter 30.

      Figure shows a screenshot of the Property Value field, where you enter the value, 30
    6. Choose Save.

    7. If required, provide a Customizing request.

Task 4: SAP System Alias

Steps

  1. In your SAP S/4HANA system, enter LOCAL for the system alias.

    1. Continue working in your SAP system using the train-## user.

    2. Start transaction SPRO.

    3. Select SAP Reference IMG.

    4. Navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementConfigurationConnection SettingsEnter the Backend System Alias (alternatively, enter transaction /IWNGW/BEP_SET_ALIAS).

    5. As Backend SAP Origin (Alias), enter LOCAL.

      Figure shows screenshot of the Enter the SAP's Backend System Alias pane in the system
    6. Choose Execute (F8).

Task 5: RFC Communication

Steps

  1. In your SAP S/4HANA system, enter NONE as SAP Gateway Hub RFC destination.

    1. Continue working in your SAP system using the train-## user.

    2. Enter transaction SPRO.

    3. Select SAP Reference IMG.

    4. Navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementConfigurationConnection SettingsEnter the Notification Hub RFC destination (alternatively, start transaction /IWNGW/BEP_SET_HUB_D).

    5. As SAP Gateway Hub Dest. RFC, use the F4 help to select NONE.

      Figures show you the SAP Gateway Hub Dest. RFC, that is, using the F4 help to select NONE
    6. Choose Execute (F8).

Task 6: Notification Providers

Steps

  1. In your SAP S/4HANA system, check the registered notification providers. Verify that a provider with ID /IWNGW/DEMO is listed.

    Note

    Just open and note the list of registered notification providers – in the training environment, you do not have to change anything.
    1. Continue working in your SAP system using the train-## user.

    2. Start transaction SPRO.

    3. Select SAP Reference IMG.

    4. Navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementAdministrationNotification Provider SettingsRegister Notification Providers (alternatively, start transaction /IWNGW/BEP_NPREG).

    5. Just open and note the list of registered notification providers – among others, /IWNGW/DEMO should also be listed.

      Figures shows the list of registered notification providers – among others, /IWNGW/DEMO is listed
  2. In your SAP S/4HANA system, enter and activate notification provider /IWNGW/DEMO.

    1. Continue working in your SAP system using the train-## user.

    2. Enter transaction SPRO.

    3. Select SAP Reference IMG.

    4. Navigate to ABAP PlatformNotification ChannelNotification Channel Provider EnablementAdministrationNotification Provider SettingsManage Notification Providers (alternatively, start transaction /IWNGW/VB_REG_P).

    5. Only in case notification provider /IWNGW/DEMO is not listed, perform the following five steps.

    6. Choose New Entries.

    7. As Notification Provider ID, use the F4 help to choose /IWNGW/DEMO.

    8. Select the Is Active? flag.

      Figure shows a screenshot that shows the Is Active? flag selected
    9. Choose Save.

    10. If required, provide or create a customizing request.

Task 7: Test Notification

Steps

  1. In your SAP S/4HANA system, create a test notification of type Leave Request using transaction /IWNGW/BEP_DEMO. Make sure to use Provider ID/IWNGW/DEMO.

    1. Continue working in your SAP system using the train-## user.

    2. Enter transaction /IWNGW/BEP_DEMO.

    3. Ensure that the Provider ID is set to /IWNGW/DEMO.

      Figure shows that the Provider ID is set to /IWNGW/DEMO in the system
    4. Keep all other settings unchanged and choose Execute (F8).

Task 8: Notifications Center

Steps

  1. Launch the FLP in your SAP S/4HANA system and note the Notifications Center.

    1. Open the FLP in your SAP system, for example:

      • Enter transaction /UI2/FLP in your SAP system

      • Launch the FLP URL in a web browser or the SAP Business Client

    2. A new notification indicator is displayed. Choose the notifications icon in the upper-right area.

      Figure illustrates the sub-step regarding the display of notifications
    3. As this is a demo notification: feel free to Approve or Deny it.

Log in to track your progress & complete quizzes