With SAP Gateway, you have the provision to write a custom code to publish the notifications.
The default content publisher provided with SAP Gateway does not support OAuth for authentication. You can write your own publisher, which supports OAuth based authentication for your application.
To custom code the content publisher, proceed as follows:
In transaction SPRO open the SAP Reference IMG and navigate to: and click the Activity icon to implement the BAdI /IWFND/BD_MGW_NOTIF_SENDER.
Enter a value for the BAdI filter name DELIVERY_CHANNEL. This is a mandatory parameter. The table below shows example of delivery channel and the corresponding delivery address.
Delivery Address |
Operator |
DELVIERY_CHANNEL |
Description |
urn:sap-com:channel:TEASNDCHANNEL/inbox |
CS |
TEASNDCHANNEL |
The Channel Name TEASNDCHANNEL is the name of the RFC destination type "G" created in SM59 |
http://127.0.0.1:8080/inbox |
CS |
TEASNDCHANNEL |
The Channel Name TEASNDCHANNEL is the name of the RFC destination type "G" created in SM59 with Target host as 127.0.0.1/inbox and service as 8080 |
Implement the BAdI interface /IWFND/IF_MGW_NOTIF_SENDER method SEND. This method is passed with Outbound Notification of type /IWFND/IF_MGW_NOTIF_TYPES=>TY_S_OUTBOUND_NOTIFICATION. The field xml_entry_data in outbound notification contains the notification entity in JSON or ATOM+xml format.
Users can subscribe to a collection with delivery address. Here is the format of the delivery address:
urn:sap-com:channel:<Delivery Channel>/<request URI> — where <Delivery Channel> is the name given to the RFC destination type "G" created in ABAP application server using transaction SM59.
http://<host>:<port>/<request URI>
The delivery address is optional in case the notifications are to be pulled from the SAP Gateway system.
If no content publisher is defined for a DELIVERY_CHANNEL then default Point-Point publisher - /IWFND/CL_MGW_NOTIF_P2P_SENDER isl be used for publishing the notifications.
Administrators should maintain an RFC destination type G with the RFC name similar to the one specified in the BAdI filter DELIVERY_CHANNEL.
If the DELIVERY_CHANNEL is TEASNDCHANNEL, then while maintaining an RFC destination:
RFC Destination Name is TEASNDCHANNEL
Connection Type is G
For information on Maintaining RFC destinations, see the section, Manage RFC Destinations.