Skip to Content

The contents of this paper are not subject to any license agreement with SAP. The concept / code outlined below is not intended to be binding upon SAP to any course of business / product strategy and / or development. This is subject to change and may be changed by SAP at any point in time. SAP assumes no responsibility for errors or omissions in this document.

For people who have seen my previous posts and have followed upon to view the Twitter Integration Posts by Venky or viewed the Ecohub package, the next set of questions that they ask is:

  • How can I actually read twitter feeds from within my ABAP system?

I attempt to present a very simple way to achieve this. It is definitely not production quality in design or implementation, but does serve to showcase what can be done. The following steps below outline the process of getting data from twitter:

  1. Define the search URL
  2. Create an HTTP Client connection and authenticate
  3. Process the result of the call

1. Define the search URL

Let us take an example, say you want to search twitter for SAP. The relevant Twitter API (which can change) is: http://search.twitter.com/search.atom?q=SAP

This creates an ATOM Feed as a result. (You can directly test this in a browser).

Define URL

Define URL2

2. Create an HTTP Client connection (zcl_twitter_access=>call_url(…)  and authenticate

Create and Authenticate

3. Process the result of the call to get an XML

Process Result

So, now you have the data from twitter. What do you do with it? Use your imagination, there can be several applications that you can build from reading twitter feeds:

  • Show them
  • Analyze the tweets

 I could go on about the architecture of ICM and how this works internally from SAP BASIS if you like, but that is something that is a subject for another day…

To report this post you need to login first.

4 Comments

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

  1. Ritesh Mehta
    Hi Gautam,
    Nice blog. I have a basic query. The Proxy Host and port specified in the code, where do I find it them? Are they proxy specified in browser?
    Regards,
    Ritesh
    (0) 
    1. Gautam Dharamshi Post author
      Hi Ritesh,
      The Proxy host and port are the ones that are specific to your system landscape. They are the ones that your server relies on for access to the external landscape outside your company firewall.
      Thanks and Best Regards,
      Gautam
      (0) 

Leave a Reply