Blogs

Searching Twitter in ABAP
Gautam Dharamshi SAP Employee 
Business Card
Company: SAP
Posted on Dec. 15, 2009 02:47 AM in ABAP, CRM

Subscribe.Subscribe
Print. Print
Permalink Permalink
Share

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...

 

 

Gautam Dharamshi   is a Product Manager at SAP


Comment on this article
Comment on this weblog
Showing messages 1 through 4 of 4.

Titles Only Main Topics Oldest First

  • Nice blog
    2009-12-15 11:31:39 Ritesh Mehta Business Card [Reply]

    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
    • Nice blog
      2009-12-15 11:38:13 Gautam Dharamshi SAP Employee Business Card [Reply]

      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
  • It's great
    2009-12-15 04:25:54 ARTEM SHMAREV Business Card [Reply]

    My first mind about it: everyone can create report about mention of "@everyone " and check it from t-code :-)
    • Uses
      2009-12-15 09:52:25 Gautam Dharamshi SAP Employee Business Card [Reply]

      As a first cut, absolutely, the real power comes from integration into CRM Business Processes. Take a look at SAP's Ecohub offerings:
      Twitter Marketing Campaign
      https://www.sdn.sap.com/irj/ecohub/solutions/Twittermarketingcampaign
      Twitter Customer Service
      https://www.sdn.sap.com/irj/ecohub/solutions/Twittercustomerservice

Showing messages 1 through 4 of 4.