Show TOC

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

  1. Setting Up Consumer-Specific Configuration on SAP Gateway: — Logon to your SAP Gateway host and in transaction SM59 create an RFC destination of type G (HTTP Connection to External Server) pointing to your PC.

  2. Subscribing for sample user collection: — Provide a service user and password for the destination(s) To test subscriptions/notifications post an XMLHttpRequest to the SubscriptionCollection of your OData Channel application URL.

    Request
    POST /iwfnd/RMTSAMPLEFLIGHT/SubscriptionCollection HTTP/1.1
    Host: <host>:<port>
    accept: application/atom+xml
    content-type: application/atom+xml
    Content-Length: 634
    X-Requested-With: XMLHttpRequest
    
    <?xml version="1.0" encoding="utf-8"?>
    <atom:entry xmlns:atom="http://www.w3.org/2005/Atom">
    <atom:id/>
    <atom:title>Subscription for sample user</atom:title>
    <atom:author/>
    <atom:updated/>
    <atom:content type="application/xml">
    <m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" 
    xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
    <d:collection>FlightCollection</d:collection>
    <d:persistNotifications>false</d:persistNotifications>
    <d:filter></d:filter>
    <d:select>*</d:select>
    <d:changeType>created<d:changeType>
    </m:properties>
    </atom:content>
    </atom:entry> 

    The different parts of the source code are explained in the following sections.

    • <d:deliveryAddress>

      The delivery address must have one of the following formats:

      • urn:sap-com:channel:<RFC destination>:<request URI>

      • http(s)://<host>:<port>/...

      In both cases an RFC destination of type G (HTTP destination to external server) must exist on SAP Gateway either having a name n both cases an RFC destination of type "G" (HTTP destination to external server) must exist on SAP Gateway either with the name <RFC destination> or targeted to the <host>:<port>.

      The comparison is case-insensitive and it is performed for strings (that is, no DNS names resolution, and so on).

      For example, if you want to subscribe with delivery address http://endpoint.somewhere.com:8000/application/user-inbox there must be an RFC destination with target host endpoint.somewhere.com and target port 8000.

    • <d:filter> — The filter attribute must follow the OData $filter notation (see http://www.odata.org/developers/protocols/uri-conventions#FilterSystemQueryOptionInformation published on non-SAP site) and may combine any fields using the AND operation only. SAP Gateway does not evaluate any filter criteria.

    • <d:changeType> — The changeType attribute must be one of the following – “created”, “updated” “failed” or “deleted”. changeType property allows you to subscribe for notifications based on a particular operation performed in the SAP backend. For example, if you want to subscribe for notifications only when a create operation is done, then the changeType would be “created”. Users will have to develop application specific handling for sending notifications based on the subscribed changeType. Hence, for the above example given, the user is not notified when an update or a delete operation is performed on the object for the subscribed collection in the SAP backend.

Testing Notifications

Before you can test your notifications make sure that you have already created a subscription in the first place.

  1. Create a copy of report /IWBEP/R_MGW_PUSH_TEST.

  2. Set a value of your model group for variable LC_TECHNICAL_GROUP_NAME.

  3. Set a name of the collection you have created the subscription for in variable LC_FLIGHT_COLLECTION.

  4. Save and activate your report.

  5. Execute your report.

Back to Configurations in the SAP Backend System for Push Oriented Scenarios