OData in a Nutshell. August 2011 INTERNAL



Similar documents
Budget Control by Cost Center

USDL XG WP3 SAP use case. Kay Kadner

User Experience in Custom Apps

Accounts Receivable. SAP Best Practices

Intelligent Business Operations Chapter 1: Overview & Strategy

SAP Business ByDesign Reference Systems. Scenario Outline. SAP ERP Integration Scenarios

SOP through Long Term Planning Transfer to LIS/PIS/Capacity. SAP Best Practices

SAP Service Tools for Performance Analysis

RUN BETTER Become a Best-Run Business with Remote Support Platform for SAP Business One

Ariba Network Integration to SAP ECC

SAPFIN. Overview of SAP ERP Financials COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

How to Configure Access Control for Exchange using PowerShell Cmdlets A Step-by-Step guide

HR400 SAP ERP HCM Payroll Configuration

Next Generation Digital Banking with SAP

AC200. Basics of Customizing for Financial Accounting: General Ledger, Accounts Receivable, Accounts Payable COURSE OUTLINE

Application Lifecycle Management

Unified Service Description Language Enabling the Internet of Services

SAP Master Data Governance- Hiding fields in the change request User Interface

Enterprise Software - Applications, Technologies and Programming

Understanding HR Schema and PCR with an Example

Production Subcontracting (External Processing) SAP Best Practices

TM111. ERP Integration for Order Management (Shipper Specific) COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Process Archiving using NetWeaver Business Process Management

Third Party Digital Asset Management Integration

Table of Contents. How to Find Database Index usage per ABAP Report and Creating an Index

R/3 and J2EE Setup for Digital Signature on Form 16 in HR Systems

SAP Central Process Scheduling (CPS) 8.0 by Redwood

Matthias Steiner SAP. SAP HANA Cloud Platform A guided tour

How To Improve Your Business Process With Sap

K in Identify the differences between the universe design tool and the information design tool

How to Create a Support Message in SAP Service Marketplace

Business One in Action - How can we post bank fees and charges while posting Incoming or Outgoing Payment transactions?

Fixed Asset in SAP Business One 9.0

SAP Business One for iphone and ipad. Version 1.5.x January 2012

Maintaining Different Addresses and Ids for a Business Partner via CRM Web UI

Alert Notification in SAP Supply Network Collaboration. SNC Extension Guide

Query, Read, Create and Update CLOUD FOR CUSTOMER ODATA SERVICE QUERY, READ, CREATE AND UPDATE

Ten reasons small and midsize enterprises (SMEs) choose SAP to help transform their business. Copyright/Trademark

AC 10.0 Centralized Emergency Access

Portfolio and Project Management 5.0: Excel Integration for Financial and Capacity Planning

Integration of SAP Netweaver User Management with LDAP

Run SAP like a Factory

Integrating Easy Document Management System in SAP DMS

Integration of Universal Worklist into Microsoft Office SharePoint

Finding the Leak Access Logging for Sensitive Data. SAP Product Management Security

UI Framework Task Based User Interface. SAP Enhancement Package 1 for SAP CRM 7.0

GRC 10.0 Pre-Installation

3 rd party Service Desk interface

Compliant, Business-Driven Identity Management using. SAP NetWeaver Identity Management and SBOP Access Control. February 2010

UI Framework Simple Search in CRM WebClient based on NetWeaver Enterprise Search (ABAP) SAP Enhancement Package 1 for SAP CRM 7.0

BW Workspaces Use Cases

NetWeaver Business Client (NWBC) for Incentives and Commissions Management (ICM)

Ten reasons to step up to the cloud with SAP Business ByDesign. Copyright/Trademark

SAP NetWeaver BRM 7.3

Data Archiving in CRM: a Brief Overview

CREATING A PURCHASE ORDER STORE RECORD WEB SERVICE

September 10-13, 2012 Orlando, Florida. Step-by-step guidelines for building an information governance strategy

Download and Install Crystal Reports for Eclipse via the Eclipse Software Update Manager

Implementing Outlook Integration for SAP Business One

Secure MobiLink Synchronization using Microsoft IIS and the MobiLink Redirector

ERP Quotation and Sales Order in CRM WebClient UI Detailed View. SAP Enhancement Package 1 for SAP CRM 7.0 CRM Sales - SFA

BICS Connectivity for Web Intelligence in SAP BI 4.0. John Mrozek / AGS December 01, 2011

UI Framework Logo exchange without skin copy. SAP Enhancement Package 1 for SAP CRM 7.0

SAP Best Practices for Subsidiary Integration in One Client Production with Intercompany Replenishment

SAP Sustainability Solutions: Achieving Customer Strategies

How To... Migrate Custom Portal Applications to SAP NetWeaver 7.3

SAP NetWeaver MDM 7.1 Features at a Glance. November, 2011

Ronald Bueck SBO Product Definition

E-Recruiting Job Board Integration using XI

Migration Guide Remote Support Component 1.0 to SAP Solution Manager 7.1. Target Audience System Administrators Technology Consultants

SAP Portfolio and Project Management

How To Configure MDM to Work with Oracle ASM-Based Products

Configuring Distribution List in Compliant User Provisioning

Log Analysis Tool for SAP NetWeaver AS Java

How to Schedule Report Execution and Mailing

AC 10.0 Customizing Workflows for Access Management

Certificate SAP INTEGRATION CERTIFICATION

AC 10.0 Business Role Management

Configuring Single Sign-on for SAP HANA

How to Add an Attribute to a Case, Record and a Document in NW Folder Management (ex-records Management)

Sending Additional Files from SAP Netweaver PI to third Party System

Data Source Enhancement Using User Exit

Business Requirements... 3 Analytics... 3 Typical Use Cases... 8 Related Content... 9 Copyright... 10

How To Use the BPC Mass User Management Tool in BPC 10.0 NW

Consume an External Web Service in a Nutshell with good old ABAP

How To Use the ESR Eclipse Tool with the Enterprise Service Repository

How-to-Guide: Middleware Settings for Download of IPC Configuration (KB) Data from R/3 to CRM System

Sample Universe on Microsoft OLAP Cube

SAP Cloud Strategy - Timeless Software. Frank Stienhans on behalf of Kaj van de Loo SAP

SAP DSM/BRFPlus System Architecture Considerations

Variable Exit in Sap BI How to Start

Introducing the SAP Business One starter package. A Great Start to help you to Streamline Your Small Business

CHANNEL PARTNER (VAR) Technical Support Network. SAP Global Service & Support March 2011

Ten Reasons to Choose SAP for Enterprise Mobility. Copyright/Trademark

SAP BusinessObjects BI4.0 Upgrade Workflows

Xcelsius Dashboards on SAP NetWaver BW Implementation Best Practices

Installation Guide Customized Installation of SQL Server 2008 for an SAP System with SQL4SAP.VBS

Single Sign-On between SAP Portal and SuccessFactors

Project Governance The Role Of The Business Process Owner

Sales Planning Detailed View. SAP Enhancement Package 1 for SAP CRM 7.0 CRM Sales - SFA

Transcription:

OData in a Nutshell August 2011 INTERNAL

Objectives At the end of this module, you will be able to: Understand the OData Standard and how it works. Understand how OData uses the Atom Protocol. Understand how to pass input parameters to OData Services. 2

What is the Open Data Protocol? Gateway Core Technology REST Service Adaptation Metadata Repository Service Adaptation OData with SAP Annotations Supportability Monitoring Security Based on industry standards - HTTP, XML, Atom REST-based architecture - Based on the HTTP protocol Atom is a combination of two standards - Atom Syndication Protocol and Atom Publishing Protocol - XML Based OData for SAP OData Atom XML HTTP OData http://www.odata.org - Defines Data Types, Service Metadata, Service Runtime - Allows for Entity Relationships and Dynamic Navigation ODBC for the Web 3

REST Representational State Transfer REST is a set of architectural principals that can be used to define Web Services. First introduced by Roy Fielding in his doctorial dissertation in the year 2000. HTTP protocol is an example of a system that implements the principles of REST. Uses HTTP verbs to communicate what action to take. Verbs map to CRUD methods: HTTP Verb POST GET PUT DELETE CRUD Method Create Read Update Delete URL is used to define the resource that is being acted upon. Example: http://servername:http_port/sap/customer/12345 Customer entity Customer ID 12345 4

Atom Atom is the combination of two standards: Atom Syndication Format and Atom Publishing Protocol Atom standards were originally created for publishing and subscribing to web based content (news reports, blogs, etc.). Atom Syndication Format Defines the format for document feeds. In OData, the documents are the data being acted upon (Business Objects, etc). Atom Publishing Protocol Defines how to read and maintain documents. Atom uses GET, POST, PUT, DELETE HTTP verbs as described the REST architecture. 5

ODBC for the Web OData can be used to access table like structures much the same way ODBC does. Entity Data Model (EDM) used to describe OData Services. EDM modeling tools available to model OData Services: Each entity can support Create, Read, Update, and Delete (CRUD) operations Can navigate relationships Complex Types supported 6

OData Metadata OData defines a Metadata format based on the Entity Data Model in XML (edmx). To access a service s metadata document use the $metadata command: The returned document is the service s edmx metadata + SAP Metadata (S-Data): 7

Atom in OData Details 8

Atom in OData Details Continued Atom Feed Defined Atom Content the business object data 9

Atom in OData Details Continued Atom Feed Defined Atom links where to get more information about the entity 10

OData for SAP Extra Metadata OData for SAP is extra metadata that can be found in the service s metadata document To access a service s metadata document use the $metadata alias: The returned document is the service s edmx metadata + SAP Metadata (S-Data): OData for SAP contains: labels, annotations, etc. Extra metadata that can be accessed via SAP proxy generators. 11

OData Operations RetrieveEntitySet (QUERY) OData defines a RetrieveEntitySet request to search for entities in an entity set. It returns a list of matching entities. Use HTTP GET verb to retrieve a feed of entities from an entity set. The URL only contains the name of the entity set and any needed query string parameters: http://usphlrig15.phl.sap.corp:8001/sap/iw/rest/odata/sap/bankgeboodata/bankcollection Query string parameters defined by OData: $filter user for passing input parameters, example: $filter=airlineid EQ US Other operators supported, GT, LT, AND, OR, etc. Learn more on OData website. $top used for getting the top X results, example: $top=5 returns the first 5 results $skip used to skip ahead X number of entities in the returned list, example: $skip=5, skips the first 5 results in the list. Often combined with $top to page thru a list, example: $top=5&$skip=5 returns the second 5 results in the list. Many others defined by OData. Note: not all supported by Gateway. 12

OData Operations RetrieveEntity (READ) The RetrieveEntity operation returns the details of a specific entity. Use HTTP GET verb to execute the RetrieveEntity operation. The URL of the RetrieveEntity operation is just the RetrieveEntitySet operation URL with the addition of the key properties Note: Each Entity returned by the RetrieveEntitySet operation will contain an HREF link to the RetrieveEntity operation for that entity: 13

OData Operations InsertEntity (CREATE) The InsertEntity operation creates an entity. Use HTTP POST verb to execute the InsertEntity operation. The URL used to execute the InsertEntity operation is the exact same used for executing the RetrieveEntitySet operation. The Request Header most include the attribute x-requested-with: The Body of the request must contain the Atom Entry that represents the business entity to be created: 14

OData Operations InsertEntity Continued The InsertEntity operation creates an entity. Successful execution of the operation returns HTTP 201 status code along with the location of the newly created entity will be returned. Successful Response Header: Successful Response Body: 15

OData Operations UpdateEntity (UPDATE) The UpdateEntity operation updates an entity. Use HTTP PUT verb to execute the UpdateEntity operation. The URL used to execute the UpdateEntity operation is the exact same used for executing the RetrieveEntity operation. The Request Header most include the attribute x-requested-with: The Body of the request must contain the Atom Entry that represents the business entity to be updated: 16

OData Operations UpdateEntity Continued The UpdateEntity request changes an entity. If the update is successful, the server responds with: Successful Response Header 204 HTTP Response Code: As the response code text above signifies, no data is returned in the Response Body: 17

Summary You should now be able to Understand the OData Standard and how it works. Understand how OData uses the Atom Protocol. Understand how to pass input parameters to OData Services. 18

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