Show TOC

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

Use

Settings on SAP NetWeaver Gateway system include:

  • Subscribing for Storing Notifications in the SAP NetWeaver Gateway System

  • Pulling the Notification Stored in the SAP NetWeaver Gateway System

Go through the section OData for SAP Products below, before you could proceed with the SAP NetWeaver Gateway system settings.

OData for SAP Products - Standard Mode

The service NOTIFICATIONSTORE is generated under the following ICF node:

/sap/opu/odata/iwfnd/NOTIFICATIONSTORE - Services generated under the ICF node odata supports notification pull only on those services, which were configured under ICF node odata.

Prerequisites

Make sure that you have the service 'NOTIFICATIONSTORE' activated on your Gateway Hub system.

Subscribing for Storing Notifications in the SAP NetWeaver Gateway System

Standard Mode

Below is the service document URL:

http://<hostname>:<port>/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/SubscriptionCollectionInformation published on non-SAP site

Example

In this example, the user has subscribed to changes on FlightCollection. But the notifications reside in the SAP NetWeaver Gateway system and pulled by consumers when required.

Sample code for OData for SAP Products - Standard Mode

                                 Request
POST /iwfnd/RMTSAMPLEFLIGHT/SubscriptionCollection
HTTP/1.1Host: <host>:<port>
accept: application/atom+xmlcontent-type:
application/atom+xmlContent-Length: 634
X-Requested-With: XMLHttpRequest

<entry xml:base="http://<host>:<port>/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<id>http://<host>:<port>/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/SubscriptionCollection('005056A509B31ED2849EFB180361F2D6')</id>
<title type="text">My sub</title>
<updated>2012-10-08T03:25:45Z</updated>
<author>
<name>SAPUSER</name>
</author>
<category term="RMTSAMPLEFLIGHT.Subscription" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="SubscriptionCollection('005056A509B31ED2849EFB180361F2D6')" rel="edit" title="Subscription"/>
<content type="application/xml"/>
<m:properties>
<d:ID>1234</d:ID>
<d:deliveryAddress>HTTP://10.xx.xxx.000:xxxx/</d:deliveryAddress>
<d:persistNotifications>false</d:persistNotifications>
<d:collection>FlightCollection</d:collection>
<d:filter/>
<d:select/>
<d:changeType>created</d:changeType>
</m:properties>
</content>
</entry>

                              

Pulling the Notification Stored in the SAP NetWeaver Gateway System

To pull the notifications that are stored in SAP NetWeaver Gateway system perform a HTTP(s) GET on entity set NotificationCollection defined in service document NOTIFICATIONSTORE. The service document, NOTIFICATIONSTORE is enhanced to support few other functionalities, see, Pulling the Notifications Stored - Enhancements for more information.

Standard Mode

Below is the Service document URL:

http://<hostname>:<port>/sap/opu/odata/iwfnd/NOTIFICATIONSTORE/NotificationCollection?$format=xmlsap-client=<clientnumber>Information published on non-SAP site

Example

To retrieve all notifications that were created after 2011-10-03T10:00:00Z

Sample code for OData for SAP Products - Standard Mode

                                 Request
GET /IWFND/NOTIFICATIONSTORE/NotificationCollection?$filter=Updated eq datetime'2013-01-28T10:18:00' HTTP/1.1
Host: <host>:<port>
accept: application/atom+xml,application/xml

Response
HTTP/1.1 200 OK
Content-Length: 658
Last-Modified: Mon, 03 Oct 2010 21:10:15 GMT
Content-Type: application/xml;type=feed;charset=utf-8
Content-Encoding:gzip;
dataserviceversion:2.0;

<?xml version="1.0" encoding="utf-8" ?>
<feed xml:base="http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<id>http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/NotificationCollection?$filter=Updated eq datetime'2013-01-28T10:18:00'</id>
<title type="text">NotificationCollection</title>
<updated>2013-03-07T09:36:34Z</updated>
<author>
</name>
</author>
<link href="NotificationCollection" rel="self" title="NotificationCollection" /> 
<entry>
<id>http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/NotificationCollection('00163EA725801ED29AA67FC7B03355A6')</id> 
<title type="text">NotificationCollection('00163EA725801ED29AA67FC7B03355A6')</title>
<updated>2013-03-07T09:36:34Z</updated>
<category term="NOTIFICATIONSTORE.Notification" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link href="NotificationCollection('00163EA725801ED29AA67FC7B03355A6')" rel="self" title="Notification" />
<link href="http://<host>:<port>/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT;mo/FlightCollection(SAP__Origin='LOCAL',carrid='AA',connid='0017',fldate=datetime'2011-07-20T00%3A00%3A00')" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/via" type="application/atom+xml;type=entry" title="via" />
 <content type="application/xml">
 <m:properties>
<d:NotificationID>00163EA725801ED29AA67FC7B03355A6</d:NotificationID>
<d:Recipient>SAPUSER</d:Recipient>
<d:ChangeType>created</d:ChangeType>
<d:Title>CUD OF FLIGHT E</d:Title>
<d:SAPOrigin>LOCAL</d:SAPOrigin> 
<d:TechnicalServiceID>ZRMTSAMPLEFLIGHT_0001</d:TechnicalServiceID>
<d:Collection>FlightCollection</d:Collection>
<d:Updated>2013-01-28T10:18:00</d:Updated>
<d:ExternalServiceName>RMTSAMPLEFLIGHT</d:ExternalServiceName>
<d:EntriesOfInterest>0</d:EntriesOfInterest> 
</m:properties>
</content>
</entry>
<link rel="delta" href="NotificationCollection?$filter=Updated eq datetime'2013-01-28T10:18:00'&!deltatoken='20130307093634'" />
</feed> 
                              
Note

Only the logged in users notifications are retrieved.

Back to Configurations on the SAP Backend System for Pull Oriented Scenarios.