Show TOC

Configurations on the SAP Backend System for Push Oriented ScenariosLocate this document in the navigation structure



Make sure that the following prerequisites are fulfilled:

  • The software component SAP_GWFND is installed on your system.

  • Configured a supervisor destination for the bgRFC to receive the configuration settings for the bgRFC scheduler. For more information, see Configure the bgRFC Supervisor Destination.

  • An RFC destination from the SAP backend system to the SAP Gateway system has been created with transaction SM59. Provide a service user and a password for the destination.

    For more information, seeMaintaining Outbound bgRFC Queue from SAP Backend System to the Hub System .

  • Maintaining Inbound bgRFC Queue on the Hub System .


    This is optional and is required only if a reliable delivery of notifications to the consumer is expected.

  • An SAP system alias for the SAP Gateway system has been created in the backend system. For this an IMG activity is available in the system: In transaction SPRO open the SAP Reference IMG and navigate to Start of the navigation path SAP NetWeaver Next navigation step SAP Gateway Service Enablement Next navigation step  Backend OData Channel  Next navigation step Connection Settings to SAP Gateway Next navigation step SAP Gateway Settings End of the navigation path.

Defining the Metadata

  1. Create a class for metadata definition.

  2. Inherit from the SAP Gateway object/meta model super class /IWBEP/CL_MGW_PUSH_ABS_MODEL.

  3. Redefine method DEFINE() in your class to create your own implementation,

  4. Add SUPER->DEFINE( ) as first statement to your implementation to define the subscription data for your application.

  5. Implement metadata definition.

  6. Call method SET_SUBSCRIBABLE( ) for each entity type in your implementation for which you want subscription and notification to be enabled.


Class /IWBEP/CL_MGW_MED_SFLIGHT is delivered as an example implementation of a Subscription/Notification metadata definition.

Creating a Data Provider Class

  1. Create a class for data provisioning.

  2. Inherit from the SAP Gateway data provider super class /IWBEP/CL_MGW_PUSH_ABS_DATA.

  3. Redefine abstract method CHECK_SUBSCRIPTION_AUTHORITY in your class to implement your checks for subscription authorization.

  4. Redefine methods of interface /IWBEP/IF_MGW_APPL_SRV_RUNTIME in your class to process the operations of your application, for example creation or deletion of an entity.

  5. Implement the data provider.


Class /IWBEP/CL_MGW_RT_SFLIGHT is delivered as an example implementation of a subscription/notification data provider.

Sending Notifications from Backend to Consumer via SAP Gateway

  1. Call static method /IWBEP/CL_MGW_SUB_REGISTRY=>GET_SUBSCRIPTION_REGISTRY( ) to get the instance of the subscription registry.

  2. Call method QUERY_SUBSCRIPTIONS( ) of the subscription registry providing the model group name and the collection for the notifications of the current business application.

  3. Call static method /IWBEP/CL_MGW_NOTIF_PUBLISHER=>GET_NOTIFICATION_PUBLISHER() to get the instance of the notification publisher.

  4. Call method CREATE_NOTIFICATION_ENDPOINTS() of the publisher instance providing the data structure you want to send and the list of subscriptions returned by the registry.

  5. Call method SEND_NOTIFICATIONS() of the publisher for each notification endpoint.


In the system the ABAP report /IWBEP/R_MGW_PUSH_TEST is available to demonstrate the notification transmission.

Continue with Configurations on the SAP Gateway System for Push Oriented Scenarios