SlideShare a Scribd company logo
1 of 47
GW100 SAP NetWeaver Gateway
Introduction to OData
May, 2012




                              INTE
                                  RNA
                                     L
Objectives



                          At the end of this chapter, you will understand:
                          Ÿ  The architecture of the Atom and OData protocols
                          Ÿ  How SAP NetWeaver Gateway makes use of OData
                          Ÿ  How to issue read-only OData requests from your browser




©  2012 SAP AG. All rights reserved.                                                    2
Agenda

u    Atom and OData – Building Towards a Business Interface
u    Gateway – OData for the Enterprise
u    Using Gateway – OData in Practice (Read Only)
         u    The QUERY operation – retrieving all or part of a collection
         u    The READ operation – retrieving a single entry from a collection
         u    Understanding the XML returned by the QUERY and READ operations
         u    Mapping OData properties to Atom elements




 ©  2012 SAP AG. All rights reserved.                                             3
Agenda

u    Atom and OData – Building Towards a Business Interface
u    Gateway – OData for the Enterprise
u    Using Gateway – OData in Practice (Read Only)
         u    The QUERY operation – retrieving all or part of a collection
         u    The READ operation – retrieving a single entry from a collection
         u    Understanding the XML returned by the QUERY and READ operations
         u    Mapping OData properties to Atom elements




 ©  2012 SAP AG. All rights reserved.                                             4
What is the Open Data Protocol (OData)?

OData is a Microsoft developed extension to the
Atom Publishing and Atom Syndication standards,
which in turn, are based on XML and HTTP(S).           SAP Annotations

It was designed to provide a standardised              OData
implementation of a RESTful API. In doing so, it
offers database-like access to server-side             Atom Publishing
resources. Hence, OData has been described as:
                                                       Atom Syndication
                            “ODBC for the Web”
It can be used freely without the need for a license   XML or JSON
or contract.
                                                       HTTP(S)
OData is also extensible. This allows SAP to
supplement the data types used by OData with
extra information from the ABAP Data Dictionary.


©  2012 SAP AG. All rights reserved.                                      5
What is Atom?


Atom is pair of standards
Atom Syndication Format                             SAP Annotations
-  An XML based description of the documents
    supplied by a website                           OData
-  These descriptions are typically consumed by
   content syndication websites                     Atom Publishing
-  In Atom terminology, a collection of documents
   is known as a “Feed”                             Atom Syndication
-  A Feed is compose of zero or more “Entries”
                                                    XML
Atom Publishing Format
-  An HTTP based protocol that allows the           HTTP
    manipulation of Atom Syndication documents

Atom Syndication and Atom Publishing are only partially RESTful protocols.

©  2012 SAP AG. All rights reserved.                                         6
What Does OData Add to Atom?

The Atom Publishing Format does not specify
how data should be encoded within a Feed;
                                                  SAP Annotations
therefore, it fails to be fully RESTful because
its messages are not self-describing.             OData
OData extends Atom by providing a metadata
description of the message.                       Atom Publishing
OData provides definitions for:
                                                  Atom Syndication
-  Simple Types
-    Complex Types                                XML
-    Associations between entries
-    Navigation Paths between entries             HTTP
-    Custom behaviour beyond the standard CRUD
     operations



©  2012 SAP AG. All rights reserved.                                 7
Output Formats Supported by OData

OData supports the use of either XML or JSON format messages.
{	
  "d":{	
  
	
  	
  "__count":”2",	
  
	
  	
  "results":[{	
  
	
  	
  	
  	
  "__metadata":{	
  
	
  	
  	
  	
  	
  	
  "uri":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('AA')",	
  
	
  	
  	
  	
  	
  	
  "type":"RMTSAMPLEFLIGHT.Carrier",	
  
	
  	
  	
  	
  	
  	
  "content_type":"text/html",	
  
	
  	
  	
  	
  	
  	
  "media_src":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('AA')/$value",	
  
	
  	
  	
  	
  	
  	
  "edit_media":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('AA')/$value"},	
  
	
  	
  	
  	
  "carrid":"AA",	
  
	
  	
  	
  	
  "CARRNAME":"American	
  Airlines",	
  
	
  	
  	
  	
  "CURRCODE":"USD",	
  
	
  	
  	
  	
  "URL":"http://www.aa.com",	
  
	
  	
  	
  	
  "mimeType":"text/html",	
  
	
  	
  	
  	
  "carrierFlights":{	
  
	
  	
  	
  	
  	
  	
  "__deferred":{	
  
	
  	
  	
  	
  	
  	
  	
  	
  "uri":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('AA')/carrierFlights"}}},	
  
	
  	
  	
  {"__metadata":{	
  
	
  	
  	
  	
  	
  	
  "uri":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('JL')",	
  
	
  	
  	
  	
  	
  	
  "type":"RMTSAMPLEFLIGHT.Carrier",	
  
	
  	
  	
  	
  	
  	
  "content_type":"text/html",	
  
	
  	
  	
  	
  	
  	
  "media_src":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('JL')/$value",	
  
	
  	
  	
  	
  	
  	
  "edit_media":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('JL')/$value"},	
  
	
  	
  	
  	
  "carrid":"JL",	
  
	
  	
  	
  	
  "CARRNAME":"Japan	
  Airlines",	
  
	
  	
  	
  	
  "CURRCODE":"JPY",	
  
	
  	
  	
  	
  "URL":"http://www.jal.co.jp","mimeType":"text/html",	
  
	
  	
  	
  	
  "carrierFlights":{	
  
	
  	
  	
  	
  	
  	
  "__deferred":{	
  
	
  	
  	
  	
  	
  	
  	
  	
  "uri":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('JL')/carrierFlights"}}}	
  
	
  	
  ],	
  
	
  	
  "__next":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection?$skiptoken=11"}	
  
}	
  




©  2012 SAP AG. All rights reserved.                                                                                                                           8
OData Service Documents – The Starting Point

An OData Service Document is a high level description of the server-side
resources that are available for manipulation. It is retrieved using a URL.
For example, issuing the URL http://odata.netflix.com returns:




©  2012 SAP AG. All rights reserved.                                          9
OData Service Documents – General Structure

                                                  The service tag defines a particular OData Service.
                       <service>	
  
                                                  This tag defines the starting point for service consumption.
                            1

                                                  The workspace tag contains a list of all server-side
                     <workspace>	
  
                                                  resources that are available for manipulation.

        1                                0..n

                                                            A collection tag identifies an
    <title>	
                          <collection>	
  
                                                            individual server-side resource.

                                            1


                                          <title>	
  


The <collection> tag will give you access to a server-side resource that can be
manipulated in some way. This could be a single table (hence “ODBC for the
Web”) or a set of business objects such as Sales Orders or Service Orders or
Customers etc.

©  2012 SAP AG. All rights reserved.                                                                             10
An Example of an OData Service Document – 1/2

<service	
  xml:base="http://odata.netflix.com/v2/Catalog/”	
  
	
  	
  	
  	
  xmlns:atom="http://www.w3.org/2005/Atom"	
  xmlns="http://www.w3.org/2007/app”>	
  
	
  	
  <workspace>	
  
	
  	
  	
  	
  <title>Default</title>	
  
	
  	
  	
  	
  <collection	
  href="Genres">	
  
	
  	
  	
  	
  	
  	
  <title>Genres</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  	
  	
  	
  <collection	
  href="Titles">	
  
	
  	
  	
  	
  	
  	
  <title>Titles</title>	
                                                       The service tag defines
	
  	
  	
  	
  </collection>	
  
	
  	
  	
  	
  <collection	
  href="TitleAudioFormats">	
                                            an OData Service.
	
  	
  	
  	
  	
  	
  <title>TitleAudioFormats</title>	
  
	
  	
  	
  	
  </collection>	
                                                                       The parameters define
	
  	
  	
  	
  <collection	
  href="TitleAwards">	
  
	
  	
  	
  	
  	
  	
  <title>TitleAwards</title>	
                                                  the base URL for the
	
  	
  	
  	
  </collection>	
                                                                       service and which
	
  	
  	
  	
  <collection	
  href="People">	
  
	
  	
  	
  	
  	
  	
  <title>People</title>	
                                                       namespaces will be used
	
  	
  	
  	
  </collection>	
  
	
  	
  	
  	
  <collection	
  href="TitleScreenFormats">	
  
                                                                                                      to define the content
	
  	
  	
  	
  	
  	
  <title>TitleScreenFormats</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  	
  	
  	
  <collection	
  href="Languages">	
  
	
  	
  	
  	
  	
  	
  <title>Languages</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  	
  </workspace>	
  
</service>	
  



 This example is taken from Netflix’s online catalogue available at
 http://odata.netflix.com/v2/Catalog/	
  

©  2012 SAP AG. All rights reserved.                                                                                        11
An Example of an OData Service Document – 2/2

<service	
  xml:base="http://odata.netflix.com/v2/Catalog/”	
  
	
  	
  	
  	
  xmlns:atom="http://www.w3.org/2005/Atom"	
  xmlns="http://www.w3.org/2007/app”>	
  
	
  	
  <workspace>	
  
	
  	
  	
  	
  <title>Default</title>	
  
	
  	
  	
  	
  <collection	
  href="Genres">	
  
	
  	
  	
  	
  	
  	
  <title>Genres</title>	
  
                                                  The collection tag defines the relative
	
  	
  	
  	
  </collection>	
                   URL and title of an individual collection
	
  	
  	
  	
  <collection	
  href="Titles">	
  
	
  	
  	
  	
  	
  	
  <title>Titles</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  	
  	
  	
  <collection	
  href="TitleAudioFormats">	
  
	
  	
  	
  	
  	
  	
  <title>TitleAudioFormats</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  	
  	
  	
  <collection	
  href="TitleAwards">	
              The workspace tag defines which collections
	
  	
  	
  	
  	
  	
  <title>TitleAwards</title>	
  
	
  	
  	
  	
  </collection>	
  
                                                                  are provided by this OData Service
	
  	
  	
  	
  <collection	
  href="People">	
  
	
  	
  	
  	
  	
  	
  <title>People</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  	
  	
  	
  <collection	
  href="TitleScreenFormats">	
  
	
  	
  	
  	
  	
  	
  <title>TitleScreenFormats</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  	
  	
  	
  <collection	
  href="Languages">	
  
	
  	
  	
  	
  	
  	
  <title>Languages</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  	
  </workspace>	
  
</service>	
  



 This example is taken from Netflix’s online catalogue available at
 http://odata.netflix.com/v2/Catalog/	
  

©  2012 SAP AG. All rights reserved.                                                                            12
Accessing an OData Collection – Construct the URL

Using the base URL defined in the service document’s <service> tag, we can
now construct the correct URL to access any collection listed in the workspace:

<service	
  xml:base="http://odata.netflix.com/v2/Catalog/”	
  
	
  	
  	
  	
  xmlns:atom="http://www.w3.org/2005/Atom"	
  xmlns="http://www.w3.org/2007/app”>	
  
	
  	
  <workspace>	
  
	
  	
  	
  	
  <title>Default</title>	
  
	
  	
  	
  	
  <collection	
  href="Genres">	
  
	
  	
  	
  	
  	
  	
  <title>Genres</title>	
  
	
  	
  	
  	
  </collection>	
  
	
  
	
  	
  	
  	
  ...	
  snip	
  ...	
  
	
  
	
  	
  </workspace>	
  
</service>	
  

 http://odata.netflix.com/v2/Catalog/Genres

When this URL is now issued, we will receive the contents of the “Genres”
collection.


©  2012 SAP AG. All rights reserved.                                                                  13
Accessing an OData Collection – A Structured Response

                                       In ABAP, this                                              Corresponds to a row
                                         data would                <feed>	
                        in an ABAP table
                                        be in a table


         1                              1                  1                      1               0..n


     <title>	
                         <id>	
           <updated>	
             <link>	
      <entry>	
  




          1                             1                  1                    1..n                1             0..1


      <title>	
                         <id>	
          <updated>	
             <link>	
     <category>	
        <content>	
  


                                                                                                                 1..n


                                                                                                               <properties>	
  
                                                                        Corresponds to a column
                                                                            in an ABAP table


©  2012 SAP AG. All rights reserved.                                                                                         14
Understanding OData XML – 1/4

<?xml	
  version="1.0"	
  encoding="iso-­‐8859-­‐1"	
  standalone="yes"?>	
  
<feed	
  xml:base="http://odata.netflix.com/v2/Catalog/"	
  
	
  	
  	
  	
  xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices”	
  
	
  	
  	
  	
  xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"	
  
	
  	
  	
  	
  xmlns="http://www.w3.org/2005/Atom">	
  
	
  	
  <title	
  type="text">Genres</title>	
  
	
  	
  <id>http://odata.netflix.com/v2/Catalog/Genres/</id>	
  
	
  	
  <updated>2011-­‐10-­‐17T15:25:10Z</updated>	
  
	
  	
  <link	
  rel="self"	
  title="Genres"	
  href="Genres"	
  />	
  
	
  	
  <entry>	
  
	
  	
  	
  	
  <id>http://odata.netflix.com/v2/Catalog/Genres('Action%20%26%20Adventure')</id>	
  
	
  	
  	
  	
  <title	
  type="text">Action	
  &amp;	
  Adventure</title>	
  
	
  	
  	
  	
  <updated>2011-­‐10-­‐17T15:25:10Z</updated>	
                                                     The <feed> element
	
  	
  	
  	
  <author>	
  
	
  	
  	
  	
  	
  	
  <name	
  />	
                                                                             defines a collection of
	
  	
  	
  	
  </author>	
  
	
  	
  	
  	
  <link	
  rel="edit"	
  title="Genre"	
  href="Genres('Action%20%26%20Adventure')"	
  />	
  
                                                                                                                  zero or more <entry>
	
  	
  	
  	
  <link	
  rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Titles”	
             elements
	
  	
  	
  	
  	
  	
  	
  	
  type="application/atom+xml;type=feed”	
  
	
  	
  	
  	
  	
  	
  	
  	
  title="Titles"	
  href="Genres('Action%20%26%20Adventure')/Titles"	
  />	
  
	
  	
  	
  	
  <category	
  term="Netflix.Catalog.v2.Genre”	
  
	
  	
  	
  	
  	
  	
  	
  	
  scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"	
  />	
  
	
  	
  	
  	
  <content	
  type="application/xml">	
  
	
  	
  	
  	
  	
  	
  <m:properties>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <d:Name>Action	
  &amp;	
  Adventure</d:Name>	
  
	
  	
  	
  	
  	
  	
  </m:properties>	
  
	
  	
  	
  	
  </content>	
  
	
  	
  </entry>	
  
</feed>	
  


  This example is taken from http://odata.netflix.com/v2/Catalog/Genres	
  

©  2012 SAP AG. All rights reserved.                                                                                                   15
Understanding OData XML – 2/4

<?xml	
  version="1.0"	
  encoding="iso-­‐8859-­‐1"	
  standalone="yes"?>	
  
<feed	
  xml:base="http://odata.netflix.com/v2/Catalog/"	
  
	
  	
  	
  	
  xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices”	
  
	
  	
  	
  	
  xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"	
  
	
  	
  	
  	
  xmlns="http://www.w3.org/2005/Atom">	
  
	
  	
  <title	
  type="text">Genres</title>	
  
	
  	
  <id>http://odata.netflix.com/v2/Catalog/Genres/</id>	
  
	
  	
  <updated>2011-­‐10-­‐17T15:25:10Z</updated>	
  
	
  	
  <link	
  rel="self"	
  title="Genres"	
  href="Genres"	
  />	
  
	
  	
  <entry>	
  
	
  	
  	
  	
  <id>http://odata.netflix.com/v2/Catalog/Genres('Action%20%26%20Adventure')</id>	
  
	
  	
  	
  	
  <title	
  type="text">Action	
  &amp;	
  Adventure</title>	
  
	
  	
  	
  	
  <updated>2011-­‐10-­‐17T15:25:10Z</updated>	
  
	
  	
  	
  	
  <author>	
  
	
  	
  	
  	
  	
  	
  <name	
  />	
  
	
  	
  	
  	
  </author>	
  
	
  	
  	
  	
  <link	
  rel="edit"	
  title="Genre"	
  href="Genres('Action%20%26%20Adventure')"	
  />	
         The <entry> element
	
  	
  	
  	
  <link	
  rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Titles”	
  
	
  	
  	
  	
  	
  	
  	
  	
  type="application/atom+xml;type=feed”	
  
                                                                                                                  contains the data for one
	
  	
  	
  	
  	
  	
  	
  	
  title="Titles"	
  href="Genres('Action%20%26%20Adventure')/Titles"	
  />	
        member of the feed’s
	
  	
  	
  	
  <category	
  term="Netflix.Catalog.v2.Genre”	
  
	
  	
  	
  	
  	
  	
  	
  	
  scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"	
  />	
     collection
	
  	
  	
  	
  <content	
  type="application/xml">	
  
	
  	
  	
  	
  	
  	
  <m:properties>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <d:Name>Action	
  &amp;	
  Adventure</d:Name>	
  
	
  	
  	
  	
  	
  	
  </m:properties>	
  
	
  	
  	
  	
  </content>	
  
	
  	
  </entry>	
  
</feed>	
  


  This example is taken from http://odata.netflix.com/v2/Catalog/Genres	
  

©  2012 SAP AG. All rights reserved.                                                                                                   16
Understanding OData XML – 3/4

<?xml	
  version="1.0"	
  encoding="iso-­‐8859-­‐1"	
  standalone="yes"?>	
  
<feed	
  xml:base="http://odata.netflix.com/v2/Catalog/"	
  
	
  	
  	
  	
  xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices”	
  
	
  	
  	
  	
  xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"	
  
	
  	
  	
  	
  xmlns="http://www.w3.org/2005/Atom">	
  
	
  	
  <title	
  type="text">Genres</title>	
  
	
  	
  <id>http://odata.netflix.com/v2/Catalog/Genres/</id>	
  
	
  	
  <updated>2011-­‐10-­‐17T15:25:10Z</updated>	
  
	
  	
  <link	
  rel="self"	
  title="Genres"	
  href="Genres"	
  />	
  
	
  	
  <entry>	
  
	
  	
  	
  	
  <id>http://odata.netflix.com/v2/Catalog/Genres('Action%20%26%20Adventure')</id>	
  
	
  	
  	
  	
  <title	
  type="text">Action	
  &amp;	
  Adventure</title>	
  
	
  	
  	
  	
  <updated>2011-­‐10-­‐17T15:25:10Z</updated>	
  
	
  	
  	
  	
  <author>	
  
	
  	
  	
  	
  	
  	
  <name	
  />	
  
	
  	
  	
  	
  </author>	
  
	
  	
  	
  	
  <link	
  rel="edit"	
  title="Genre"	
  href="Genres('Action%20%26%20Adventure')"	
  />	
  
	
  	
  	
  	
  <link	
  rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Titles”	
  
	
  	
  	
  	
  	
  	
  	
  	
  type="application/atom+xml;type=feed”	
  
	
  	
  	
  	
  	
  	
  	
  	
  title="Titles"	
  href="Genres('Action%20%26%20Adventure')/Titles"	
  />	
  
	
  	
  	
  	
  <category	
  term="Netflix.Catalog.v2.Genre”	
  
	
  	
  	
  	
  	
  	
  	
  	
  scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"	
  />	
  
	
  	
  	
  	
  <content	
  type="application/xml">	
  
	
  	
  	
  	
  	
  	
  <m:properties>	
  
                                                                      The <content> element contains
	
  	
  	
  	
  	
  	
  	
  	
  <d:Name>Action	
  &amp;	
  Adventure</d:Name>	
  
	
  	
  	
  	
  	
  	
  </m:properties>	
                             the actual business data
	
  	
  	
  	
  </content>	
  
	
  	
  </entry>	
  
</feed>	
  


  This example is taken from http://odata.netflix.com/v2/Catalog/Genres	
  

©  2012 SAP AG. All rights reserved.                                                                              17
Understanding OData XML – 4/4

<?xml	
  version="1.0"	
  encoding="iso-­‐8859-­‐1"	
  standalone="yes"?>	
  
<feed	
  xml:base="http://odata.netflix.com/v2/Catalog/"	
  
	
  	
  	
  	
  xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices”	
  
	
  	
  	
  	
  xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"	
  
	
  	
  	
  	
  xmlns="http://www.w3.org/2005/Atom">	
  
	
  	
  <title	
  type="text">Genres</title>	
  
	
  	
  <id>http://odata.netflix.com/v2/Catalog/Genres/</id>	
  
	
  	
  <updated>2011-­‐10-­‐17T15:25:10Z</updated>	
  
	
  	
  <link	
  rel="self"	
  title="Genres"	
  href="Genres"	
  />	
  
	
  	
  <entry>	
  
	
  	
  	
  	
  <id>http://odata.netflix.com/v2/Catalog/Genres('Action%20%26%20Adventure')</id>	
  
	
  	
  	
  	
  <title	
  type="text">Action	
  &amp;	
  Adventure</title>	
  
	
  	
  	
  	
  <updated>2011-­‐10-­‐17T15:25:10Z</updated>	
  
	
  	
  	
  	
  <author>	
  
	
  	
  	
  	
  	
  	
  <name	
  />	
  
	
  	
  	
  	
  </author>	
  
	
  	
  	
  	
  <link	
  rel="edit"	
  title="Genre"	
  href="Genres('Action%20%26%20Adventure')"	
  />	
  
	
  	
  	
  	
  <link	
  rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Titles”	
             The <link> elements point
	
  	
  	
  	
  	
  	
  	
  	
  type="application/atom+xml;type=feed”	
  
	
  	
  	
  	
  	
  	
  	
  	
  title="Titles"	
  href="Genres('Action%20%26%20Adventure')/Titles"	
  />	
        to related business data
	
  	
  	
  	
  <category	
  term="Netflix.Catalog.v2.Genre”	
  
	
  	
  	
  	
  	
  	
  	
  	
  scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"	
  />	
  
	
  	
  	
  	
  <content	
  type="application/xml">	
  
	
  	
  	
  	
  	
  	
  <m:properties>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <d:Name>Action	
  &amp;	
  Adventure</d:Name>	
  
	
  	
  	
  	
  	
  	
  </m:properties>	
  
	
  	
  	
  	
  </content>	
  
	
  	
  </entry>	
  
</feed>	
  


  This example is taken from http://odata.netflix.com/v2/Catalog/Genres	
  

©  2012 SAP AG. All rights reserved.                                                                                                    18
Agenda

u    Atom and OData – Building Towards a Business Interface
u    Gateway – OData for the Enterprise
u    Using Gateway – OData in Practice (Read Only)
         u    The QUERY operation – retrieving all or part of a collection
         u    The READ operation – retrieving a single entry from a collection
         u    Understanding the XML returned by the QUERY and READ operations
         u    Mapping OData properties to Atom elements




 ©  2012 SAP AG. All rights reserved.                                             19
Obtaining OData Metadata

In order to consume an OData service, you should retrieve the metadata that
describes that service. This is done by adding the suffix $metadata to the Service
Document URL. (OData metadata is only available in XML format, not JSON)
E.G. http://odata.netflix.com/v2/Catalog/$metadata
This will now return an Entity Data Model (edmx) XML description of the service:
(There is currently no standard for representing EDMs in JSON; therefore, the metadata description of an OData service is only
available in XML format)

<edmx:Edmx	
  Version="1.0">	
  
	
  	
  <edmx:DataServices	
  m:DataServiceVersion="1.0">	
  
	
  	
  	
  	
  <Schema	
  Namespace="Netflix.Catalog.v2">	
  
	
  	
  	
  	
  	
  	
  <EntityType	
  Name="Genre">	
  
	
  	
  	
  	
  	
  	
  	
  	
  <Key>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <PropertyRef	
  Name="Name"/>	
  
	
  	
  	
  	
  	
  	
  	
  	
  </Key>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <Property	
  Name="Name"	
  Type="Edm.String"	
  Nullable="false"	
  MaxLength="128"	
  Unicode="true”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  FixedLength="false"	
  m:FC_TargetPath="SyndicationTitle"	
  m:FC_ContentKind="text"	
  m:FC_KeepInContent="True"/>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <NavigationProperty	
  Name="Titles"	
  Relationship="Netflix.Catalog.v2.Genre_Titles”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  FromRole="Genre_Titles_Source"	
  ToRole="Genre_Titles_Target"/>	
  
	
  	
  	
  	
  	
  	
  </EntityType>	
  
	
  	
  	
  	
  	
  	
  <EntityType	
  Name="Title"	
  m:HasStream="true">	
  
	
  	
  	
  	
  	
  	
  	
  	
  <Key>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <PropertyRef	
  Name="Id"/>	
  
	
  	
  	
  	
  	
  	
  	
  	
  </Key>	
  
	
  
...	
  snip	
  ...	
  



 ©  2012 SAP AG. All rights reserved.                                                                                                                                20
SAP Extensions To OData Metadata

The standard OData metadata is not able to fully describe all the information held
in the ABAP Data Dictionary; therefore, the Gateway server will send extra
metadata values identified by the sap: namespace prefix.
<EntityType	
  Name="Booking"	
  sap:content-­‐version="1">	
  
	
  	
  <Key>	
  
	
  	
  	
  	
  <PropertyRef	
  Name="AirlineId"/>	
  
	
  	
  	
  	
  <PropertyRef	
  Name="ConnectionNo"/>	
  
	
  	
  	
  	
  <PropertyRef	
  Name="FlightDate"/>	
  
	
  	
  	
  	
  <PropertyRef	
  Name="BookingId"/>	
  
	
  	
  </Key>	
  
	
  	
  <Property	
  Name="AirlineId”	
  	
  	
  	
  Type="Edm.String”	
  	
  	
  Nullable="false"	
  MaxLength="3”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Airline"	
  sap:filterable="false"/>	
  
	
  	
  <Property	
  Name="ConnectionNo"	
  Type="Edm.String"	
  	
  	
  Nullable="false"	
  MaxLength="4”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Flight	
  Number"	
  sap:filterable="false"/>	
  
	
  	
  <Property	
  Name="FlightDate"	
  	
  	
  Type="Edm.DateTime"	
  Nullable="false"	
  Precision="10”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Date"	
  sap:filterable="false"/>	
  
	
  	
  <Property	
  Name="BookingId"	
  	
  	
  	
  Type="Edm.String"	
  	
  	
  Nullable="false"	
  MaxLength="8”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Booking	
  number"	
  sap:filterable="false"/>	
  
	
  	
  <Property	
  Name="CustomerNo"	
  	
  	
  Type="Edm.String”	
  	
  	
  MaxLength="8”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Customer	
  Number"	
  sap:filterable="false"/>	
  
	
  	
  <Property	
  Name="CustomerName”	
  Type="Edm.String"	
  	
  	
  MaxLength="25”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Passenger	
  Name"	
  sap:filterable="false"	
  m:FC_TargetPath="SyndicationAuthorName”	
  />	
  
	
  	
  <Property	
  Name="Price"	
  	
  	
  	
  	
  	
  	
  	
  Type="Edm.Decimal"	
  	
  Precision="20"	
  Scale="2”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Airfare"	
  sap:filterable="false"/>	
  
	
  	
  <Property	
  Name="CurrencyCode"	
  Type="Edm.String"	
  	
  	
  MaxLength="5”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Airline	
  Currency"	
  sap:filterable="false"	
  sap:semantics="currency-­‐code"/>	
  
	
  	
  <Property	
  Name="BookingDate”	
  	
  Type="Edm.DateTime"	
  Precision="10”	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sap:label="Booking	
  date"	
  sap:filterable="false”/>	
  
	
  
...	
  snip	
  ...	
  


©  2012 SAP AG. All rights reserved.                                                                                                                           21
Agenda

u    Atom and OData – Building Towards a Business Interface
u    Gateway – OData for the Enterprise
u    Using Gateway – OData in Practice (Read Only)
         u    The QUERY operation – retrieving all or part of a collection
         u    The READ operation – retrieving a single entry from a collection
         u    Understanding the XML returned by the QUERY and READ operations
         u    Mapping OData properties to Atom elements




 ©  2012 SAP AG. All rights reserved.                                             22
Agenda

u    Atom and OData – Building Towards a Business Interface
u    Gateway – OData for the Enterprise
u    Using Gateway – OData in Practice (Read Only)
         u    The QUERY operation – retrieving all or part of a collection
         u    The READ operation – retrieving a single entry from a collection
         u    Understanding the XML returned by the QUERY and READ operations
         u    Mapping OData properties to Atom elements




 ©  2012 SAP AG. All rights reserved.                                             23
Entity Data Model – Overview

In the following examples and exercises, we will be using the data model shown
below:




More information will be given about the details of this data model in later chapters.

©  2012 SAP AG. All rights reserved.                                                     24
Retrieving a Collection – ReadEntitySet Operation 1/3

To start with, we will cover the simplest two operations that can be performed using
OData: ReadEntitySet and ReadEntity (also referred to as QUERY and READ).
ReadEntitySet (QUERY)                      : Returns 0..n entries from a collection
ReadEntity (READ)                          : Returns 0..1 entries from a collection
Both operations are read-only and therefore use the HTTP GET method.



                                REST Operation                     HTTP Method
                                Create a resource                  POST
                                Retrieve one or more resources     GET
                                Update a resource                  PUT
                                Delete a resource                  DELETE




©  2012 SAP AG. All rights reserved.                                                  25
Retrieving a Collection – ReadEntitySet Operation 2/3

To start running a Gateway Service, you must know the service’s base URL. This
value is generated when the Gateway Service is first created.
The URL for an entire collection is formed by taking the URL found in the Gateway
Service’s xml:base parameter and appending to it the value of the href parameter
for the required collection.

<app:service	
  xml:base="http://mysapgateway.com/sap/opu/odata/sap/FlightInformation/">	
  
	
  
together with
	
  
<app:collection	
  href="Airports"	
  sap:content-­‐version="1">	
  


Gives http://mysapgateway.com/sap/opu/odata/sap/FlightInformation/Airports	
  

Since we need to use the HTTP GET method, this URL can be issued directly from
the browser’s address line.	
  



©  2012 SAP AG. All rights reserved.                                                      26
Retrieving a Collection – ReadEntitySet Operation 3/3

Issuing this URL from the browser’s address line will cause the Gateway server to
return an OData XML message containing the requested collection.




©  2012 SAP AG. All rights reserved.                                                27
Retrieving a Partial Collection – Filtering

If a collection has a high number of entries, then you can filter the <feed> contents
by using the $filter query string parameter:

Assuming a base URL of http://mysapgateway.com/sap/opu/odata/sap/FlightInformation/	
  
	
  
Then appending Airports?$filter=IATACode	
  eq	
  'FRA' will filter out all airports
except Frankfurt.
	
  
IMPORTANT!
1.  You must implement the ABAP coding that responds to this parameter
2.  A space character (or %20) must be included on either side of the operator in
    the $filter condition.
3.  If the property value being filtered is non-numeric, then it must be enclosed
    within single quotes.


For more information on $filter, see:
http://www.odata.org/developers/protocols/uri-­‐conventions#FilterSystemQueryOptions	
  
Please note, SAP NetWeaver Gateway does not support all $filter options

  ©  2012 SAP AG. All rights reserved.                                                     28
Retrieving a Partial Collection – Paging

If a collection has a high number of entries, then you can use the $top and $skip
parameters together to implement paging.

Individually, Airports?$top=5 would reduce the <feed> down to the first 5 entries.

And Airports?$skip=5 would omit the first 5 entries from the <feed>.	
  

Paging is achieved by setting $top to the number of entries per page, and then
incrementing $skip by this number every time the next page is required.

Assuming 10 entries per page, then to:
    View the first page   : Airports?$top=10	
  
    View the second page : Airports?$skip=10&$top=10	
  
    View the third page   : Airports?$skip=20&$top=10	
  
etc.

For more information on $top, and $skip, see:
http://www.odata.org/developers/protocols/uri-­‐conventions#TopSystemQueryOption and
following.


©  2012 SAP AG. All rights reserved.                                                   29
Agenda

u    Atom and OData – Building Towards a Business Interface
u    Gateway – OData for the Enterprise
u    Using Gateway – OData in Practice (Read Only)
         u    The QUERY operation – retrieving all or part of a collection
         u    The READ operation – retrieving a single entry from a collection
         u    Understanding the XML returned by the QUERY and READ operations
         u    Mapping OData properties to Atom elements




 ©  2012 SAP AG. All rights reserved.                                             30
Retrieving a Single Entry – ReadEntity Operation 1/2

Below is one entry from the Airports collection in the FlightInformation
service.
Notice that each <entry> element contains one or more <link> elements.
<entry>	
  
	
  
	
  	
  ...	
  snip	
  ...	
  
	
  
	
  	
  <link	
  href="Airports('FCO')"	
  ...	
  snip	
  .../>	
  
	
  	
  <link	
  href="Airports('FCO')/AirportsTo”	
  ...	
  snip	
  ...	
  />	
  
	
  	
  <link	
  href="Airports('FCO')/DepartingFlights”	
  ...	
  snip	
  ...	
  />	
  
	
  	
  <title>ROME	
  -­‐	
  FCO</title>	
  
	
  	
  <updated>2011-­‐10-­‐19T08:38:00Z</updated>	
  
</entry>	
  



The href parameter of the first <link> element contains a self-reference to the
current <entry>	
  



©  2012 SAP AG. All rights reserved.                                                       31
Retrieving a Single Entry – ReadEntity Operation 2/2

The first <link> element is always a self-reference. It contains the relative URL
for reading the current entry from the collection.
<link	
  href="Airports('FCO')"	
  ...	
  snip	
  .../>	
  

         IMPORTANT: The conventional query string syntax is not used here!
Instead, the collection name is immediately followed by a comma separated list of
name/value pairs, all enclosed within parentheses. This is known as the “Key
Predicate”.

                             CollectionName




This non-standard URL syntax is needed so that the OData server can distinguish
a READ operation (0..1 entries) from a QUERY operation (0..n entries)



 ©  2012 SAP AG. All rights reserved.                                               32
Agenda

u    Atom and OData – Building Towards a Business Interface
u    Gateway – OData for the Enterprise
u    Using Gateway – OData in Practice (Read Only)
         u    The QUERY operation – retrieving all or part of a collection
         u    The READ operation – retrieving a single entry from a collection
         u    Understanding the XML returned by the QUERY and READ operations
         u    Mapping OData properties to Atom elements




 ©  2012 SAP AG. All rights reserved.                                             33
XML Returned by ReadEntitySet and ReadEntity – 1/2

A ReadEntitySet operation will return zero or more entries; therefore, the OData
XML will always be contained within an <feed> element – even if the filter options
result in only one entry being returned.




                                       Zero or more
                                         <entry>
                                        elements




It is perfectly valid for a ReadEntitySet operation to return zero <entry> elements.




©  2012 SAP AG. All rights reserved.                                                   34
XML Returned by ReadEntitySet and ReadEntity – 2/2

A ReadEntity operation will return zero or one entry. Therefore the OData XML will
never be contained within an <feed> element.
Instead, a single <entry> element will be returned.




©  2012 SAP AG. All rights reserved.                                             35
Agenda

u    Atom and OData – Building Towards a Business Interface
u    Gateway – OData for the Enterprise
u    Using Gateway – OData in Practice (Read Only)
         u    The QUERY operation – retrieving all or part of a collection
         u    The READ operation – retrieving a single entry from a collection
         u    Understanding the XML returned by the QUERY and READ operations
         u    Mapping OData properties to Atom elements




 ©  2012 SAP AG. All rights reserved.                                             36
Standard ATOM Elements – 1/2

Within an <entry> element, there is always an <content> element. This element
contains zero or more OData properties.
However, since OData is based on Atom, there are elements outside the
<content> element that are also significant.




©  2012 SAP AG. All rights reserved.                                            37
Standard ATOM Elements – 2/2

These Atom elements are:
<author>, (which may itself contain <email>, <name> and <uri>), <published>,
<rights>, <summary>, and <title>.
For example:
<author>	
  
	
  	
  <name>Siegfried	
  Mechler</name>	
  
</author>	
  
	
  
<title	
  type="text">	
  
	
  	
  Booking	
  for	
  Siegfried	
  Mechler	
  on	
  flight	
  AA0017	
  on	
  20111207	
  
</title>	
  


It is possible to map OData properties into these standard Atom elements. This is
useful if you wish to display an OData message using an Atom Feed parser such
as a browser.

©  2012 SAP AG. All rights reserved.                                                             38
Mapping OData Properties to ATOM Elements – 1/2

If the coding in your Gateway Service does not explicitly map any OData properties
to the standard Atom elements, then the Gateway runtime will automatically
populate the <title> field with a default value.




                                                    Default value for the
                                                     <title> element




©  2012 SAP AG. All rights reserved.                                             39
Mapping OData Properties to ATOM Elements – 2/2

When writing the coding for a Gateway Service, you can map an OData property to
an Atom element. Here the <title> element has been supplied with data from an
OData property.




                                          The value from an OData
                                       property has now been mapped
                                           to the <title> element




©  2012 SAP AG. All rights reserved.                                          40
Summary



                               You should now be able to
                               Ÿ  The architecture of the Atom and OData protocols
                               Ÿ  How SAP NetWeaver Gateway makes use of OData
                               Ÿ  How to issue read-only OData requests from your browser




©  2012 SAP AG. All rights reserved.                                                         41
APPENDIX

u    Differences Between Atom and OData Terminology
u    Displaying Atom XML in a Browser




©  2012 SAP AG. All rights reserved.                   42
APPENDIX

u    Differences Between Atom and OData Terminology
u    Displaying Atom XML in a Browser




©  2012 SAP AG. All rights reserved.                   43
Atom and OData Terminology

OData has defined some terminology that differs from the Atom terminology, but in
fact refers to the same things.

                                       Atom    OData
                                       Feed    Collection / EntitySet
                                       Entry   Entity


The terms Entity and EntitySet will appear when using the ABAP OData API but
are interchangeable with the Atom terms Entry and Collection.




©  2012 SAP AG. All rights reserved.                                            44
APPENDIX

u    Differences Between Atom and OData Terminology
u    Displaying Atom XML in a Browser




©  2012 SAP AG. All rights reserved.                   45
Displaying Atom XML in your Browser

You may find that your browser does not display Atom XML in a formatted manner.
This is due to the MIME type used by the Gateway server.


                                           The Gateway server returns XML
                                           with a MIME type of
                                           application/atom+xml	
  
                                           Most modern browsers will interpret
                                           this as an Atom feed and format the
                                           results in the manner shown here.
                                           If you want to see the indented XML,
                                           then you add the query string
                                           parameter sap-­‐ds-­‐debug=true.
                                           This causes the Gateway server to
                                           format the XML and present it as an
                                           HTML page.

©  2012 SAP AG. All rights reserved.                                             46
© 2012 SAP AG. All rights reserved


No part of this publication may be reproduced or transmitted in any form or for any purpose   Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal
without the express permission of SAP AG. The information contained herein may be             Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services
changed without prior notice.                                                                 mentioned herein as well as their respective logos are trademarks or registered trademarks
                                                                                              of Business Objects Software Ltd. Business Objects is an SAP company.
Some software products marketed by SAP AG and its distributors contain proprietary
software components of other software vendors.                                                Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft     products and services mentioned herein as well as their respective logos are trademarks or
                                                                                              registered trademarks of Sybase, Inc. Sybase is an SAP company.
Corporation.
                                                                                              All other product and service names mentioned are the trademarks of their respective
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x,
                                                                                              companies. Data contained in this document serves informational purposes only. National
System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/
                                                                                              product specifications may vary.
VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER,                         The information in this document is proprietary to SAP. No part of this document may be
OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP,                     reproduced, copied, or transmitted in any form or for any purpose without the express prior
RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent        written permission of SAP AG.
Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of   This document is a preliminary version and not subject to your license agreement or any
IBM Corporation.                                                                              other agreement with SAP. This document contains only intended strategies, developments,
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.          and functionalities of the SAP® product and is not intended to be binding upon SAP to any
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered    particular course of business, product strategy, and/or development. Please note that this
                                                                                              document is subject to change and may be changed by SAP at any time without notice.
trademarks of Adobe Systems Incorporated in the United States and/or other countries.
                                                                                              SAP assumes no responsibility for errors or omissions in this document. SAP does not
Oracle is a registered trademark of Oracle Corporation.
                                                                                              warrant the accuracy or completeness of the information, text, graphics, links, or other items
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.                   contained within this material. This document is provided without a warranty of any kind,
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are          either express or implied, including but not limited to the implied warranties of
trademarks or registered trademarks of Citrix Systems, Inc.                                   merchantability, fitness for a particular purpose, or non-infringement.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World               SAP shall have no liability for damages of any kind including without limitation direct, special,
Wide Web Consortium, Massachusetts Institute of Technology.                                   indirect, or consequential damages that may result from the use of these materials. This
                                                                                              limitation shall not apply in cases of intent or gross negligence.
Java is a registered trademark of Sun Microsystems, Inc.
                                                                                              The statutory liability for personal injury and defective products is not affected. SAP has no
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for        control over the information that you may access through the use of hot links contained in
technology invented and implemented by Netscape.                                              these materials and does not endorse your use of third-party Web pages nor provide any
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,           warranty whatsoever relating to third-party Web pages.
StreamWork, and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP AG in Germany and other
countries.




 ©  2012 SAP AG. All rights reserved.                                                                                                                                                     47

More Related Content

What's hot

Core Data Service
Core Data ServiceCore Data Service
Core Data ServiceSujoy Saha
 
Introduction Into SAP Fiori
Introduction Into SAP FioriIntroduction Into SAP Fiori
Introduction Into SAP FioriBlackvard
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overviewsapdocs. info
 
Sap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4hSap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4hAkhilendra Singh
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modificationsscribid.download
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwLuc Vanrobays
 
SAP Integration: Best Practices | MuleSoft
SAP Integration: Best Practices | MuleSoftSAP Integration: Best Practices | MuleSoft
SAP Integration: Best Practices | MuleSoftMuleSoft
 
Calculation Manager: The New and Improved Application to Create Hyperion Plan...
Calculation Manager: The New and Improved Application to Create Hyperion Plan...Calculation Manager: The New and Improved Application to Create Hyperion Plan...
Calculation Manager: The New and Improved Application to Create Hyperion Plan...Alithya
 
rise-with-sap-s4hana-cloud-private-edition-and-sap-erp-pce-english-v2-2021.pdf
rise-with-sap-s4hana-cloud-private-edition-and-sap-erp-pce-english-v2-2021.pdfrise-with-sap-s4hana-cloud-private-edition-and-sap-erp-pce-english-v2-2021.pdf
rise-with-sap-s4hana-cloud-private-edition-and-sap-erp-pce-english-v2-2021.pdfBangLuuVan
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IIAshish Saxena
 
SAP Cloud Platform - Integration, Extensibility & Services
SAP Cloud Platform - Integration, Extensibility & ServicesSAP Cloud Platform - Integration, Extensibility & Services
SAP Cloud Platform - Integration, Extensibility & ServicesAndrew Harding
 
Introduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds viewsIntroduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds viewsLuc Vanrobays
 
How to create generic delta
How to create generic deltaHow to create generic delta
How to create generic deltaJacques Kalees
 

What's hot (20)

CDS Views.pptx
CDS Views.pptxCDS Views.pptx
CDS Views.pptx
 
Core Data Service
Core Data ServiceCore Data Service
Core Data Service
 
Introduction Into SAP Fiori
Introduction Into SAP FioriIntroduction Into SAP Fiori
Introduction Into SAP Fiori
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
OData Fundamental
OData FundamentalOData Fundamental
OData Fundamental
 
Sap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4hSap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4h
 
Table maintenance generator and its modifications
Table maintenance generator and its modificationsTable maintenance generator and its modifications
Table maintenance generator and its modifications
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bw
 
SAP Integration: Best Practices | MuleSoft
SAP Integration: Best Practices | MuleSoftSAP Integration: Best Practices | MuleSoft
SAP Integration: Best Practices | MuleSoft
 
Dell boomi vs sap cpi
Dell boomi vs sap cpiDell boomi vs sap cpi
Dell boomi vs sap cpi
 
Calculation Manager: The New and Improved Application to Create Hyperion Plan...
Calculation Manager: The New and Improved Application to Create Hyperion Plan...Calculation Manager: The New and Improved Application to Create Hyperion Plan...
Calculation Manager: The New and Improved Application to Create Hyperion Plan...
 
SAP Fiori.pptx
SAP Fiori.pptxSAP Fiori.pptx
SAP Fiori.pptx
 
rise-with-sap-s4hana-cloud-private-edition-and-sap-erp-pce-english-v2-2021.pdf
rise-with-sap-s4hana-cloud-private-edition-and-sap-erp-pce-english-v2-2021.pdfrise-with-sap-s4hana-cloud-private-edition-and-sap-erp-pce-english-v2-2021.pdf
rise-with-sap-s4hana-cloud-private-edition-and-sap-erp-pce-english-v2-2021.pdf
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part II
 
SAP Cloud Platform - Integration, Extensibility & Services
SAP Cloud Platform - Integration, Extensibility & ServicesSAP Cloud Platform - Integration, Extensibility & Services
SAP Cloud Platform - Integration, Extensibility & Services
 
Abap proxies
Abap proxiesAbap proxies
Abap proxies
 
Introduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds viewsIntroduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds views
 
SAP Fiori ppt
SAP Fiori pptSAP Fiori ppt
SAP Fiori ppt
 
How to create generic delta
How to create generic deltaHow to create generic delta
How to create generic delta
 
Essbase intro
Essbase introEssbase intro
Essbase intro
 

Viewers also liked

Viewers also liked (9)

SAP NetWeaver Gateway - Introduction
SAP NetWeaver Gateway - IntroductionSAP NetWeaver Gateway - Introduction
SAP NetWeaver Gateway - Introduction
 
OData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introductionOData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introduction
 
Practical OData
Practical ODataPractical OData
Practical OData
 
Odata
OdataOdata
Odata
 
OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)
 
JavaScript for ABAP Programmers - 4/7 Scope
JavaScript for ABAP Programmers - 4/7 ScopeJavaScript for ABAP Programmers - 4/7 Scope
JavaScript for ABAP Programmers - 4/7 Scope
 
Sap abap on hana
Sap abap on hanaSap abap on hana
Sap abap on hana
 
SAP HANA ABAP TRAINING | SAP HANA ABAP ONLINE COURSE TRAINING - GOT
SAP HANA ABAP TRAINING | SAP HANA ABAP ONLINE COURSE TRAINING - GOTSAP HANA ABAP TRAINING | SAP HANA ABAP ONLINE COURSE TRAINING - GOT
SAP HANA ABAP TRAINING | SAP HANA ABAP ONLINE COURSE TRAINING - GOT
 
The S/4 HANA Programing Paradigm
The S/4 HANA Programing ParadigmThe S/4 HANA Programing Paradigm
The S/4 HANA Programing Paradigm
 

Similar to GW100 SAP NetWeaver Gateway Introduction to OData

Document_format_for_OData_In_A_Nutshell.pdf
Document_format_for_OData_In_A_Nutshell.pdfDocument_format_for_OData_In_A_Nutshell.pdf
Document_format_for_OData_In_A_Nutshell.pdfdavidjpeace
 
SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)Pavan Golesar
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
WSO2 Application Server - Product Overview
WSO2 Application Server - Product OverviewWSO2 Application Server - Product Overview
WSO2 Application Server - Product OverviewWSO2
 
Virtuoso Universal Server Overview
Virtuoso Universal Server OverviewVirtuoso Universal Server Overview
Virtuoso Universal Server Overviewrumito
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)Pat Patterson
 
Oracle on AWS partner webinar series
Oracle on AWS partner webinar series Oracle on AWS partner webinar series
Oracle on AWS partner webinar series Tom Laszewski
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registrydeimos
 
Introduction to OData and SAP NetWeaver Gateway.pptx
Introduction to OData and SAP NetWeaver Gateway.pptxIntroduction to OData and SAP NetWeaver Gateway.pptx
Introduction to OData and SAP NetWeaver Gateway.pptxRichard314186
 
JEE Course - The Web Tier
JEE Course - The Web TierJEE Course - The Web Tier
JEE Course - The Web Tierodedns
 
Solution Use Case Demo: The Power of Relationships in Your Big Data
Solution Use Case Demo: The Power of Relationships in Your Big DataSolution Use Case Demo: The Power of Relationships in Your Big Data
Solution Use Case Demo: The Power of Relationships in Your Big DataInfiniteGraph
 
Asp.net interview questions
Asp.net interview questionsAsp.net interview questions
Asp.net interview questionsAkhil Mittal
 
OUGN 2016: Experiences with REST support on OSB/SOA Suite
OUGN 2016: Experiences with REST support on OSB/SOA SuiteOUGN 2016: Experiences with REST support on OSB/SOA Suite
OUGN 2016: Experiences with REST support on OSB/SOA SuiteJon Petter Hjulstad
 
OData Across Boundaries
OData Across BoundariesOData Across Boundaries
OData Across BoundariesSam Basu
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache TomcatAuwal Amshi
 
Provisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack ManagerProvisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack ManagerSimon Haslam
 

Similar to GW100 SAP NetWeaver Gateway Introduction to OData (20)

Document_format_for_OData_In_A_Nutshell.pdf
Document_format_for_OData_In_A_Nutshell.pdfDocument_format_for_OData_In_A_Nutshell.pdf
Document_format_for_OData_In_A_Nutshell.pdf
 
Introduction to o data
Introduction to o dataIntroduction to o data
Introduction to o data
 
SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)
 
Java EE7
Java EE7Java EE7
Java EE7
 
WSO2 Application Server - Product Overview
WSO2 Application Server - Product OverviewWSO2 Application Server - Product Overview
WSO2 Application Server - Product Overview
 
Virtuoso Universal Server Overview
Virtuoso Universal Server OverviewVirtuoso Universal Server Overview
Virtuoso Universal Server Overview
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
Oracle on AWS partner webinar series
Oracle on AWS partner webinar series Oracle on AWS partner webinar series
Oracle on AWS partner webinar series
 
Paul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA RegistryPaul Fremantle Restful SOA Registry
Paul Fremantle Restful SOA Registry
 
Introduction to OData and SAP NetWeaver Gateway.pptx
Introduction to OData and SAP NetWeaver Gateway.pptxIntroduction to OData and SAP NetWeaver Gateway.pptx
Introduction to OData and SAP NetWeaver Gateway.pptx
 
JEE Course - The Web Tier
JEE Course - The Web TierJEE Course - The Web Tier
JEE Course - The Web Tier
 
Aqua presentation
Aqua presentationAqua presentation
Aqua presentation
 
Solution Use Case Demo: The Power of Relationships in Your Big Data
Solution Use Case Demo: The Power of Relationships in Your Big DataSolution Use Case Demo: The Power of Relationships in Your Big Data
Solution Use Case Demo: The Power of Relationships in Your Big Data
 
Asp.net interview questions
Asp.net interview questionsAsp.net interview questions
Asp.net interview questions
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
OUGN 2016: Experiences with REST support on OSB/SOA Suite
OUGN 2016: Experiences with REST support on OSB/SOA SuiteOUGN 2016: Experiences with REST support on OSB/SOA Suite
OUGN 2016: Experiences with REST support on OSB/SOA Suite
 
OData Across Boundaries
OData Across BoundariesOData Across Boundaries
OData Across Boundaries
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache Tomcat
 
Provisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack ManagerProvisioning with Oracle Cloud Stack Manager
Provisioning with Oracle Cloud Stack Manager
 

More from SAP PartnerEdge program for Application Development

More from SAP PartnerEdge program for Application Development (20)

SAP HANA Cloud Platform Expert Session - SAP HANA Cloud Platform Analytics
SAP HANA Cloud Platform Expert Session - SAP HANA Cloud Platform AnalyticsSAP HANA Cloud Platform Expert Session - SAP HANA Cloud Platform Analytics
SAP HANA Cloud Platform Expert Session - SAP HANA Cloud Platform Analytics
 
SUSE Technical Webinar – Get started with creating Lumira CVOM extensions -- ...
SUSE Technical Webinar – Get started with creating Lumira CVOM extensions -- ...SUSE Technical Webinar – Get started with creating Lumira CVOM extensions -- ...
SUSE Technical Webinar – Get started with creating Lumira CVOM extensions -- ...
 
SUSE Technical Webinar – Get started with creating Design Studio extensions -...
SUSE Technical Webinar – Get started with creating Design Studio extensions -...SUSE Technical Webinar – Get started with creating Design Studio extensions -...
SUSE Technical Webinar – Get started with creating Design Studio extensions -...
 
SUSE Technical Webinar: Build HANA Apps in the Framework of the SAP and SUSE ...
SUSE Technical Webinar: Build HANA Apps in the Framework of the SAP and SUSE ...SUSE Technical Webinar: Build HANA Apps in the Framework of the SAP and SUSE ...
SUSE Technical Webinar: Build HANA Apps in the Framework of the SAP and SUSE ...
 
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
 
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
 
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
 
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
 
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
 
SUSE Technical Webinar: Introduction to Business Intelligence - the SAP and S...
SUSE Technical Webinar: Introduction to Business Intelligence - the SAP and S...SUSE Technical Webinar: Introduction to Business Intelligence - the SAP and S...
SUSE Technical Webinar: Introduction to Business Intelligence - the SAP and S...
 
SUSE Technical Webinar: Build Cloud Apps with SAP HANA Cloud Platform
SUSE Technical Webinar: Build Cloud Apps with SAP HANA Cloud PlatformSUSE Technical Webinar: Build Cloud Apps with SAP HANA Cloud Platform
SUSE Technical Webinar: Build Cloud Apps with SAP HANA Cloud Platform
 
Partner with SAP to Develop Mobile apps and capture the Mobile Market Opportu...
Partner with SAP to Develop Mobile apps and capture the Mobile Market Opportu...Partner with SAP to Develop Mobile apps and capture the Mobile Market Opportu...
Partner with SAP to Develop Mobile apps and capture the Mobile Market Opportu...
 
Microsoft Technical Webinar: SAP Mobile Platform for Windows 8 and Windows Ph...
Microsoft Technical Webinar: SAP Mobile Platform for Windows 8 and Windows Ph...Microsoft Technical Webinar: SAP Mobile Platform for Windows 8 and Windows Ph...
Microsoft Technical Webinar: SAP Mobile Platform for Windows 8 and Windows Ph...
 
Microsoft Technical Webinar - New devices for Windows 8 and Windows Phone 8, ...
Microsoft Technical Webinar - New devices for Windows 8 and Windows Phone 8, ...Microsoft Technical Webinar - New devices for Windows 8 and Windows Phone 8, ...
Microsoft Technical Webinar - New devices for Windows 8 and Windows Phone 8, ...
 
Autodesk Technical Webinar: SAP Business One
Autodesk Technical Webinar: SAP Business OneAutodesk Technical Webinar: SAP Business One
Autodesk Technical Webinar: SAP Business One
 
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
 
Mobile Apps 4 Charity
Mobile Apps 4 CharityMobile Apps 4 Charity
Mobile Apps 4 Charity
 
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - S...
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - S...Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - S...
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - S...
 
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - P...
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - P...Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - P...
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - P...
 
Autodesk Technical Webinar: SAP HANA in-memory database
Autodesk Technical Webinar: SAP HANA in-memory databaseAutodesk Technical Webinar: SAP HANA in-memory database
Autodesk Technical Webinar: SAP HANA in-memory database
 

Recently uploaded

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Recently uploaded (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

GW100 SAP NetWeaver Gateway Introduction to OData

  • 1. GW100 SAP NetWeaver Gateway Introduction to OData May, 2012 INTE RNA L
  • 2. Objectives At the end of this chapter, you will understand: Ÿ  The architecture of the Atom and OData protocols Ÿ  How SAP NetWeaver Gateway makes use of OData Ÿ  How to issue read-only OData requests from your browser ©  2012 SAP AG. All rights reserved. 2
  • 3. Agenda u  Atom and OData – Building Towards a Business Interface u  Gateway – OData for the Enterprise u  Using Gateway – OData in Practice (Read Only) u  The QUERY operation – retrieving all or part of a collection u  The READ operation – retrieving a single entry from a collection u  Understanding the XML returned by the QUERY and READ operations u  Mapping OData properties to Atom elements ©  2012 SAP AG. All rights reserved. 3
  • 4. Agenda u  Atom and OData – Building Towards a Business Interface u  Gateway – OData for the Enterprise u  Using Gateway – OData in Practice (Read Only) u  The QUERY operation – retrieving all or part of a collection u  The READ operation – retrieving a single entry from a collection u  Understanding the XML returned by the QUERY and READ operations u  Mapping OData properties to Atom elements ©  2012 SAP AG. All rights reserved. 4
  • 5. What is the Open Data Protocol (OData)? OData is a Microsoft developed extension to the Atom Publishing and Atom Syndication standards, which in turn, are based on XML and HTTP(S). SAP Annotations It was designed to provide a standardised OData implementation of a RESTful API. In doing so, it offers database-like access to server-side Atom Publishing resources. Hence, OData has been described as: Atom Syndication “ODBC for the Web” It can be used freely without the need for a license XML or JSON or contract. HTTP(S) OData is also extensible. This allows SAP to supplement the data types used by OData with extra information from the ABAP Data Dictionary. ©  2012 SAP AG. All rights reserved. 5
  • 6. What is Atom? Atom is pair of standards Atom Syndication Format SAP Annotations -  An XML based description of the documents supplied by a website OData -  These descriptions are typically consumed by content syndication websites Atom Publishing -  In Atom terminology, a collection of documents is known as a “Feed” Atom Syndication -  A Feed is compose of zero or more “Entries” XML Atom Publishing Format -  An HTTP based protocol that allows the HTTP manipulation of Atom Syndication documents Atom Syndication and Atom Publishing are only partially RESTful protocols. ©  2012 SAP AG. All rights reserved. 6
  • 7. What Does OData Add to Atom? The Atom Publishing Format does not specify how data should be encoded within a Feed; SAP Annotations therefore, it fails to be fully RESTful because its messages are not self-describing. OData OData extends Atom by providing a metadata description of the message. Atom Publishing OData provides definitions for: Atom Syndication -  Simple Types -  Complex Types XML -  Associations between entries -  Navigation Paths between entries HTTP -  Custom behaviour beyond the standard CRUD operations ©  2012 SAP AG. All rights reserved. 7
  • 8. Output Formats Supported by OData OData supports the use of either XML or JSON format messages. {  "d":{      "__count":”2",      "results":[{          "__metadata":{              "uri":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('AA')",              "type":"RMTSAMPLEFLIGHT.Carrier",              "content_type":"text/html",              "media_src":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('AA')/$value",              "edit_media":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('AA')/$value"},          "carrid":"AA",          "CARRNAME":"American  Airlines",          "CURRCODE":"USD",          "URL":"http://www.aa.com",          "mimeType":"text/html",          "carrierFlights":{              "__deferred":{                  "uri":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('AA')/carrierFlights"}}},        {"__metadata":{              "uri":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('JL')",              "type":"RMTSAMPLEFLIGHT.Carrier",              "content_type":"text/html",              "media_src":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('JL')/$value",              "edit_media":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('JL')/$value"},          "carrid":"JL",          "CARRNAME":"Japan  Airlines",          "CURRCODE":"JPY",          "URL":"http://www.jal.co.jp","mimeType":"text/html",          "carrierFlights":{              "__deferred":{                  "uri":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection('JL')/carrierFlights"}}}      ],      "__next":"http://ldcigkq.wdf.sap.corp:50080/sap/opu/odata/iwfnd/RMTSAMPLEFLIGHT/CarrierCollection?$skiptoken=11"}   }   ©  2012 SAP AG. All rights reserved. 8
  • 9. OData Service Documents – The Starting Point An OData Service Document is a high level description of the server-side resources that are available for manipulation. It is retrieved using a URL. For example, issuing the URL http://odata.netflix.com returns: ©  2012 SAP AG. All rights reserved. 9
  • 10. OData Service Documents – General Structure The service tag defines a particular OData Service. <service>   This tag defines the starting point for service consumption. 1 The workspace tag contains a list of all server-side <workspace>   resources that are available for manipulation. 1 0..n A collection tag identifies an <title>   <collection>   individual server-side resource. 1 <title>   The <collection> tag will give you access to a server-side resource that can be manipulated in some way. This could be a single table (hence “ODBC for the Web”) or a set of business objects such as Sales Orders or Service Orders or Customers etc. ©  2012 SAP AG. All rights reserved. 10
  • 11. An Example of an OData Service Document – 1/2 <service  xml:base="http://odata.netflix.com/v2/Catalog/”          xmlns:atom="http://www.w3.org/2005/Atom"  xmlns="http://www.w3.org/2007/app”>      <workspace>          <title>Default</title>          <collection  href="Genres">              <title>Genres</title>          </collection>          <collection  href="Titles">              <title>Titles</title>   The service tag defines        </collection>          <collection  href="TitleAudioFormats">   an OData Service.            <title>TitleAudioFormats</title>          </collection>   The parameters define        <collection  href="TitleAwards">              <title>TitleAwards</title>   the base URL for the        </collection>   service and which        <collection  href="People">              <title>People</title>   namespaces will be used        </collection>          <collection  href="TitleScreenFormats">   to define the content            <title>TitleScreenFormats</title>          </collection>          <collection  href="Languages">              <title>Languages</title>          </collection>      </workspace>   </service>   This example is taken from Netflix’s online catalogue available at http://odata.netflix.com/v2/Catalog/   ©  2012 SAP AG. All rights reserved. 11
  • 12. An Example of an OData Service Document – 2/2 <service  xml:base="http://odata.netflix.com/v2/Catalog/”          xmlns:atom="http://www.w3.org/2005/Atom"  xmlns="http://www.w3.org/2007/app”>      <workspace>          <title>Default</title>          <collection  href="Genres">              <title>Genres</title>   The collection tag defines the relative        </collection>   URL and title of an individual collection        <collection  href="Titles">              <title>Titles</title>          </collection>          <collection  href="TitleAudioFormats">              <title>TitleAudioFormats</title>          </collection>          <collection  href="TitleAwards">   The workspace tag defines which collections            <title>TitleAwards</title>          </collection>   are provided by this OData Service        <collection  href="People">              <title>People</title>          </collection>          <collection  href="TitleScreenFormats">              <title>TitleScreenFormats</title>          </collection>          <collection  href="Languages">              <title>Languages</title>          </collection>      </workspace>   </service>   This example is taken from Netflix’s online catalogue available at http://odata.netflix.com/v2/Catalog/   ©  2012 SAP AG. All rights reserved. 12
  • 13. Accessing an OData Collection – Construct the URL Using the base URL defined in the service document’s <service> tag, we can now construct the correct URL to access any collection listed in the workspace: <service  xml:base="http://odata.netflix.com/v2/Catalog/”          xmlns:atom="http://www.w3.org/2005/Atom"  xmlns="http://www.w3.org/2007/app”>      <workspace>          <title>Default</title>          <collection  href="Genres">              <title>Genres</title>          </collection>            ...  snip  ...        </workspace>   </service>   http://odata.netflix.com/v2/Catalog/Genres When this URL is now issued, we will receive the contents of the “Genres” collection. ©  2012 SAP AG. All rights reserved. 13
  • 14. Accessing an OData Collection – A Structured Response In ABAP, this Corresponds to a row data would <feed>   in an ABAP table be in a table 1 1 1 1 0..n <title>   <id>   <updated>   <link>   <entry>   1 1 1 1..n 1 0..1 <title>   <id>   <updated>   <link>   <category>   <content>   1..n <properties>   Corresponds to a column in an ABAP table ©  2012 SAP AG. All rights reserved. 14
  • 15. Understanding OData XML – 1/4 <?xml  version="1.0"  encoding="iso-­‐8859-­‐1"  standalone="yes"?>   <feed  xml:base="http://odata.netflix.com/v2/Catalog/"          xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices”          xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"          xmlns="http://www.w3.org/2005/Atom">      <title  type="text">Genres</title>      <id>http://odata.netflix.com/v2/Catalog/Genres/</id>      <updated>2011-­‐10-­‐17T15:25:10Z</updated>      <link  rel="self"  title="Genres"  href="Genres"  />      <entry>          <id>http://odata.netflix.com/v2/Catalog/Genres('Action%20%26%20Adventure')</id>          <title  type="text">Action  &amp;  Adventure</title>          <updated>2011-­‐10-­‐17T15:25:10Z</updated>   The <feed> element        <author>              <name  />   defines a collection of        </author>          <link  rel="edit"  title="Genre"  href="Genres('Action%20%26%20Adventure')"  />   zero or more <entry>        <link  rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Titles”   elements                type="application/atom+xml;type=feed”                  title="Titles"  href="Genres('Action%20%26%20Adventure')/Titles"  />          <category  term="Netflix.Catalog.v2.Genre”                  scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"  />          <content  type="application/xml">              <m:properties>                  <d:Name>Action  &amp;  Adventure</d:Name>              </m:properties>          </content>      </entry>   </feed>   This example is taken from http://odata.netflix.com/v2/Catalog/Genres   ©  2012 SAP AG. All rights reserved. 15
  • 16. Understanding OData XML – 2/4 <?xml  version="1.0"  encoding="iso-­‐8859-­‐1"  standalone="yes"?>   <feed  xml:base="http://odata.netflix.com/v2/Catalog/"          xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices”          xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"          xmlns="http://www.w3.org/2005/Atom">      <title  type="text">Genres</title>      <id>http://odata.netflix.com/v2/Catalog/Genres/</id>      <updated>2011-­‐10-­‐17T15:25:10Z</updated>      <link  rel="self"  title="Genres"  href="Genres"  />      <entry>          <id>http://odata.netflix.com/v2/Catalog/Genres('Action%20%26%20Adventure')</id>          <title  type="text">Action  &amp;  Adventure</title>          <updated>2011-­‐10-­‐17T15:25:10Z</updated>          <author>              <name  />          </author>          <link  rel="edit"  title="Genre"  href="Genres('Action%20%26%20Adventure')"  />   The <entry> element        <link  rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Titles”                  type="application/atom+xml;type=feed”   contains the data for one                title="Titles"  href="Genres('Action%20%26%20Adventure')/Titles"  />   member of the feed’s        <category  term="Netflix.Catalog.v2.Genre”                  scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"  />   collection        <content  type="application/xml">              <m:properties>                  <d:Name>Action  &amp;  Adventure</d:Name>              </m:properties>          </content>      </entry>   </feed>   This example is taken from http://odata.netflix.com/v2/Catalog/Genres   ©  2012 SAP AG. All rights reserved. 16
  • 17. Understanding OData XML – 3/4 <?xml  version="1.0"  encoding="iso-­‐8859-­‐1"  standalone="yes"?>   <feed  xml:base="http://odata.netflix.com/v2/Catalog/"          xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices”          xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"          xmlns="http://www.w3.org/2005/Atom">      <title  type="text">Genres</title>      <id>http://odata.netflix.com/v2/Catalog/Genres/</id>      <updated>2011-­‐10-­‐17T15:25:10Z</updated>      <link  rel="self"  title="Genres"  href="Genres"  />      <entry>          <id>http://odata.netflix.com/v2/Catalog/Genres('Action%20%26%20Adventure')</id>          <title  type="text">Action  &amp;  Adventure</title>          <updated>2011-­‐10-­‐17T15:25:10Z</updated>          <author>              <name  />          </author>          <link  rel="edit"  title="Genre"  href="Genres('Action%20%26%20Adventure')"  />          <link  rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Titles”                  type="application/atom+xml;type=feed”                  title="Titles"  href="Genres('Action%20%26%20Adventure')/Titles"  />          <category  term="Netflix.Catalog.v2.Genre”                  scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"  />          <content  type="application/xml">              <m:properties>   The <content> element contains                <d:Name>Action  &amp;  Adventure</d:Name>              </m:properties>   the actual business data        </content>      </entry>   </feed>   This example is taken from http://odata.netflix.com/v2/Catalog/Genres   ©  2012 SAP AG. All rights reserved. 17
  • 18. Understanding OData XML – 4/4 <?xml  version="1.0"  encoding="iso-­‐8859-­‐1"  standalone="yes"?>   <feed  xml:base="http://odata.netflix.com/v2/Catalog/"          xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices”          xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"          xmlns="http://www.w3.org/2005/Atom">      <title  type="text">Genres</title>      <id>http://odata.netflix.com/v2/Catalog/Genres/</id>      <updated>2011-­‐10-­‐17T15:25:10Z</updated>      <link  rel="self"  title="Genres"  href="Genres"  />      <entry>          <id>http://odata.netflix.com/v2/Catalog/Genres('Action%20%26%20Adventure')</id>          <title  type="text">Action  &amp;  Adventure</title>          <updated>2011-­‐10-­‐17T15:25:10Z</updated>          <author>              <name  />          </author>          <link  rel="edit"  title="Genre"  href="Genres('Action%20%26%20Adventure')"  />          <link  rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Titles”   The <link> elements point                type="application/atom+xml;type=feed”                  title="Titles"  href="Genres('Action%20%26%20Adventure')/Titles"  />   to related business data        <category  term="Netflix.Catalog.v2.Genre”                  scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"  />          <content  type="application/xml">              <m:properties>                  <d:Name>Action  &amp;  Adventure</d:Name>              </m:properties>          </content>      </entry>   </feed>   This example is taken from http://odata.netflix.com/v2/Catalog/Genres   ©  2012 SAP AG. All rights reserved. 18
  • 19. Agenda u  Atom and OData – Building Towards a Business Interface u  Gateway – OData for the Enterprise u  Using Gateway – OData in Practice (Read Only) u  The QUERY operation – retrieving all or part of a collection u  The READ operation – retrieving a single entry from a collection u  Understanding the XML returned by the QUERY and READ operations u  Mapping OData properties to Atom elements ©  2012 SAP AG. All rights reserved. 19
  • 20. Obtaining OData Metadata In order to consume an OData service, you should retrieve the metadata that describes that service. This is done by adding the suffix $metadata to the Service Document URL. (OData metadata is only available in XML format, not JSON) E.G. http://odata.netflix.com/v2/Catalog/$metadata This will now return an Entity Data Model (edmx) XML description of the service: (There is currently no standard for representing EDMs in JSON; therefore, the metadata description of an OData service is only available in XML format) <edmx:Edmx  Version="1.0">      <edmx:DataServices  m:DataServiceVersion="1.0">          <Schema  Namespace="Netflix.Catalog.v2">              <EntityType  Name="Genre">                  <Key>                      <PropertyRef  Name="Name"/>                  </Key>                  <Property  Name="Name"  Type="Edm.String"  Nullable="false"  MaxLength="128"  Unicode="true”                          FixedLength="false"  m:FC_TargetPath="SyndicationTitle"  m:FC_ContentKind="text"  m:FC_KeepInContent="True"/>                  <NavigationProperty  Name="Titles"  Relationship="Netflix.Catalog.v2.Genre_Titles”                          FromRole="Genre_Titles_Source"  ToRole="Genre_Titles_Target"/>              </EntityType>              <EntityType  Name="Title"  m:HasStream="true">                  <Key>                      <PropertyRef  Name="Id"/>                  </Key>     ...  snip  ...   ©  2012 SAP AG. All rights reserved. 20
  • 21. SAP Extensions To OData Metadata The standard OData metadata is not able to fully describe all the information held in the ABAP Data Dictionary; therefore, the Gateway server will send extra metadata values identified by the sap: namespace prefix. <EntityType  Name="Booking"  sap:content-­‐version="1">      <Key>          <PropertyRef  Name="AirlineId"/>          <PropertyRef  Name="ConnectionNo"/>          <PropertyRef  Name="FlightDate"/>          <PropertyRef  Name="BookingId"/>      </Key>      <Property  Name="AirlineId”        Type="Edm.String”      Nullable="false"  MaxLength="3”                          sap:label="Airline"  sap:filterable="false"/>      <Property  Name="ConnectionNo"  Type="Edm.String"      Nullable="false"  MaxLength="4”                          sap:label="Flight  Number"  sap:filterable="false"/>      <Property  Name="FlightDate"      Type="Edm.DateTime"  Nullable="false"  Precision="10”                          sap:label="Date"  sap:filterable="false"/>      <Property  Name="BookingId"        Type="Edm.String"      Nullable="false"  MaxLength="8”                          sap:label="Booking  number"  sap:filterable="false"/>      <Property  Name="CustomerNo"      Type="Edm.String”      MaxLength="8”                          sap:label="Customer  Number"  sap:filterable="false"/>      <Property  Name="CustomerName”  Type="Edm.String"      MaxLength="25”                          sap:label="Passenger  Name"  sap:filterable="false"  m:FC_TargetPath="SyndicationAuthorName”  />      <Property  Name="Price"                Type="Edm.Decimal"    Precision="20"  Scale="2”                          sap:label="Airfare"  sap:filterable="false"/>      <Property  Name="CurrencyCode"  Type="Edm.String"      MaxLength="5”                          sap:label="Airline  Currency"  sap:filterable="false"  sap:semantics="currency-­‐code"/>      <Property  Name="BookingDate”    Type="Edm.DateTime"  Precision="10”                          sap:label="Booking  date"  sap:filterable="false”/>     ...  snip  ...   ©  2012 SAP AG. All rights reserved. 21
  • 22. Agenda u  Atom and OData – Building Towards a Business Interface u  Gateway – OData for the Enterprise u  Using Gateway – OData in Practice (Read Only) u  The QUERY operation – retrieving all or part of a collection u  The READ operation – retrieving a single entry from a collection u  Understanding the XML returned by the QUERY and READ operations u  Mapping OData properties to Atom elements ©  2012 SAP AG. All rights reserved. 22
  • 23. Agenda u  Atom and OData – Building Towards a Business Interface u  Gateway – OData for the Enterprise u  Using Gateway – OData in Practice (Read Only) u  The QUERY operation – retrieving all or part of a collection u  The READ operation – retrieving a single entry from a collection u  Understanding the XML returned by the QUERY and READ operations u  Mapping OData properties to Atom elements ©  2012 SAP AG. All rights reserved. 23
  • 24. Entity Data Model – Overview In the following examples and exercises, we will be using the data model shown below: More information will be given about the details of this data model in later chapters. ©  2012 SAP AG. All rights reserved. 24
  • 25. Retrieving a Collection – ReadEntitySet Operation 1/3 To start with, we will cover the simplest two operations that can be performed using OData: ReadEntitySet and ReadEntity (also referred to as QUERY and READ). ReadEntitySet (QUERY) : Returns 0..n entries from a collection ReadEntity (READ) : Returns 0..1 entries from a collection Both operations are read-only and therefore use the HTTP GET method. REST Operation HTTP Method Create a resource POST Retrieve one or more resources GET Update a resource PUT Delete a resource DELETE ©  2012 SAP AG. All rights reserved. 25
  • 26. Retrieving a Collection – ReadEntitySet Operation 2/3 To start running a Gateway Service, you must know the service’s base URL. This value is generated when the Gateway Service is first created. The URL for an entire collection is formed by taking the URL found in the Gateway Service’s xml:base parameter and appending to it the value of the href parameter for the required collection. <app:service  xml:base="http://mysapgateway.com/sap/opu/odata/sap/FlightInformation/">     together with   <app:collection  href="Airports"  sap:content-­‐version="1">   Gives http://mysapgateway.com/sap/opu/odata/sap/FlightInformation/Airports   Since we need to use the HTTP GET method, this URL can be issued directly from the browser’s address line.   ©  2012 SAP AG. All rights reserved. 26
  • 27. Retrieving a Collection – ReadEntitySet Operation 3/3 Issuing this URL from the browser’s address line will cause the Gateway server to return an OData XML message containing the requested collection. ©  2012 SAP AG. All rights reserved. 27
  • 28. Retrieving a Partial Collection – Filtering If a collection has a high number of entries, then you can filter the <feed> contents by using the $filter query string parameter: Assuming a base URL of http://mysapgateway.com/sap/opu/odata/sap/FlightInformation/     Then appending Airports?$filter=IATACode  eq  'FRA' will filter out all airports except Frankfurt.   IMPORTANT! 1.  You must implement the ABAP coding that responds to this parameter 2.  A space character (or %20) must be included on either side of the operator in the $filter condition. 3.  If the property value being filtered is non-numeric, then it must be enclosed within single quotes. For more information on $filter, see: http://www.odata.org/developers/protocols/uri-­‐conventions#FilterSystemQueryOptions   Please note, SAP NetWeaver Gateway does not support all $filter options ©  2012 SAP AG. All rights reserved. 28
  • 29. Retrieving a Partial Collection – Paging If a collection has a high number of entries, then you can use the $top and $skip parameters together to implement paging. Individually, Airports?$top=5 would reduce the <feed> down to the first 5 entries. And Airports?$skip=5 would omit the first 5 entries from the <feed>.   Paging is achieved by setting $top to the number of entries per page, and then incrementing $skip by this number every time the next page is required. Assuming 10 entries per page, then to: View the first page : Airports?$top=10   View the second page : Airports?$skip=10&$top=10   View the third page : Airports?$skip=20&$top=10   etc. For more information on $top, and $skip, see: http://www.odata.org/developers/protocols/uri-­‐conventions#TopSystemQueryOption and following. ©  2012 SAP AG. All rights reserved. 29
  • 30. Agenda u  Atom and OData – Building Towards a Business Interface u  Gateway – OData for the Enterprise u  Using Gateway – OData in Practice (Read Only) u  The QUERY operation – retrieving all or part of a collection u  The READ operation – retrieving a single entry from a collection u  Understanding the XML returned by the QUERY and READ operations u  Mapping OData properties to Atom elements ©  2012 SAP AG. All rights reserved. 30
  • 31. Retrieving a Single Entry – ReadEntity Operation 1/2 Below is one entry from the Airports collection in the FlightInformation service. Notice that each <entry> element contains one or more <link> elements. <entry>        ...  snip  ...        <link  href="Airports('FCO')"  ...  snip  .../>      <link  href="Airports('FCO')/AirportsTo”  ...  snip  ...  />      <link  href="Airports('FCO')/DepartingFlights”  ...  snip  ...  />      <title>ROME  -­‐  FCO</title>      <updated>2011-­‐10-­‐19T08:38:00Z</updated>   </entry>   The href parameter of the first <link> element contains a self-reference to the current <entry>   ©  2012 SAP AG. All rights reserved. 31
  • 32. Retrieving a Single Entry – ReadEntity Operation 2/2 The first <link> element is always a self-reference. It contains the relative URL for reading the current entry from the collection. <link  href="Airports('FCO')"  ...  snip  .../>   IMPORTANT: The conventional query string syntax is not used here! Instead, the collection name is immediately followed by a comma separated list of name/value pairs, all enclosed within parentheses. This is known as the “Key Predicate”. CollectionName This non-standard URL syntax is needed so that the OData server can distinguish a READ operation (0..1 entries) from a QUERY operation (0..n entries) ©  2012 SAP AG. All rights reserved. 32
  • 33. Agenda u  Atom and OData – Building Towards a Business Interface u  Gateway – OData for the Enterprise u  Using Gateway – OData in Practice (Read Only) u  The QUERY operation – retrieving all or part of a collection u  The READ operation – retrieving a single entry from a collection u  Understanding the XML returned by the QUERY and READ operations u  Mapping OData properties to Atom elements ©  2012 SAP AG. All rights reserved. 33
  • 34. XML Returned by ReadEntitySet and ReadEntity – 1/2 A ReadEntitySet operation will return zero or more entries; therefore, the OData XML will always be contained within an <feed> element – even if the filter options result in only one entry being returned. Zero or more <entry> elements It is perfectly valid for a ReadEntitySet operation to return zero <entry> elements. ©  2012 SAP AG. All rights reserved. 34
  • 35. XML Returned by ReadEntitySet and ReadEntity – 2/2 A ReadEntity operation will return zero or one entry. Therefore the OData XML will never be contained within an <feed> element. Instead, a single <entry> element will be returned. ©  2012 SAP AG. All rights reserved. 35
  • 36. Agenda u  Atom and OData – Building Towards a Business Interface u  Gateway – OData for the Enterprise u  Using Gateway – OData in Practice (Read Only) u  The QUERY operation – retrieving all or part of a collection u  The READ operation – retrieving a single entry from a collection u  Understanding the XML returned by the QUERY and READ operations u  Mapping OData properties to Atom elements ©  2012 SAP AG. All rights reserved. 36
  • 37. Standard ATOM Elements – 1/2 Within an <entry> element, there is always an <content> element. This element contains zero or more OData properties. However, since OData is based on Atom, there are elements outside the <content> element that are also significant. ©  2012 SAP AG. All rights reserved. 37
  • 38. Standard ATOM Elements – 2/2 These Atom elements are: <author>, (which may itself contain <email>, <name> and <uri>), <published>, <rights>, <summary>, and <title>. For example: <author>      <name>Siegfried  Mechler</name>   </author>     <title  type="text">      Booking  for  Siegfried  Mechler  on  flight  AA0017  on  20111207   </title>   It is possible to map OData properties into these standard Atom elements. This is useful if you wish to display an OData message using an Atom Feed parser such as a browser. ©  2012 SAP AG. All rights reserved. 38
  • 39. Mapping OData Properties to ATOM Elements – 1/2 If the coding in your Gateway Service does not explicitly map any OData properties to the standard Atom elements, then the Gateway runtime will automatically populate the <title> field with a default value. Default value for the <title> element ©  2012 SAP AG. All rights reserved. 39
  • 40. Mapping OData Properties to ATOM Elements – 2/2 When writing the coding for a Gateway Service, you can map an OData property to an Atom element. Here the <title> element has been supplied with data from an OData property. The value from an OData property has now been mapped to the <title> element ©  2012 SAP AG. All rights reserved. 40
  • 41. Summary You should now be able to Ÿ  The architecture of the Atom and OData protocols Ÿ  How SAP NetWeaver Gateway makes use of OData Ÿ  How to issue read-only OData requests from your browser ©  2012 SAP AG. All rights reserved. 41
  • 42. APPENDIX u  Differences Between Atom and OData Terminology u  Displaying Atom XML in a Browser ©  2012 SAP AG. All rights reserved. 42
  • 43. APPENDIX u  Differences Between Atom and OData Terminology u  Displaying Atom XML in a Browser ©  2012 SAP AG. All rights reserved. 43
  • 44. Atom and OData Terminology OData has defined some terminology that differs from the Atom terminology, but in fact refers to the same things. Atom OData Feed Collection / EntitySet Entry Entity The terms Entity and EntitySet will appear when using the ABAP OData API but are interchangeable with the Atom terms Entry and Collection. ©  2012 SAP AG. All rights reserved. 44
  • 45. APPENDIX u  Differences Between Atom and OData Terminology u  Displaying Atom XML in a Browser ©  2012 SAP AG. All rights reserved. 45
  • 46. Displaying Atom XML in your Browser You may find that your browser does not display Atom XML in a formatted manner. This is due to the MIME type used by the Gateway server. The Gateway server returns XML with a MIME type of application/atom+xml   Most modern browsers will interpret this as an Atom feed and format the results in the manner shown here. If you want to see the indented XML, then you add the query string parameter sap-­‐ds-­‐debug=true. This causes the Gateway server to format the XML and present it as an HTML page. ©  2012 SAP AG. All rights reserved. 46
  • 47. © 2012 SAP AG. All rights reserved No part of this publication may be reproduced or transmitted in any form or for any purpose Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal without the express permission of SAP AG. The information contained herein may be Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services changed without prior notice. mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase, Inc. Sybase is an SAP company. Corporation. All other product and service names mentioned are the trademarks of their respective IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, companies. Data contained in this document serves informational purposes only. National System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/ product specifications may vary. VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, The information in this document is proprietary to SAP. No part of this document may be OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, reproduced, copied, or transmitted in any form or for any purpose without the express prior RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent written permission of SAP AG. Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of This document is a preliminary version and not subject to your license agreement or any IBM Corporation. other agreement with SAP. This document contains only intended strategies, developments, Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. and functionalities of the SAP® product and is not intended to be binding upon SAP to any Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice. trademarks of Adobe Systems Incorporated in the United States and/or other countries. SAP assumes no responsibility for errors or omissions in this document. SAP does not Oracle is a registered trademark of Oracle Corporation. warrant the accuracy or completeness of the information, text, graphics, links, or other items UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. contained within this material. This document is provided without a warranty of any kind, Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are either express or implied, including but not limited to the implied warranties of trademarks or registered trademarks of Citrix Systems, Inc. merchantability, fitness for a particular purpose, or non-infringement. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World SAP shall have no liability for damages of any kind including without limitation direct, special, Wide Web Consortium, Massachusetts Institute of Technology. indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence. Java is a registered trademark of Sun Microsystems, Inc. The statutory liability for personal injury and defective products is not affected. SAP has no JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for control over the information that you may access through the use of hot links contained in technology invented and implemented by Netscape. these materials and does not endorse your use of third-party Web pages nor provide any SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, warranty whatsoever relating to third-party Web pages. StreamWork, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. ©  2012 SAP AG. All rights reserved. 47