Target Audience:
Sometimes I read a blog only to realize later that the blog was not meant for me. So Let me clarify that this blog post will be most useful to you if you are in SAP, mostly in the Technical/Development domain.
Also if you deal in the Core SAP ABAP Development area like Report Programming, BDC, Call Transactions,BAPI’s etc and if you move into newer development technologies of SAP like SAPUI5, Fiori etc then you may find value in this blog.
Introduction to OData
If you are in SAP then you must have realized that in the recent days the term OData is getting a lot of attention.
During my normal project work I got introduced to this term in an ESS-MSS Project I was working on. That time all I heard was that OData is a protocol which SAP is adopting for its future web applications.
This made me wonder why is SAP adopting a new protocol for data access. I had already heard and worked on some web applications using the REST protocol. This made me curious and I started reading heavily on OData Protocol.
If you are curious enough like I was to learn about this protocol and what it is about I hope this post helps you.
What is OData:
When I first started working in SAP, I started with SAP-Scripts. Then SAP upgraded and a new thing called Smartforms was introduced. After some years I heard of ADOBE forms. And further on I started working on Interactive ADOBE Forms.
So being in SAP by now I had adapted myself to the thought that as technology improves new buzzwords will always keep coming up in SAP. Therefore when I first heard the term OData. I immediately assumed that this also must be a new development tool SAP has come up with. But later on someone said OData is not a new development tool but a data transfer technique.
Ok data-transfer hmm…. So this must be like ALE-IDOC then, another way to transfer data… Nice!!
But as I further started digging around, I learnt that Odata is not a development tool at all.
It is actually a PROTOCOL for data transfer and its not owned or developed by SAP. But it has existed way before SAP adopted it. It was actually created by Microsoft and has been used by it and many others for multiple applications.
Okay so now I was onto something solid here.
I finally understood that OData is an open protocol to allow the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way.
( Disclaimer : I have simply copied the above statement from the Odata official website– You thought I made it up myself — Ha ha — stop kiding yourself please. You can read more about it directly at this link http://www.odata.org )
But this definition was a bit heavy right now to understand and I needed to break it down further to make it clear. So let’s start from some basics.
— But before that let me quickly tell you that OData – stands for Open Data Protocol – and is a protocol that SAP is using to make SAP data accessible to world so that even developers who don’t understand SAP lingo can be able use this data and develop Web Applications, websites and Mobile Apps. Imagine you don’t know how SAP Sales order data looks or how the SD module works but still be able to develop a cool looking app to show Sales Order report on Android Phone for your customers —
— OK !! Now if you want to read more on how all this works — then proceed further .
( Note: If you are from a computer science background, this term may not be new to you, but for the rest of us.. hey we need some help :)- so please bear with us.)
What is a Protocol:
Before you can learn about OData protocol let’s understand what is the meaning of protocol. OK!!
The dictionary definition of protocol is
pro·to·col
— Boring definition as always — Now you might find this definition to be too formal to understand but the idea is simple.
A protocol is a set of rules by which official procedures are conducted.
Let me explain this in much simpler terms.
Let say you visit a hindu temple. The first thing you would do is you take off your footwear i.e your sandals or shoes. Then you climb the temple steps. Then you ring the temple bell and finally then you enter the temple door. This is a standard procedure to be followed by any devotee entering a temple. That means this is the accepted protocol to enter a temple.
Let me give another example : Let say you ordered a product online and you received a faulty product. What will you do ? You will call the customer support number.. correct? but if the customer support person does not cooperate with you what do you do? Obviously you will say .. “Please hand the phone over to your manager, I want to talk to the manager” Correct. ? You don’t pick the phone and simply ask to talk to the manager directly– No, you have to first sort out the issue with the customer support executive and then only proceed to the manager–otherwise–It is difficult to get the results you expect?
So in this example – The accepted protocol is that you call the customer desk, and if issue is not resolved go to higher authorities.
Ok — Understood Protocol means rules to follow to get your work done properly or reach the end result successfully — But what does this have to do with Computers + Data transfer + SAP ?
Yes I will get to that in a moment.. but for now as you know that we are talking about data transfer – lets consider a scenario of a phone conversation between two people.. because that is actually a form of data transfer .. you want to TRANSFER trash data from your mind into some one else’s mind and collect their mind data trash in return .. isn’t it?
Ok .. Lets think about a normal phone conversation. If I call you on your cell phone, what is the first thing that you would do when you get the call. Off course you would simply pick up the phone, click the accept button and then respond with a lovely HELLO… right!!
So this is an accepted rule of behavior for receiving a phone call. If instead of saying “HELLO” you start singing a Michael Jackson Thriller song .. then I will think I called a bathroom singer or some Rowdy Rathod and simply disconnect the call. Isn’t it?
So in human communication the GLOBALLY accepted rule is that when you receive a phone call, you first start with a HELLO or HOLA or HALLO or like my friend sometimes says NAMASHKAR !!
( Side Note: If you are planning to go to Germany read about their phone etiquettes http://blogs.transparent.com/german/german-phone-call-vocabulary/)
OK so we are clear on Human Communication Protocol, Very Nice!! Now What
Now lets advance our understanding to Computers and understand PROTOCOLS – Once we have Nailed this down thoroughly we will be in a much better position to understand exactly why we need OData.
We now know that in computer terminology protocol means rules for communication/data transfer.
So this means that one communicating Device – it could be any device, like a computer or a smart phone or tablet etc needs to obey/adhere to some GUIDING RULES-Some PROTOCOLS in order to properly send and receive data so that it can confirm what it is receiving is valid data and not just garbage. It needs to understand what is the start of the data transmission and what is its end. And it needs to be certain that it has received all the data that it was supposed to receive and that some data was not lost during transmission. After it is sure it has received the accurate and complete data — it should then know what it is supposed to do with that data. Is it supposed to keep the data with itself. Format it properly and show on the screen. How it is supposed to respond back to the data sender. etc.
All this is determined by the Protocol
A network protocol defines rules and conventions for communication between network devices. Meaning when you try to access a website – you type in the web address and the website server understands that your computer is requesting data from it ( in the form of a webpage ) and therefore the server sends an appropriate page data(resource) to your computer’s IP Address. Your computer grabs this data it receives and thus the webpage is shown to you.
For the sake of simplicity ( because I don’t understand too much of complexity — because I have not done any PHD on these topics and I don’t intend to and neither even I have any computer science degree — and I don’t want to trouble my brain a lot ) lets talk about the most widely known and used protocols in the internet world which are TCP/IP and HTTP protocols.
I am sure you have heard about these if you are in IT.
Now TCP/IP is a low level transport-layer protocol known as Transfer Control Protocol which is responsible to establish a connection between your computer and the host web server which is hosting the website.
However at a higher level – Application-layer -programming level this communication is further clarified via the HTTP protocol.
At a lower level, the networks use the TCP/IP protocol to send data which is based on packet switching techniques. But since this blog is addressed to Developers and not Network administrators – So I am going to talk aboutthe High level HTTP Protocol.
( Note: There are many other Protocols for other requirements like FTP to transfer flat files, VOIP to transfer Voice Data, STP etc and Higher level ones like SMTP, IMAP, POP3 etc used for e-mail communication )
At a higher level, the application uses HTTP protocol to interpret what signal and data it has received.
OK Understood what is HTTP ( at a high level at least ) — But brother where is OData you promised ?
Yes, yes — I know I said I will introduce you to OData — But man — before I introduce you to the Hero of the Movie — I need to build all this background story — about the villain, about the suffering of the people otherwise without a villain, without suffering — what is the use of HERO – haa 😛
In the next part of this blog I will introduce you to REST approach to leveraging HTTP and then introduce you to OData.
— If you liked this blog post .. or would like to suggest any corrections or additions to what I have mentioned in this blog.. please add your comments below.
Reference Resources used in this blog post
http://bitworking.org/news/201/RESTify-DayTrader
Roy Fielding’s dissertation about REST
http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
https://www.ibm.com/developerworks/library/ws-restful/
http://www.drdobbs.com/web-development/restful-web-services-a-tutorial/240169069?pgno=2
http://restcookbook.com/Miscellaneous/rest-and-http/
http://www.programmableweb.com/api/twitter
Images used in this blog post are from:
http://www.odata.org
http://www.cliparts.co
“Internet1” by Rock1997 – Own work. Licensed under GFDL via Commons.
Vamshi
Nice blog. Very informative. Thanks Linkin !
Linkin Pereira
Thanks for the feedback Vamshi
Rohan
I was reading you blog.. Could you please share another blog details
venkatesh
HI,
The way explaining is very nice, but Hero interdiction
then main story of the movie is missing.
like ODATA interdiction and how to use ODATA please give an explanation with example. If its there please share the link..
Thanking you..
Hüseyin
Nice blog keep going 🙂
Swati
You nailed it….such simple way to explain Odata amazing 🙂
Linkin Pereira
Thanks, for the feedback
Padmapriya
Very nice blog on ODATA..Simple and easy to understand …
Gokul
nice and simple. Late to find, but will be regular to follow up. Keep it up
Bhanu Malik
Sir where is Part2?
Saurabh Prakash
where is part 2 in which i hope to know what is odata.
Eshwar
Great Article!!! Appreciate your valuable time to educate and support people.
Manisha
Superb Article……so easy to understand for the people from non-cs background
liya
i loved it
ranjith
Excellent… loved it
Sankar
where is part 2?
Linkin Pereira
Looks like the links aren’t showing up .
Here is Part 2
http://www.beginners-sap.com/odata-rest-approach-to-http/
And Part 3
http://www.beginners-sap.com/what-is-odata-why-we-need-it/
Linkin Pereira
Thanks all for the feedback.
Swaroop
Hi Perira..
I liked the content and the way you simplified the content for better understanding.
I am expecting more content from you like this.
thanks a lot.
Sruthi
Way of explanation is nice and simple.Thanks Linkin….
Meenakshi
I really really liked your blog. It is such a detailed blog. I was reading about Odata from last two hours and then I found your blog. It is so simple. I understood it quickly. Thanks for putting in so much effort. I would really like to subscribe to all your other blogs. Please share a link so I can go through them. Superb work
sunil panigrahi
Very Nice blog..Keep posted ..:-)
jayashree
nice inroduction on odata
Jaya JS
Amazing blog..!! Excellent method of delivering the concepts in such a simpler way which helps even a non IT guy to understand clearly.. Please do write more blogs so that it will be highly beneficial to many.. Thank you..!!
Linkin Pereira
Thank you Jaya.. for the comment. I always try to keep things as simple as they can be.
Karthik T
Hi Linkin,
I guess you have good sense of humour.. I was enjoying your blog say your example on phone conversion scenario on Transfer data, Temple protocol, Villain come Hero introduction.. :).. Its Odata + humour blog.. Keep Posting!
Regards
Karthik Arasu
Venkat
Explained nicely and it’s very interesting to read and understand.
If possible, pls explain use of OData in SAP. Take a small example and give step wise how can we create OData and how exactly we can consume this OData.
Himansu
Very nice expalaination
Muthukumar
Amazing blog..!! Excellent method of delivering the concepts,Please do write more blogs so that it will be highly beneficial to many.. Thank you..!!
DIPAK
Very nice blog in easy lanaguage
Harry
Hi There.. nice blog.. few suggestion
(1) Always put date so readers know how old the blog is
(2) Update the link of 2nd or next blog in first so it is easy to navigate!!
Hope this helps!
Atul
Very nice and informative.. Thanks for your great effort
tulasi
nice explaination ..it helped me a lot
Kakoli Das
Excellent blog.. Explained the concepts in a simple way so that anybody can understand this.. Please write more about the new generation of SAP..
Shaily Chaudhary
Lovely blog. Thumbs Up!
Very basic explanation at the conceptual level.
Many thanks.
satish perumalla
very nice , You explained in simple and understandable way
sureshkumar.S
very nice, simple explanation. it helped me a lot.
pradheep
really very nice explanation from basic
ravi
nice blog ….
viky
oh thank god finally…..
i was totally messed wid all d stufz online…
ur blog is crystal clear thankzzz a ton man
siram
Hello sir ,
Thanks alot for a wonderful explanation…….Actually i was very new to this topic…..but u made it very clear……Hats off to u…
Sweta
Best and simplest blogs I have ever come across!! Keep It Up!!
Snehal
Excellent blog. Eagerly waiting for next blog. Please post it ASAP, wish to learn ODATA ASAP.
Angesh Kumar
Superb Sir, What a blog…
pauldharma
Very good clarification and Superb Sir. I am new for ODATA.. could you please share step by step tutorial for ODATA.
Balreddy
Hi Linkin,
Very informative about ODATA.
CAn you explain me the difference between ODATA and RESTful web services ?
Vivek Kumar
It is one of the best blog I have come across, the way you explain is very good for easy understanding, Thanks for such a nice post.
Can you please share me the rest part of the same tutorial or give me link for the rest part.
Rajaram
Wonderful blog
Jamunadharshini R
Really Very good Explanation….Beginners make use of it….Amazing..Keep going…
Niladri Singh
Nice blog. Appreciate the effort you put in and the examples u gave.
Lipi
you are an amazing presenter. your explanation was the best i have seen till now
Kishor
Hi linkin,
it was very useful information for beginners in OData. thanks for your article and i am waiting for your part 2.
Vini
Simple and very easy to understand for the beginners. Thanks.
Dharmesh Kumar
Very informative, simple and easy to understand. Keep up the good work !!!
ujwala
OH it’s toooo informative and well structured blog .thank you vary much sir….
Mohan
very much.. no chance … its cristal clear.. thanks.. how to continue REST and Odata from this blog
Prasanna
You are an amazing presenter. your explanation was the best i have seen till now
Maricel
This was very well done. You have made it so much easier to understand especially for someone from a not-so technical background. Thank you so much.
Saurabh Sahu
Really an awesome way to explain all the points. Kindly share the link for part 2 as well.
Dhiraj Bhatia
Very Nice Blog!!! Kindly send link for part 2
Iqbal
You are killing it Bro maybe you should write the BB3 Script! 🙂
Ramesh Bobbili
Amazing blog..!! Excellent method of delivering the concepts in such a simpler way which helps even a non IT guy to understand clearly.. Please do write more blogs so that it will be highly beneficial to many.. Thank you..!!
SHRUTIKA NARESH HADGAL
Excellent Explanation!!
Could you please share the other part of the link for Odata and REST blog.
Swati
Very nicely explained. Love to read more on this topic
Swati
where can i get to read next part of this blog
Indu
The way that u explained is simply awesome .. Keep posting blogs like this … Its very useful
ds
Hey, just loved your post, you made it so easy to understand.
Rohan Wankhade
Nice blog, just love it. The way you explain is really very easy to understand
Chris Budiman
Thank you for this nice blog. It makes the introduction of a complex subject becomes chewable.
Jigyasa Gupta
Very well explained, you made it so simple to understand 🙂