Skip to Content
Author's profile photo Tanya Sachan

Triggering Notification to SAP Fiori

Introduction

Notifications are a great way to make users aware of the situation that require timely action or attention. This could be an information of an event/action which just occurred or could be a workflow task which requires immediate attention. One of the most awaited features of Fiori 2.0 is the Notification center. This was initially introduced as part of S4HANA 1610 release.

This document explains how to enable the Notification Center, explains some general principles, and shows how to configure Workflow Notifications to appear in the Notification Center – SAP Business Workflow being the first Notification Provider released with S/4HANA 1610.

Assumptions:

  • We will assume that we are running S/4HANA 1610 with Fiori Frontend Server in Hub mode – which is the default recommendation for S/4HANA as explained in the SAP Enterprise Architecture Explorer > Landscape Deployment Options for Fiori Frontend Server > Landscape Scenario IV (FES and S/4HANA)
  • We will assume that Fiori My Inbox is already activated including any Task-Specific extensions. Note: We need this because when we click on a notification we want it to take us to the matching task in Fiori My Inbox

 

Notification Concepts:

There are only a few concepts to be understood when activating notifications. These are:

  • Notification Center – the area where notifications are shown in the Fiori Launchpad
  • Notification Hub – It collects notifications that are to be shown in the Notification Center
  • Notification Provider – It provides the content related to notification to the Notification Hub

 

To enable notifications, we need to:

  • Enabling the Notification Center in the Fiori Launchpad
  • Activation of the Notification Hub, i.e. the SAP Gateway Notification Channel
  • Activation of the notifications from a Notification Provider

 

 

Prerequisites for Notification Center

The Notification Center is part of the Fiori Launchpad in Fiori 2.0.

This means you must have Fiori Launchpad that supports Fiori 2.0, such as Fiori Frontend Server 3.0.   Note: Fiori Frontend Server 3.0 is required for S/4HANA 1610 and not available for S/4HANA 1511.

If you are using an on premise SAP Gateway, you must be on SAP Net Weaver version 7.51.

The SAP Gateway provides:

  • Fiori Launchpad
  • Notification Hub

You also need a Notification Provider. For example, the S/4HANA 1610 Core system acts as a Notification Provider, e.g. for SAP Business Workflow Notifications

Enabling the Notification Center in the Fiori Launchpad

The snippet that contains the parameters for Notifications looks like this.

“Notifications”: {

Fill the properties as

Enabled: true,

ServiceUrl:  <SERVICE_URL>

WebsocketUrl:  <WEBSOCKETURL>

}

Configuration for Notification Channel Hub

  1. The activities needs to be performed in transaction SPRO under SAP Customizing Implementation Guide-> SAP Net Weaver-> Notification Channel -> Notification Channel Hub.

In the IMG navigate to Configuration-> Connection Settings ->Manage SAP System Aliases and execute the activity.

If a LOCAL system alias with RFC destination set to NONE does not exist, then create a SAP system alias called LOCAL, and set RFC destination to NONE.

  1. Publish the Notification Channel OData service

In the IMG navigate to Configuration-> Connection Settings -> Publish the Notification OData Service and execute the activity.

If the Notification Channel service with ID /IWNGW/NOTIFICATION does not exist, publish it.

To publish the services, follow below steps:

  • SelectPublish Services
  • UnderSystem Alias enter LOCAL and choose Get Services
  • Select the/IWNGW/NOTIFICATION service and choose Publish Services

Notification Provider Interface

Interface /IWNGW/IF_NOTIF_PROVIDER (Standard class) is the notification provider interface and it must be implemented before creating any notifications. Each provider has their own IDs, which is used for all interactions with the Notification Channel.

Methods:

 

  1. GET_NOTIFICATION_TYPE

This method returns metadata related to the notification type. Notification provider supports more than one notification types and also there can be multiple versions of a single notification type. The version needs to be a whole number. In case it is alphanumeric, the latest version is determined using SORT tab statement.

 

This TYPE_KEY we have to pass in our program as well, so that it can check for the respective type_key and trigger the particular notification.

 

  1. GET_NOTIFICATION_TYPE_TEXT

This method should return language dependent text related to the notification type, including text templates (e.g. “PR{PR_Number} send to buyer {Buyer}) and action texts (e.g. “Approve”).

 

  1. GET_NOTIFICATION_PARAMETERS

This method should return notification instance specific parameters (e.g. Buyer, Pr_Number). These parameters are combined with text templates (text message) to form the text of a notification.

 

  1. HANDLE_ACTION

End users can trigger actions, as defined in GET_NOTIFICATION_TYPE. The notification provider must handle those actions using this callback method.

 

 

Note: Register and activate the provider class under transaction SPRO.

 

Goto SAP Implementation Guide ->SAP Web Application Server ->Notification Channel->Notification Channel Provider Enablement -> Administration ->Notification Provider Settings – >Register Notification Settings

 

Activating the Provider class:

Goto SAP Implementation Guide ->SAP Web Application Server ->Notification Channel->Notification Channel Provider Enablement -> Administration ->Notification Provider Settings – >Activate Notification Settings

 

 

Fiori Screen with Notifications:

 

On clicking on the notification counts, you may see the whole notification message which is grouped by three categories: BY DATE, BY TYPE AND BY PRORITY

 

Template sensitive – By Date Template public – By Type Template Grouped – By Priority

 

Clearing Metadata Cache and Deleting Notifications:

 

During the period of provider class development there might be the scenario to get rid of some notifications which have been already there from a long time. For example: if you are adding a new functionality to a notification provider class which haven’t been there before. Then the existing notification won’t reflect this change nor will it be reflected on newly created notification. The notification channel has a caching mechanism for those kind of metadata.

 

  1. Transaction /IWNGW/H_CLEAR_NOTIFallows you to delete certain notifications by specifying a user name and a “Less than” created-at-date option. And as an additional option you can also use the Wipe Allfunction, which will wipe all notifications for all user and all metadata.

 

  1. Go to SPRO->SAP implementation guide->SAP web application server->Notification channel Hub->Administration->General settings->Clean up metadata and cache

      

 

References:

  1. https://help.sap.com/viewer/68bf513362174d54b58cddec28794093/7.51.1/en-US/d1fd9dcaaece44ceaa71967e91d3a51b.html
  2. https://blogs.sap.com/2017/02/13/leading-s4hana-ux-notification-center-part-1-activation/
  3.  https://blogs.sap.com/2017/02/14/leading-s4hana-ux-notification-center-part-2-providing-notifications/

 

 

 

 

 

Assigned Tags

      16 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Oritra Banerjee
      Oritra Banerjee

      Very well written, clarifies the important aspects. Thank you.

      Author's profile photo Tushar Shinde
      Tushar Shinde

      Nice. Good old Extended Notifications is back....

      Thanks for sharing

       

      Br.

      Tushar

      Author's profile photo Víctor Abad García Sosa
      Víctor Abad García Sosa

      Very good post Tanya,

      I have a question.

      One of the biggest limitations of myInbox application is that SAPOffice mail tasks in WF are not supported.

      Has Notification Center include notifications from SAPOffice mail too?

       

      Author's profile photo Anusha Saxena
      Anusha Saxena

      Hi Victor,

       

      could you please share if you have received solution to your question ?

      Regards!

      Author's profile photo Harsh Bansal
      Harsh Bansal

      Hello,

      I have created a blog for this solution. You can check it here -

      https://blogs.sap.com/2020/06/05/how-to-display-background-send-mail-workflow-task-in-sap-fiori-my-inbox-and-notification-center/

      Regards,

      Harsh Bansal

      Author's profile photo Senthilkumar Thangavel Namasivayam
      Senthilkumar Thangavel Namasivayam

      Hi Tanya, Thanks for the great blog.

      I am wondering if there is no Launchpad.. if I use Portal instead, what will happen to the notifications?

      Will they redirected to MyInbox?

      Thanks

      Sam

       

      Author's profile photo Anusha Saxena
      Anusha Saxena

      Hi,

      I am trying this set up in non- S4 HANA system with backend SAP_GWFND release 750 SP-level 0013 and hub system with SAP_GWFND release 752 sp-level 001 and SAP_UI  release 752.

      However, I do not see notification button on the launchpad when I steps to activate that provided in document How to Setup Notifications in Fiori 2.0 Step-by-Step.

      https://wiki.scn.sap.com/wiki/display/SAPMOB/How+to+Setup+Notifications+in+Fiori+2.0+step-by-step

      I found note # 2729492 for this issue and it states that the backend release lower than SAP GWFND NW 7.51 SP00 and/or the SAP_UI and SAP GWFND releases are lower than 7.51 SP00 on the Notification Hub system.

      Could you please suggest if Backend is mandatory to have release more than 7.51 or is it okay to have the version in hub system more than 7.51?

       

      Thanks !

       

       

       

       

      Author's profile photo Andy Choi
      Andy Choi

      Do you have a fix now?

      Author's profile photo Anusha Saxena
      Anusha Saxena

      Yes! for Backend minimum version 7.51 is required. However, we are able to enable the notification button on launchpad since we have proper hub system version though, the notification is not allowed to set enable in backend due to version requirement in backend system for notification provider.

      Please let me know if there is any workaround for this. Thanks !

       

      Author's profile photo Andy Choi
      Andy Choi

      Fiori UX is installed on ECC 6.0 EHP8, and NW version 7.5.

      SAP didn't release 7.51 for ECC 6.0 EHP8 yet.

      Author's profile photo Anusha Saxena
      Anusha Saxena

      Oh! We have CRM Landscape.

      Author's profile photo Harsh Sinha
      Harsh Sinha

      Hi,

      we have a requirement to show BPM task Notifications in Fiori Notification area.

      Can you please help us out here with the steps/configuration for the same.

      Thanks,

      Harsh Sinha

      Author's profile photo Eliu Gonzalez
      Eliu Gonzalez

      Hi,

      Nice blog!, can you tell me if we have a central hub architecture which points do we have to execute on the front-end server and which ones on the back-end server

      best regards

      Author's profile photo Pradip Jaiswal
      Pradip Jaiswal

      Hi All,

      We have a gateway hub system with SAP_UI 752 SP06 and GWFND 7.52 SP04 and ECC backened system with SAP_UI 750 SP12 and GWFND 7.50 SP12,  will this be enough to configure the notification feature for our launchpad, will we need to create our own custom notification provider. Please let us know how we can proceed for the same. Thanks i advance.

      Author's profile photo Jens Schwendemann
      Jens Schwendemann

      Nope, GWFND 7.50 will not suffice. See https://launchpad.support.sap.com/#/notes/2729492

      Author's profile photo Peter Widmer
      Peter Widmer

      Nice blog! Do you have any idea, how we are able to get the originally provided navigation parameters in the HANDLE_ACTION method?

       

      Many thanks,

      Peter