SAP Sourcing/CLM Webcast Query & User/Contact Maintenance Web Service Vikram Shanmugasundaram / SAP Sourcing/CLM Center of Excellence Ed Dunne / SAP Sourcing/CLM Product Management November 2015
SAP Sourcing / CLM 2015 Webcast Series Goal Spread the knowledge about SAP Sourcing Build and leverage the SAP Sourcing community Audience SAP Consulting and Field Services Partner Consulting SAP Sourcing Customers Upcoming Webcasts Price Validity Release 10.0 Script based Web Service 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 2
SAP Sourcing CLM 10.0 SAP Sourcing CLM release 10.0 SP8 is the latest release SAP Sourcing CLM 10.0 features - http://scn.sap.com/community/sourcing/blog/2013/12/ 20/new-features-in-sap-sourcing-sap-clm-100 Technical Overview and ERP Integration - http://scn.sap.com/docs/doc-55313 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 3
SAP Sourcing/CLM Trainings Which trainings are being offered? TSO100: Functional Training TSO150: Technical Training TSO180: Integration Training How to sign up? www.training.sap.com Search for TSO100/150/180 Contact: vikram.shanmugasundaram@sap.com 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 4
Rel. 10.0 Web Service Framework (WSF) Query & User/Contact Maintenance Web Service Features Support for REST Inbound Web Services Sourcing as a provider of custom Web Services via Query Definitions (SAP delivered or custom) Support for standard User/Supplier Contact Maintenance Web Services Web Services registration and enablement at runtime Enablement of these new web services can be done through simple configuration. No need to deploy custom jar files or shut down the Sourcing application! Authentication Models Supported OAuth 1.0a authentication support Directory Configuration Setting authentication support: Local (non-production only), LDAP, NetWeaver UME Report & Query Definition Access List Security supported Web Service logging of all WSF Web Service Requests and Responses Configurable Throttling Model implemented to protect server resources 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 5
Rel. 10.0 Web Service Framework Providing a Web Service using a Query First, create a standard Report object (Report Internal Name needs to be Custom-WebService-Queries-Report or match new System Property: odp.integration.webservice_queries) This standard Report will be the container for all of the Query Definitions that can be run as a web service. 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 6
Rel. 10.0 Web Service Framework Providing a Web Service using a Query Add to the Report the desired standard or custom Query Definition objects that will be used to provide a REST web service Query Definition objects can be added or removed as needed. Note: ONLY Query Definition objects added to this Report are available to run as REST web services 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 7
Rel. 10.0 Web Service Framework Providing a Web Service using a Query Then, use a simple Menu Action to start the SAP-delivered Web Service Definition object: REST Query Service Key Features of the Query-based Web Service: Ability to query the format of the filter parameters available at any time (as a separate web service call) Ability to provide parameters and receive results in both XML and JSON formats Ability to specify maximum number of rows/fields to return. Client program is notified if result set truncation occurs. 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 8
Rel. 10.0 Web Service Framework Logging of all WSF Web Service Requests and Responses Web service logs are stored in application and can be accessed from Setup page Advanced Search is available for filtering log entries Key information is captured including the Request and Response payloads 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 9
Additional Information on the Query Web Service Web Services Guide & Web Service Cookbook Available on Service Marketplace: http://service.sap.com/eso > SAP Sourcing On-Premise > SAP Sourcing 10.0 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 10
New User/Suppler Contact Maintenance Web Service Additional Information in Web Services Guide Ability to create, modify, or retrieve internal User Accounts or external Supplier Contacts via RESTful Web Service calls 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 11
SAP Sourcing/CLM 10.0 Query & User/Contact Web Service! DEMO 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 12
Query Web Service Demo Query Service URL Users can execute queries using the query service by making web service requests at the service URL. URL: https://<host>:<port>/<context>/ngservices/rest/query/<query_internal_name>/<method> - - params - - executeget - - execute 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 13
Query Web Service Demo To see the list of Query Definitions that the user making the web service call has rights to execute: REST Request Method: GET URL: http://tenant3:8080/ngservices/rest/query HTTP Headers: Authorization 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 14
Query Web Service Demo Query with no filters Custom Query Definition(CUSTOM-AllProjects) with no filters REST Request Method: GET URL Method: executeget URL: http://tenant3:8080/ngservices/rest/query/custom-allprojects/executeget HTTP Headers: Authorization Used when: - - Query you want to submit has no filters - - Query has filters but you want to use default values defined in the Query Definition 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 15
Query Web Service Demo Query with no filters Response: 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 16
Query Web Service Demo params REST Request Method: GET URL Method: params URL: http://tenant3:8080/ngservices/rest/query/custom-allprojectssinglefilter/params HTTP Headers: Authorization Returns the query parameters defined in the Query Definition as an XML representation 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 17
Query Web Service Demo Query with string filter Custom Query Definition(CUSTOM-AllProjectsSingleFilter) filter by project s Display Name REST Request Method: POST URL Method: execute URL: http://tenant3:8080/ngservices/rest/query/custom-allprojectssinglefilter/execute HTTP Headers: Authorization, Content-Type: application/xml Used when: - - Query you want to submit has filters Request Body: 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 18
Query Web Service Demo Query with multiple filters Custom query definition CUSTOM-AllProjectsWithFilters lists all projects and has multiple filters REST Request Method: POST URL Method: execute URL: http://tenant3:8080/ngservices/rest/query/custom-allprojectswithfilters/execute HTTP Headers: Authorization Content-Type application/xml 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 19
Query Web Service Demo Query with multiple filters Request Body: 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 20
Query Web Service Demo Query with maxrows option 1 REST Request Method: GET URL Method: executeget URL:http://tenant3:8080/ngservices/rest/query/CUSTOM- AllProductCats/executeGet?maxrows=4 HTTP Headers: Authorization 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 21
Query Web Service Demo Query with maxrows option 2 REST Request Method: POST URL Method: execute URL: http://tenant3:8080/ngservices/rest/query/custom-allproductcats/execute HTTP Headers: Authorization, Content-Type: application/xml 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 22
Query Web Service Demo Max rows The maximum number of rows returned by a query web service call is influenced by the following: odp.integration.ngservices.rest.query.max_rows_limit System Property Max rows defined in the Query Definition Max rows defined in the query web service call odp.integration.ngservices.rest.query.fields_limit System Property For more information on how max rows is determined go to: FAQ section in the Web Service Cookbook and Troubleshooting Guide Query Service Performance Recommendations and Benchmarks section in the Web Service Guide for SAP Sourcing 10.0 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 23
Query Web Service Demo Query with JSON Request and Response REST Request Method: POST URL Method: execute URL: http://tenant3:8080/ngservices/rest/query/fci-myrfpsactive/execute HTTP Headers: Authorization, Content-Type: application/json Accept: application/json 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 24
Query Web Service Demo Query with JSON Request and Response Request Body Response 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 25
Query Web Service Demo Query with cardinality filter Query Definition: REST Request Method: POST URL Method: execute URL:http://tenant3:8080/ngservices/rest/query/ODP-ODP-UsersByCountry/execute HTTP Headers: Authorization, Content-Type: application/xml 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 26
Query Web Service Demo Query with cardinality filter Body: Response: 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 27
User Maintenance Web Service Demo Retrieve a user info by user id REST Request Method: GET URL: http://tenant3:8080/services/rest/user/buyside/name/i811514 HTTP Headers: Authorization 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 28
User Maintenance Web Service Demo Retrieve a user info by email id REST Request Method: GET URL: http://tenant3:8080/services/rest/user/buyside/email/vikram.shanmugasundaram@s ap.com HTTP Headers: Authorization 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 29
User Maintenance Web Service Demo Create or Modify user info REST Request Method: POST URL: http://tenant3:8080/services/rest/user/synch HTTP Headers: Authorization, Content-Type: application/xml 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 30
Tips Service URL calls via the query web service are case sensitive Queries that contain columns with tokens that return a URL Since the value returned by the query is a link and is not very useful Queries that contain charts not very useful when calling it via query web service Hidden columns and hidden filters in the Query Definition is not shown in the query web service response Time zone in the response is the time zone of the authenticated user Cache If you start to see unexpected behavior in the response it might be a good idea to clear the cache. See instructions in the troubleshooting section of the Web Service Cookbook Max rows in the response depends on system properties, max row defined in the Query Definition, max rows in the web service request The amount of memory and processing time is proportional to the number of fields in the response. 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 31
Q&A 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 32
Thank you SAP Sourcing/CLM Center of Excellence 245 First Street, Cambridge, MA 2015 SAP SE or an SAP affiliate company. All rights reserved.
2015 SAP SE or an SAP affiliate company. 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 SE or an SAP affiliate company. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company 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. In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE s or its affiliated companies strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions. 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 34
2015 SAP SE oder ein SAP-Konzernunternehmen. Alle Rechte vorbehalten. Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP SE oder ein SAP-Konzernunternehmen nicht gestattet. SAP und andere in diesem Dokument erwähnte Produkte und Dienstleistungen von SAP sowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP SE (oder von einem SAP-Konzernunternehmen) in Deutschland und verschiedenen anderen Ländern weltweit. Weitere Hinweise und Informationen zum Markenrecht finden Sie unter http://global.sap.com/corporate-de/legal/copyright/index.epx. Die von SAP SE oder deren Vertriebsfirmen angebotenen Softwareprodukte können Softwarekomponenten auch anderer Softwarehersteller enthalten. Produkte können länderspezifische Unterschiede aufweisen. Die vorliegenden Unterlagen werden von der SAP SE oder einem SAP-Konzernunternehmen bereitgestellt und dienen ausschließlich zu Informationszwecken. Die SAP SE oder ihre Konzernunternehmen übernehmen keinerlei Haftung oder Gewährleistung für Fehler oder Unvollständigkeiten in dieser Publikation. Die SAP SE oder ein SAP-Konzernunternehmen steht lediglich für Produkte und Dienstleistungen nach der Maßgabe ein, die in der Vereinbarung über die jeweiligen Produkte und Dienstleistungen ausdrücklich geregelt ist. Keine der hierin enthaltenen Informationen ist als zusätzliche Garantie zu interpretieren. Insbesondere sind die SAP SE oder ihre Konzernunternehmen in keiner Weise verpflichtet, in dieser Publikation oder einer zugehörigen Präsentation dargestellte Geschäftsabläufe zu verfolgen oder hierin wiedergegebene Funktionen zu entwickeln oder zu veröffentlichen. Diese Publikation oder eine zugehörige Präsentation, die Strategie und etwaige künftige Entwicklungen, Produkte und/oder Plattformen der SAP SE oder ihrer Konzernunternehmen können von der SAP SE oder ihren Konzernunternehmen jederzeit und ohne Angabe von Gründen unangekündigt geändert werden. Die in dieser Publikation enthaltenen Informationen stellen keine Zusage, kein Versprechen und keine rechtliche Verpflichtung zur Lieferung von Material, Code oder Funktionen dar. Sämtliche vorausschauenden Aussagen unterliegen unterschiedlichen Risiken und Unsicherheiten, durch die die tatsächlichen Ergebnisse von den Erwartungen abweichen können. Die vorausschauenden Aussagen geben die Sicht zu dem Zeitpunkt wieder, zu dem sie getätigt wurden. Dem Leser wird empfohlen, diesen Aussagen kein übertriebenes Vertrauen zu schenken und sich bei Kaufentscheidungen nicht auf sie zu stützen. 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 35