NetWeaver Gateway and OData basics



Similar documents
Data Integration using Integration Gateway. SAP Mobile Platform 3.0 SP02

OData in a Nutshell. August 2011 INTERNAL

SAP HANA Cloud Integration CUSTOMER

Unlock the Value of Your Microsoft and SAP Software Investments

How-To Guide SAP Cloud for Customer Document Version: How to Configure SAP HCI basic authentication for SAP Cloud for Customer

Real-Time Reconciliation of Invoice and Goods Receipts powered by SAP HANA. Stefan Karl, Finance Solutions, SAP ASUG Presentation, May 2013

SAP Project Portfolio Monitoring Rapid- Deployment Solution: Software Requirements

SAP ERP E-Commerce and SAP CRM Web Channel Enablement versions available on the market

R49 Using SAP Payment Engine for payment transactions. Process Diagram

SAP Fiori Architecture overview

SAP HANA Live & SAP BW Data Integration A Case Study

Landscape Deployment Recommendations for. SAP Fiori Front-End Server

SEPA in SAP CRM. Application Innovation, CRM & Service Industries. Customer

SAP 3D Visual Enterprise Rapid-Deployment Solution

Integration capabilities of SAP S/4HANA to SAP Cloud Solutions

SAP BW on HANA & HANA Smart Data Access Setup

Software Requirements

Getting Started with the License Administration Workbench 2.0 (LAW 2.0)

SAP Fiori Infrastructure rapid-deployment solution: Software and Delivery Requirements

How To Make Your Software More Secure

SBOP Analysis 2.1, edition for Microsoft Office Additional PAM Information

ITM204 Post-Copy Automation for SAP NetWeaver Business Warehouse System Landscapes. October 2013

How-To Guide SAP NetWeaver Document Version: How To Guide - Configure SSL in ABAP System

Agentry and SMP Metadata Performance Testing Guidelines for executing performance testing with Agentry and SAP Mobile Platform Metadata based

SAP BusinessObjects Business Intelligence 4.1 One Strategy for Enterprise BI. May 2013

How-To Guide SAP Cloud for Customer Document Version: How to Perform Initial Load of data from SAP ERP to SAP Cloud for Customer

Rapid database migration of SAP Business Suite to SAP HANA (V4.10): Software and Delivery Requirements. SAP HANA November 2014 English

SAP Cloud for Customer integration with SAP ERP: Software and Delivery Requirements

SAP ERP EMPLOYEE INTERACTION CENTER

Duet Enterprise Add SAP ERP Reports and SAP BI Queries/Workbooks to Duet Enterprise Configuration

SAP Payroll Processing control center rapiddeployment

Quick Guide to Implementing the SAP Extended Financial Planning rapiddeployment

Installing and Configuring the HANA Cloud Connector for On-premise OData Access

Ariba Procure-to-Pay Integration rapiddeployment

How to Extend a Fiori Application: Purchase Order Approval

SAP Mobile Documents. December, 2015

SAP Fiori - Architecture

How-To Guide SAP Cloud for Customer Document Version: How to replicate marketing attributes from SAP CRM to SAP Cloud for Customer

Software and Delivery Requirements

GR5 Access Request. Process Diagram

SAP Solution Manager: The IT Solution from SAP for IT Service Management and More

Integration Capabilities of SAP S/4HANA to SAP Cloud Solutions

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

SAP Business Intelligence Adoption V6.41: Software and Delivery Requirements. SAP Business Intelligence Adoption February 2015 English

SAP Best Practices for SAP Mobile Secure Cloud Configuration March 2015

My Inbox in SAP Fiori Simplifying Workflow for End Users

Open Items Analytics Dashboard System Configuration

SAP Document Center. May Public

Setting up Visual Enterprise Integration (WM6)

How to Extend SAP Cloud for Customer - SAP On- Premise Pre-Packaged Integration Content (PI/HCI)

MLP: Simpler Processes and Improved Usability with SAP Customer Relationship Management

SAP Working Capital Analytics Overview. SAP Business Suite Application Innovation January 2014

SAP MII for Manufacturing rapid-deployment solution: Software Requirements

Nearline Storage for Big Data combined with SAP HANA. Prof. Dr. Detlev Steinbinder, PBS Software GmbH

Installation Guide: Agentry Device Clients SAP Mobile Platform 2.3

Contents. About this Support Package / Patch...5. To install the EPM Add-in for Microsoft Office Support Package 15 / Patch XX...

Week 2 Unit 1: Database Schemas and Database Tables

How to Implement Mash Up to Show ECC Screen in SAP Cloud for Customer

SAP's Cloud Strategy for the Mining and Metals Industry Prepare for the places the cloud will take your business

How to Configure an Example SAP Cloud Applications Studio (PDI) Solution for SAP Cloud for Customer

Two UX Solutions Now Included with SAP Software

SAP Sales and Operations Planning

Extend the SAP FIORI app HCM Timesheet Approval

Process Archiving using NetWeaver Business Process Management

Integrate, Automate, and Personalize Business Communications with Greater Ease

Additional Guide to Implementing the SAP CRM Service Management rapiddeployment

Software and Delivery Requirements

SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis

Upgrade: SAP Mobile Platform Server for Windows SAP Mobile Platform 3.0 SP02

SAP BusinessObjects Design Studio Deep Dive. Ian Mayor and David Stocker SAP Session 0112

How-to guide: Monitoring of standalone Hosts. This guide explains how you can enable monitoring for standalone hosts in SAP Solution Manager

SFSF EC to 3 rd party payroll Integration Software and Delivery Requirements

Extract Archived Data from SAP ERP

SAP BusinessObjects Cloud

Integration of Universal Worklist into Microsoft Office SharePoint

SAP BusinessObjects BI Clients

SAP Gateway for Microsoft SAP AG or an SAP affiliate company. All rights reserved. I Copyright 2015 Microsoft Corporation. All rights reserved.

Complementary Demo Guide

SAP Operational Process Intelligence Security Guide

Sending Additional Files from SAP Netweaver PI to third Party System

Certification Guide Network Connectivity for SAP on Premise and Cloud Solutions Integration

SAP HANA Cloud Integration Document Version: Template Guide for SAP Sales and Operations Planning

Xcelsius Dashboards on SAP NetWaver BW Implementation Best Practices

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

SAP BusinessObjects Design Studio Document Version: What's New Guide: SAP BusinessObjects Design Studio

Master Data Governance Find Out How SAP Business Suite powered by SAP HANA Delivers Business Value in Real Time

How To... Model a Gateway Service Based on Business Entities

Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration. : SAP Labs India Pvt.Ltd

SAP BusinessObjects Analysis, edition for Microsoft Office Document Version: What's New Guide

Software and Delivery Requirements

Developing Applications for Integration between PI and SAP ERP in Different Network Domains or Landscapes

Price and Revenue Management - Manual Price Changes. SAP Best Practices for Retail

SAP DSM/BRFPlus System Architecture Considerations

SAP Business Intelligence Adoption V7.41:Software and Delivery Requirements. SAP Business Intelligence Adoption August 2015 English

How To Use An Automotive Consulting Solution In Ansap

Create Mobile, Compelling Dashboards with Trusted Business Warehouse Data

Transcription:

NetWeaver Gateway and OData basics

Objectives Seeing SAP NetWeaver Gateway as a Solution for the Multi-Channel Business Understanding the OData Protocol Developing OData Services on SAP ERP 2013 SAP AG. All rights reserved. 2

SAP NetWeaver Gateway A Solution for the Multi-Channel Business

Technology Tipping Point Requires New IT Approach Support: End-to-end scenarios New devices and experiences Consumer innovations Growing number of new agile developer communities Expansion of business data and number of decision makers Need to provide: Simple access to complex enterprise systems Manage and control mission critical systems AND deploy innovative solutions 2013 SAP AG. All rights reserved. 4

Enterprise Computing for Business Consumers Point-to-point Solutions Point-to-point solutions often lead to a duplication of both development and administrative effort due to the need to: Browser Based Applications Mobile Devices Cloud Consumer Devices Enterprise Software Develop the same application for multiple mobile operating systems Administer differing app onboarding processes SAP Business Suite The above factors then lead to: Poor scalability Increased system landscape complexity Increased administration effort CRM SRM SCM PLM ERP 2013 SAP AG. All rights reserved. 5

Enterprise Computing for Business Consumers One Data Model One API Multiple End-user Experiences Any environment, any platform, any experience Optimized for user-interaction scenarios Browser Based Applications Mobile Devices Cloud Consumer Devices Enterprise Software Suitable for any SAP Business Suite version SMP Duet Enterpris e No SAP knowledge required for consumption OData SAP NetWeaver Gateway SAP Business Suite CRM SRM SCM PLM ERP 2013 SAP AG. All rights reserved. 6

Hub Deployment: Installation of IW_BEP in the Backend SAP NetWeaver Gateway acts as a communication end point. IMPORTANT Gateway service development takes place in whichever system contains the IW_BEP addon. GW_CORE Design Time & Service Provider Runtime IW_HDB HANA IW_BEP IW_PGW PGW IW_FND OData Runtime Gateway Hub However, IW_BEP can also be installed in the SAP Business Suite system; in which case, Gateway service development takes place directly in the backend Business Suite System. ADBC SOAP SAP Business Suite Design Time & Service Provider Runtime IW_GIL BOL/ GENIL IW_BEP IW_SPI SPI RFC BOR BW WF RFC HANA BPM 2013 SAP AG. All rights reserved. 7

SAP NetWeaver Gateway Origins of the OData Protocol

What is the Open Data Protocol (OData)? OData is an open standard originally developed by Microsoft, but now managed by the Oasis Organisation. It is based on the Atom Publishing and Atom Syndication standards, which in turn, are based on XML and HTTP(S). It was designed to provide a standardised implementation of a RESTful API. In doing so, it offers database-like access to server-side resources. Hence, OData has been described as: ODBC for the Web OData is also extensible. This allows SAP to supplement the data types used by OData with extra information from the ABAP Data Dictionary. SAP Annotations OData JSON HTTP(S) Atom Publishing Atom Syndication XML 2013 SAP AG. All rights reserved. 9

What Does OData Add to Atom? The Atom Publishing Format does not specify how data should be encoded within a Feed; therefore, it fails to be fully RESTful because its messages are not self-describing. OData extends Atom by providing a metadata description of the message. OData provides definitions for: - Simple Types - Complex Types - Associations between entries - Navigation Paths between entries - Custom behaviour (known as function imports) beyond the standard QUERY, CREATE, READ, UPDATE, DELETE (QCRUD) operations SAP Annotations OData JSON HTTP Atom Publishing Atom Syndication XML 2013 SAP AG. All rights reserved. 10

Output Formats Supported by OData JSON XML 2013 SAP AG. All rights reserved. 11

SAP NetWeaver Gateway Exposing Entity Data Models Using the OData Protocol

Entity Data Model Overview An Entity Data Model (EDM) is the starting point when designing an OData service. The EDM describes the organisation and relationship of the resources within a particular business scenario. Entity Type: EDM basic building block. Represents specific business object An Entity Type is built from one or more properties At least one property must be nominated as a key field Navigation: The runtime implementation of an association Function Import: Additional operations not covered by CRUD. Association: Declares that a relationship exists between two entity types 2013 SAP AG. All rights reserved. 13

OData Service Documents The Consumption Starting Point After an Entity Data Model has been turned into an OData Service, the Gateway system will provide you with a URL to access this service. When this URL is requested, the Gateway service will respond by sending you the Service Document. The Service Document is a high-level description of the resources exposed by the OData service. 2013 SAP AG. All rights reserved. 14

Obtaining OData Metadata In order to consume an OData service, you should retrieve the metadata that describes the 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://usphlrig21.phl.sap.corp:8000/sap/[...]/$metadata This will now return an Entity Data Model (edmx) XML description of the service: 2013 SAP AG. All rights reserved. 15

SAP NetWeaver Gateway OData In Practice Retrieving Data from an OData Service

Retrieving Data from an OData service 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) ReadEntity (READ) : Returns 0..n entries from a collection : Returns 0..1 entries from a collection Both operations are read-only and therefore use the HTTP GET method. REST Operation Create a resource Retrieve one or more resources Update a resource Delete a resource HTTP Method POST GET PUT DELETE 2013 SAP AG. All rights reserved. 17

Retrieving a Collection Constructing the URL The URL can be constructed with the help of the Service Document: <app:service xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/protocols/sapdata" xml:base="http://usphlrig21.phl.sap.corp:8000/sap/opu/odata/sap/gbapp_poapproval/" xml:lang="en"> <app:workspace> <atom:title type="text">data</atom:title> <app:collection sap:creatable="false" sap:updatable="false" sap:deletable="false sap:addressable="false" sap:content-version="1" href="workflowtaskcollection"> <atom:title type="text">workflowtaskcollection</atom:title> <sap:member-title>workflowtask</sap:member-title> </app:collection> </app:workspace> <atom:link rel="self" href="[...]"/> <atom:link rel="latest-version" href="[...]"/> </app:service> http://usphlrig21.phl.sap.corp:8000/sap/[...]/workflowtaskcollection 2013 SAP AG. All rights reserved. 18

Retrieving a Collection Understanding the Results Issuing the previously constructed URL from the browser s address line will cause the Gateway server to return an OData XML message containing the requested collection. <feed xmlns="http://www.w3.org/2005/atom" xmlns:m="http://schemas.microsof... <link href="workflowtaskcollection" rel="self" title="workflowtaskcollecti <entry> <link href="workflowtaskcollection('000001106057')" rel="self" title="wo <link href="workflowtaskcollection('000001106057')/headerdetails" title= <content type="application/xml"> <m:properties> <d:workitemid>000001106057</d:workitemid> <d:tasktype>ts20000166</d:tasktype>... </m:properties> </content> </entry> <entry>... </entry> </feed> 2013 SAP AG. All rights reserved. 19

Retrieving a Collection Filtering You can filter the <feed> contents by using the $filter query string parameter. The $filter parameter can contain a complex filter structure consisting of logical, arithmetic, and grouping operators. Also available are string, date, math, and typerelated functions. /WorkflowTaskCollection?$filter=Value gt 2000 and Currency eq 'USD' would only return Workflow Tasks whose PO s total value exceeded $2000 USD. 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. Enclose non-numeric values within single quotes. 2013 SAP AG. All rights reserved. 20

Retrieving a Collection Paging If a collection has a high number of entries, then you should use the $top and $skip parameters together to implement paging. $top specifies the maximum number of entries that should be returned; $skip specifies how many entries should be ignored when selecting the results WorkflowTaskCollection?$top=5 would reduce the <feed> down to the first 5 entries. WorkflowTaskCollection?$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. 2013 SAP AG. All rights reserved. 21

Retrieving a Collection Expanding When requesting data for an entity type that is associated with other entity types, the Gateway server will provide you with a navigation URL from which you can retrieve the associated data. If you are certain that you will also need data coming from associated entity types, you can request associated data in advance by using the $expand parameter. The Gateway server will then include the data from the specified associations in the feed entries. /WorkflowTaskCollection?$expand=HeaderDetails will return a feed of purchase orders, extended with each Purchase Order s header details /WorkflowTaskCollection?$expand=HeaderDetails,HeaderDetails/ItemDetails will return a feed of purchase orders with header details, in turn extended with all the items on every PO. 2013 SAP AG. All rights reserved. 22

Retrieving a Single Entry OData employs a special resource path syntax to reference a single entity from a collection. Essentially, you specify the collection name followed by all keys and their respective values that identify the entity in question. Multiple keys are separated with a comma. /WorkflowTaskCollection(WorkitemID='000001105834') will return a single <entry> from the workflow task collection with the specified ID. You will also need this special resource path syntax when navigating between associated entities. However, the appropriate syntax is already applied in an <entry> s <link> elements: <entry> <link href="workflowtaskcollection('000001106057')" rel="self" title="wo <link href="workflowtaskcollection('000001106057')/headerdetails" title= <content type="application/xml">... </content> </entry> 2013 SAP AG. All rights reserved. 23

Retrieving a Single Value Based on an entity read, you can limit your request so it only returns a single property. The OData service will then return the property s value in plain text. This can be achieved using the $value navigation: Based on the resource path of a single entry, append the property s name as well as $value as if they were navigation paths. /WorkflowTaskCollection('000001106057')/SupplierName/$value would only return the Purchase Order s supplier name, not the entire Purchase Order. In order to limit the resulting entries to several properties, you may use the $select parameter. $select should contain a comma-separated list of property names that are to be retrieved. /WorkflowTaskCollection?$select=Value,Currency would only list total value and currency for every Purchase Order. 2013 SAP AG. All rights reserved. 24

2013 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. National product specifications may vary. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP 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. Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices. 2013 SAP AG. All rights reserved. 25