Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Introduction

Recently an internal team came up with a simple and straightforward way to expose enterprise data using RSS feeds. This is particularly interesting if:
1.    The Enterprise content is being updated frequently
2.    The user wants to see some of the enterprise data mashed up with (or alongside) data from other sources like the socially generated content on collaboration spaces.
There are several different scenarios in which SAP users have expressed interest and the scenarios are described towards the end of the document. Some of the SAP customers have expressed great interest in this approach because of the simplicity and the value.
We hope to solicit inputs from you about improving the approach and learn from work you might have already done with RSS and ABAP objects.

RSS

RSS – Really Simple Syndication is a web feed format to publish updated content on the server. RSS is a XML dialect and must conform to the XML 1.0 specifications. RSS feeds contain a channel and list of ‘items’ or individual pieces of content. A channel must have a title, short description and a link. See the RSS 2.0 specification for more details and other possible fields RSS feeds can contain. Generally RSS content is pushed from the server.

RSS schema
A sample RSS feed might look like this:

Reading RSS feeds
There are several RSS readers (clients for RSS feeds) available, including and iView in SAP portal, Outlook, Google reader, etc. A user can chose to use one of the many RSS readers they are already accustomed to. The reader will simply point to the URL from where the RSS feeds are available.


Creating RSS feeds from SAP WAS

Following steps are required to enable RSS feeds from SAP systems:
1.    The first step would be to create a callable functionality which returns an xml output adhering to RSS 2.0 schema. Then this functionality has to be made

available for consumption by the WAS.
a.    Go to Transaction SICF.
b.    Navigate to default_host -> sap -> bc. Create a new independent service under node bc. The service in the example is zrss_hotjobs
c.    Maintain your logon data by providing your user/ pass.
d.    Provide a handler class, here zcl_rss_utilities under the tab Handler List.




2.    Create a class to generate RSS output. The class should implement IF_HTTP_ EXTENSION. The HANDLE_REQUEST method of the interface should be

implemented to generate and output the RSS. Here are code snippets from a sample implementation:
* create root node
  lr_rss = lr_xml_doc->create_element( name = 'rss' ).
  lr_rss->set_attribute( name = 'version' value = '2.0' ).
  lr_xml_doc->append_child( new_child = lr_rss ).

* create channel
  lr_parent = lr_xml_doc->create_element( name = 'channel' ).
  lr_rss->append_child( new_child = lr_parent ).
  lr_xml_element = lr_xml_doc->create_element( name = 'title' ).
  ls_text = 'SAP ERecruiting'.
  lr_xml_element->set_value( ls_text ).
  lr_parent->append_child( new_child = lr_xml_element ).
……….

* In a loop create the items
lr_item = lr_xml_doc->create_element( name = 'item' ).
lr_parent->append_child( new_child = lr_item ).

 CLEAR ls_text.
 lr_xml_element = lr_xml_doc->create_element( name = 'title' ).
 CONCATENATE 'Job id:' ls_5122-objid INTO ls_text SEPARATED BY space .
 lr_xml_element->set_value( ls_text ).
 lr_item->append_child( new_child = lr_xml_element ).

 CLEAR ls_text.
 lr_xml_element = lr_xml_doc->create_element( name = 'description' ).
 CONCATENATE 'Job code:' ls_5122-external_code INTO ls_text SEPARATED BY space .
 lr_xml_element->set_value( ls_text ).
 lr_item->append_child( new_child = lr_xml_element ).

    CLEAR ls_text.
    lr_xml_element = lr_xml_doc->create_element( name = 'category' ).
    ls_text = 'SAP Jobs'.
    lr_xml_element->set_value( ls_text ).
    lr_item->append_child( new_child = lr_xml_element ).

    lr_xml_element = lr_xml_doc->create_element( name = 'link' ).
    ls_link = 'http://www.sdn.sap.com'.
    lr_xml_element->set_value( ls_link ).
    lr_item->append_child( new_child = lr_xml_element ).

What’s on the radar
1.    We are still working on standardizing the user authorization so that users get feeds which are specific to them. Currently users are encoded in the request URL,

but this approach is not completely secure. The problem can be resolved by using SSO authorization.
2.    There is coding required to expose the content from the backend. Even after abstracting the common functionalities, developers would still need to work with code.  We are investigating how to automate the approach so that RSS feeds can be enabled for backend systems with zero coding effort.
3.    Currently the server does not push the content. The request originates from the client and the server responds to the http request with a RSS feed. This is an enhancement in the functionality we plan to work on.
4.    One of the most important items is to also enable Atom feeds from the SAP backend. Atom feeds are similar to RSS but has more enhanced functionalities and
is becoming the standard.

Further possibilities

After some assessment, we realized there are several potential use cases where RSS feeds would enable users to get the content from SAP Backend. Some of them are
listed below and it would be great to know additional ones from you.

10 Comments