Skip to Content

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:

Sample RSS

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.

Create a service

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.

Future scenarios

To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

  1. DJ Adams
    Nice post. Glad to see some public evidence of SAP’s work with feeds.

    I’d be interested to see which direction you’re taking with regards to push vs pull.

    One major consideration for Atom (over RSS) – the Atom Publishing Protocol (APP), where individual entries are (pushable[*]) entities in their own right.

    [*] and attachable, too, for example in XMPP powered publish/subscribe!

    dj

    (0) 
  2. Sergio Ferrari
    Hi Manish,
    I’m happy to see RSS are being included into the standard SAP Business applications.
    I already implemented some custom scenarios to list Sales Orders to be approved, new created Material Master record.
    One important topic is related to the performance.
    Public feeds (e.g. newspaper) can be cached into the web server cache that in the case of the ABAP SAP Web AS it is the ICM cache that should be used within the SICF Handler (like in your case) or easly configurable in a BSP stateless application (like in the applications I developed).
      The typical scenarios requires indeed the user authorizations.
      In SAP ECC, for example, we expect private RSS (e.g. I should filter the list of new Sales Orders by the sales org. I’m associated with). This is an issue in terms of performance because it’s a bit difficult to take advantage of the ICM cache when the result XML of the RSS feed depends upon each user.

      For sure in a SAP ECC there are a lot of layers where RSS are interesting, for example:
    – change log (each time a modification occurs on a certain object type)
    – workflow events
    – condition records (messages)

      thanks again,
    Sergio

    (0) 
    1. Manish Garg Post author
      You make a good point with performance effects if we cannot cache the feeds (and we can’t cache the private feeds).  I would be interested to learn more about what you are doing and for which customers.

      thanks,
      Manish

      (0) 
  3. Prashanth Padmanabhan
    Girish B R, SAP Enterprise Learning development lead came up with this innovation in the business suite. The Enterprise Learning team is working to deliver this innovation to customers. Since this is possible for any Business Suite application, customers should demand this from the respective suite applications. Only customer demand can drive this innovation across all applications. Technology is not the hurdle. Use Cases are.
    (0) 
    1. William Gardella
      Once again nice work from Girish. I couldn’t agree more with your point about use cases being required to get this out the door. It’s not enough for those of us inside SAP to point out all the great things end users and developers can do with RSS / Atom feeds. Customers need to request it to help us justify working on it.
      (0) 
  4. Pradeep Kumar Warrier
    Hi
    In the context of RSS, would like to mention that Data Orchestration Engine (Netweaver Mobile 7.1+) allows data to delivered using RSS.
    Using distribution models in DOE, one can define what content to be delivered as well.


    pradeep

    (0) 
  5. Kiran Kumar
    Innovative! SAP needs to take such innovation seriously so that SAP tools stay on par with the rest of the Enterprise applications, which are also trying to catch up with Internet based applications.

    I would love to see feeds capability for an ERP system in the near future. Possibilities are endless.

    Great work!

    Kiran

    (0) 
  6. Matthew Delaney
    Great idea on implementing RSS feeds into SAP. I was wondering if you have made progress on standardizing the user authorization so that users get feeds which are specific to them. If so I would love to hear more about how it was done.
    Regards,
    Matt
    (0) 
  7. Luis Lara
    Hi,

    I’m following your code sample, but I’m having problems to pass any variable value to the XML document, my code is the following, how did you manage to pass variables to the RSS? My webservice is just passing constants.

      data: g_ixml         TYPE REF TO if_ixml,
            lr_xml_doc     type ref to if_ixml_document,
            lr_rss         type ref to IF_IXML_ELEMENT,
            lr_parent      type ref to IF_IXML_ELEMENT,
            lr_xml_element type ref to IF_IXML_ELEMENT,
            lr_item        type ref to IF_IXML_ELEMENT,
            ls_text        type string,
            ls_link        type string,
            lr_xml_string  type xstring,
            lv_delstr      type char50,
            lv_store       type char04,
            lv_ret         type i,
            lv_val         type i.

    * Endless Loop for Debuging.

    *  data: lv_sw.
    *    do.
    *      if lv_sw eq ‘X’.
    *        exit.
    *      endif.
    *    enddo.

    * Get the store number for the delivery.

      select single werks into lv_store from likp where vbeln eq delivery.

      concatenate ‘Delivery:’  delivery into lv_delstr separated by space.

    *– create the main factory
      g_ixml = cl_ixml=>create( ).

    * create the xml document

      lr_xml_doc = g_ixml->create_document( ).

    * 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 RSS Test’.
      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 ‘New for Store:’ lv_store into ls_text.
      lv_val = lr_xml_element->set_value( 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’ ).
      ls_text = lv_delstr.
      lv_val = lr_xml_element->set_value( 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 = ‘RSS From SAP’.
      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 ).

      CALL FUNCTION ‘SDIXML_DOM_TO_XML’
        EXPORTING
          DOCUMENT            = lr_xml_doc
    *     PRETTY_PRINT        = ‘ ‘
        IMPORTING
          XML_AS_STRING       = lr_xml_string
    *     SIZE                =
    *   TABLES
    *     XML_AS_TABLE        =
        EXCEPTIONS
          NO_DOCUMENT         = 1
          OTHERS              = 2
                .
      IF SY-SUBRC = 0.

    *   Putting the XML file in the Server for being displayed in the Web Browser

        server->response->set_data( lr_xml_string ).
        server->response->set_status( code = 200 reason = ‘OK’ ).

      ENDIF.

    Best Regards:

    Luis.

    (0) 

Leave a Reply