SlideShare a Scribd company logo
APPLICATIONS
SAP Gateway
Author-Gaurav Ahuwalia
2 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
SAP Netweaver Gateway INTRODUCTION
SAP Netweaver Gateway based on
ABAP to create ODAta Services
DAY - 1
3 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Agenda for DAY 1
• Introduction to SAP NetWeaver Gateway
 
• Deployment Options
• Introduction to REST
• Introduction to OData
• Walkthrough SAP NetWeaver Gateway Service Builder
4 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
SAP Gateway ( BOR / RFC )
DAY - 2
SAP Netweaver Gateway based on
ABAP to create ODAta Services
5 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Agenda for DAY 2
• Netweaver Gateway Road Map from SAP
• Creating a Odata Service from BOR/RFC
• Odata Query Options
6 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Technical skills required for
gateway development
 ABAP
 OOABAP
7 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
SAP NetWeaver Gateway Architecture part 1
8 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
SAP NetWeaver Gateway Architecture part 2
9 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
SAP Netweaver Gateway Deployment Options Part 1
1 Hub Deployment with Service Development in the SAP Business Suite Backend
Advantages of this scenario:
•Routing and composition of multiple systems is
supported
•Single point of access to backend systems
•Hub system can be based on a newer release
(7.31 or 7.40) that supports additional
authentication options (Kerberos, SAML Browser
protocol)
•Hub system can be based on a newer release
(7.31 or 7.40) that supports SAPUI5
•Enhanced security because of no direct access to
the backend system
•Direct local access to metadata (DDIC) and
business data, meaning easy reuse of data
10 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
SAP Netweaver Gateway Deployment Options Part 2
Advantages of this scenario in addition
to the ones mentioned in the 1st
scenario:
No need to install (and upgrade) SAP
Gateway components in the backend
Services developed by partners do not
need any deployment in the backend
systems
Disadvantages:
Access is limited to remote-enabled
interfaces (RFC function modules, BAPIs,
BW Easy Queries, SPI Objects)
Remote-enabled interfaces might not be
optimally suited (e.g. they might not offer
appropriate filter options)
GENIL objects cannot be accessed
remotely
Additional server needed for SAP
Gateway
No direct local access to metadata
(DDIC) and business data, meaning reuse
of data is limited to remote access as
mentioned above
2.Hub Deployment with Service Development in the SAP Gateway Hub
11 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
SAP Netweaver Gateway Deployment Options Part 3
Advantages:
•Less runtime overhead as remote calls
are reduced.
Disadvantages:
•If multiple SAP Business Suite
systems are used, SAP Gateway
system would have to be configured
multiple times
•If embedded deployment is chosen,
the system must not be used as a hub
for additional backend systems. As a
result Routing and composition cannot
be used.
•Upgrade of components in a SAP
Business Suite backend system is
usually only possible once or twice a
year for larger companies
Additional security component needed
for extranet scenarios.
3. Embedded SAP Business Suite Deployment and Service
Development
12 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
SAP Netweaver Gateway Development Life Cycle
13 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
REST - The Foundation of the World Wide Web
Rest defines 6 architecture constrains
14 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
REST - The Foundation of the World Wide Web
REST stands for Representational State Transfer
It is an architectural pattern for developing web services as opposed to a specification.
REST web services communicate over the HTTP specification, using HTTP vocabulary:
Methods (GET, POST, etc.)
HTTP URI syntax (paths, parameters, etc.)
Media types (xml, json, html, plain text, etc)
HTTP Response codes.
Representational
Clients possess the information necessary to identify, modify, and/or delete a web resource.
State
All resource state information is stored on the client.
Transfer
Client state is passed from the client to the service through HTTP.
15 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
REST - The Foundation of the World Wide Web
The six characteristics of REST:
1.Uniform interface
2.Decoupled client-server interaction
3.Stateless
4.Cacheable
5.Layered
6.Extensible through code on demand (optional)
•Services that do not conform to the above required
contstraints are not strictly RESTful web services.
16 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
HTTP - An Implementation of the Principles of REST
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:
17 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Introduction to OData
18 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Introduction to OData
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.Ÿ
19 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Introduction to OData
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
20 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Atom in OData Details
Introduction to OData
21 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Introduction to OData
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):
22 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Atom in OData Details
Introduction to OData
23 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Introduction to OData
OData for SAP– Extra Metadata
OData for SAP is extra metadata that can be found in the service’s metadata
OData for SAP contains: labels, annotations, etc.Extra metadata that can be accessed
via SAP proxy generators.
24 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Gateway Service Builder development options
25 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Gateway Service Builder Tcode SEGW
Step: Create a new project in the Service Builder
(transaction SEGW)
26 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.1
27 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.2
Step: Import DDIC Structure to create the entity - Product
1. Right-click Data Model and choose Import DDIC Structure
28 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.3
Enter the following value in the wizard and then press Enter: ABAP Structure:
BAPI_EPM_PRODUCT_HEADER
and press ENTER.
Result:
The wizard will automatically fill the field ObjectName with the value BapiEpmProductHeader and
create an entity set based on the DDIC structure.
3. Change the default values such that
a. the property PRODUCT_ID becomes a key field
b. the name of the entity type is Product rather than BapiEpmProductHeader
29 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.4
Press continue .
Press Save.
30 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.5
Step: Create an entity set for the previously created entity
1. Expand the node Data Model and double-click Entity Sets:
2. Click the Create button to a new line to the table:
31 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.6
Enter the following values:
32 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.7
Task 2: Generate runtime objects and register and activate the service
1. Choose the Generate pushbutton:
33 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.8
2. Leave the default values and choose Enter:
34 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 0.9
Choose Local Object:
35 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Creating/Implementing a Odata Service part 1.0
Verify that the runtime objects have been generated successfully:
The following objects have been generated:
36 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Operating BOR/RFC Generator 0.1
Step 1: Create EnityType and EntitySet for TimeConfirmation.
At task 1 you created a structure that reflects that contains all attributes of the entity time
confirmation. To create the EntityType and EntitySet TimeConfirmation left click on DataModel at
the navigation tree and choose import RFC/BOR Interface
37 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Operating BOR/RFC Generator 0.2
At the first step of the wizard you specify the name of the EnityType. Choose Remote Function Call and
use the Function Z_GW_TIMECONF_GET_ENTITY. Make sure that you have ticked “Create Default Entity
Set”. So you don’t need to create the entity set later on.
Choose all properties of ENTITY data source parameter.
38 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Operating BOR/RFC Generator 0.3
Repeat the same steps described at Step 1: Create EnityType and EntitySet of TimeConfirmation.  to
create the EntityType and EntitySet for Attendance and Absence Types.
1.Use Context Menu of Data Model to choose import and RFC/BOR interface.
2.At the first step of the wizard specify AttendanceAbsenceType as EntityTypeName and
Z_GW_TIMECONF_GET_ATT_ABS as the function name.
3.At the second step of the wizard choose AWART and ATEXT of the parameter ATTENDANCE_ABSENCE
4.Choose a meaningful name for AWART and ATEXT like in the screenshot below.
5.Check “Is Key” for AWART
39 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Operating BOR/RFC Generator 0.4
Create an association
40 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Operating BOR/RFC Generator 0.5
Step 1: Create the Mapping for the EntitySet
AttaendanceAbsenceTypeSe
GetEntity
Left click at CreateEntity of AttendanceAbsenceTypeSet in the section Service Implementation. At the
context menu choose Map to Data Sourc
41 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Operating BOR/RFC Generator 0.6
Choose Remote Function Call and the function
Z_GW_TIMECONF_GET_ATT_ABS.
More On http://scn.sap.com/docs/DOC-55554 for BOR RFC Generators
42 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Odata Query Options part1
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:
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.
43 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Odata Query Options part2
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:
44 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Odata Query Options part3
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:
45 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Odata Query Options part4
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:
46 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
Odata Query Options part4
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:
47 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
OData Operations – UpdateEntity Continued
Odata Query Options part4
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:
48 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015
ANY QUESTIONS?
END OF DAY

More Related Content

PDF
Moving OBIEE to Oracle Analytics Cloud
PPTX
From BI Developer to Data Engineer with Oracle Analytics Cloud, Data Lake
PPTX
Building a marketing data lake
PPTX
OData External Data Integration Strategies for SaaS
PPTX
Building a data-driven authorization framework
PDF
Pivotal: Operationalizing 1000 Node Hadoop Cluster - Analytics Workbench
 
PDF
EMC Pivotal overview deck
PDF
Obiee 12C and the Leap Forward in Lifecycle Management
Moving OBIEE to Oracle Analytics Cloud
From BI Developer to Data Engineer with Oracle Analytics Cloud, Data Lake
Building a marketing data lake
OData External Data Integration Strategies for SaaS
Building a data-driven authorization framework
Pivotal: Operationalizing 1000 Node Hadoop Cluster - Analytics Workbench
 
EMC Pivotal overview deck
Obiee 12C and the Leap Forward in Lifecycle Management

What's hot (20)

PDF
Snowflake: The most cost-effective agile and scalable data warehouse ever!
PPTX
OData and the future of business objects universes
PDF
SAP goes Cloud - Plans, strategies and investment plans of German companies
PPTX
Journey to Marketing Data Lake [BRK1098]
PPTX
Oracle Openworld Presentation with Paul Kent (SAS) on Big Data Appliance and ...
PPTX
Leveraging partition enhancements
PDF
2009.10.22 S308460 Cloud Data Services
PPTX
SDA - POC
PDF
3. hp oracle romania nov 3rd final
PDF
Big Data, Big Thinking: Simplified Architecture Webinar Fact Sheet
PPTX
Overview on What’s New in SAP Cloud Platform Business Rules
PPTX
Next gen tooling for building streaming analytics apps: code-less development...
PDF
SAP BusinessObjects Private Cloud Edition (PCE)
PDF
SQL Anywhere and the Internet of Things
PPTX
IBM THINK 2018 - IBM Cloud SQL Query Introduction
PPT
Hadoop India Summit, Feb 2011 - Informatica
PPTX
HANA SPS07 Smart Data Access
PPTX
Introduction to Apache NiFi - Seattle Scalability Meetup
PDF
4. novensys oracle day_2010_gabriel_pavel_2
PPTX
Talend MDM
Snowflake: The most cost-effective agile and scalable data warehouse ever!
OData and the future of business objects universes
SAP goes Cloud - Plans, strategies and investment plans of German companies
Journey to Marketing Data Lake [BRK1098]
Oracle Openworld Presentation with Paul Kent (SAS) on Big Data Appliance and ...
Leveraging partition enhancements
2009.10.22 S308460 Cloud Data Services
SDA - POC
3. hp oracle romania nov 3rd final
Big Data, Big Thinking: Simplified Architecture Webinar Fact Sheet
Overview on What’s New in SAP Cloud Platform Business Rules
Next gen tooling for building streaming analytics apps: code-less development...
SAP BusinessObjects Private Cloud Edition (PCE)
SQL Anywhere and the Internet of Things
IBM THINK 2018 - IBM Cloud SQL Query Introduction
Hadoop India Summit, Feb 2011 - Informatica
HANA SPS07 Smart Data Access
Introduction to Apache NiFi - Seattle Scalability Meetup
4. novensys oracle day_2010_gabriel_pavel_2
Talend MDM
Ad

Viewers also liked (20)

PDF
CMMI an Overview
PDF
Microservices based Application Integration for SaaS, Hybrid Clouds and IoT
PDF
MAHESH SAP FI NOTES
PDF
Finit Hyperion Planning & PBCS Simplified User Interface
PPTX
The Future of Application integration
PDF
Hyperion Planning Overview
PDF
Sap fiori ll11 – consultants should know about o data troubleshooting sap b...
PPTX
OData - The Universal REST API
PDF
SAP HANA Cloud Security
PDF
Sap fico Study material
PDF
Integration: The $100 Billion Opportunity No One Wants to Talk About
PDF
DAY1- DAY2Netweaver gateway
PDF
Gateway Deployment Options
PDF
DAY1- DAY2Netweaver gateway
PPTX
Build an Application Integration Strategy
DOC
Planning learn step by step
PPTX
SAP Fiori Development from Scratch
DOC
Các giải pháp marketing nhằm nâng cao doanh thu tại công ty tnhh thương mại v...
PDF
SAP MM Configuration Step by Step guide by Tata Mcgraw hill
PDF
SAP S/4 HANA - SAP sFIN (Simple Finance) - Financial Reporting and Advanced A...
CMMI an Overview
Microservices based Application Integration for SaaS, Hybrid Clouds and IoT
MAHESH SAP FI NOTES
Finit Hyperion Planning & PBCS Simplified User Interface
The Future of Application integration
Hyperion Planning Overview
Sap fiori ll11 – consultants should know about o data troubleshooting sap b...
OData - The Universal REST API
SAP HANA Cloud Security
Sap fico Study material
Integration: The $100 Billion Opportunity No One Wants to Talk About
DAY1- DAY2Netweaver gateway
Gateway Deployment Options
DAY1- DAY2Netweaver gateway
Build an Application Integration Strategy
Planning learn step by step
SAP Fiori Development from Scratch
Các giải pháp marketing nhằm nâng cao doanh thu tại công ty tnhh thương mại v...
SAP MM Configuration Step by Step guide by Tata Mcgraw hill
SAP S/4 HANA - SAP sFIN (Simple Finance) - Financial Reporting and Advanced A...
Ad

Similar to DAY1- DAY2Netweaver gateway (20)

PPTX
SAP FIORI COEP Pune - pavan golesar (ppt)
PPTX
Introduction to OData and SAP NetWeaver Gateway.pptx
PDF
REST - What's It All About? (SAP TechEd 2012, CD110)
PPTX
Introduction to SAP Gateway and OData
PDF
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
PDF
Document_format_for_OData_In_A_Nutshell.pdf
PDF
Autodesk Technical Webinar: SAP NetWeaver Gateway Part 1
PPTX
Building RESTfull Data Services with WebAPI
PPTX
W8/WP8 App Dev for SAP, Part 1B: Service Generation with NetWeaver Gateway Fr...
PPTX
OData Introduction and Impact on API Design (Webcast)
PDF
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
PPTX
REST: So What's It All About? (SAP TechEd 2011, MOB107)
PDF
webMethods World: How Can You Innovate Even Faster With the Latest webMethods...
PPTX
W8/WP8 App Dev for SAP, Part 1A: Service Development with NetWeaver Gateway S...
DOCX
TECHNICAL SET UPXXXXXXXXXXXXXXXXXXX.docx
DOCX
PDF
NetWeaver Gateway- Introduction to REST
PPTX
OData: A Standard API for Data Access
PDF
SAP NetWeaver Gateway - Introduction
SAP FIORI COEP Pune - pavan golesar (ppt)
Introduction to OData and SAP NetWeaver Gateway.pptx
REST - What's It All About? (SAP TechEd 2012, CD110)
Introduction to SAP Gateway and OData
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
Document_format_for_OData_In_A_Nutshell.pdf
Autodesk Technical Webinar: SAP NetWeaver Gateway Part 1
Building RESTfull Data Services with WebAPI
W8/WP8 App Dev for SAP, Part 1B: Service Generation with NetWeaver Gateway Fr...
OData Introduction and Impact on API Design (Webcast)
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
REST: So What's It All About? (SAP TechEd 2011, MOB107)
webMethods World: How Can You Innovate Even Faster With the Latest webMethods...
W8/WP8 App Dev for SAP, Part 1A: Service Development with NetWeaver Gateway S...
TECHNICAL SET UPXXXXXXXXXXXXXXXXXXX.docx
NetWeaver Gateway- Introduction to REST
OData: A Standard API for Data Access
SAP NetWeaver Gateway - Introduction

More from Gaurav Ahluwalia (6)

PDF
Agile Methodologies in SAP
PDF
259881368-Gartner-Research-ERP
PDF
2015-cloud-security-report-q2
PDF
Event Stream Processing SAP
PDF
Git Hub Platform
PDF
SAP Self Services Technologies Going Forward
Agile Methodologies in SAP
259881368-Gartner-Research-ERP
2015-cloud-security-report-q2
Event Stream Processing SAP
Git Hub Platform
SAP Self Services Technologies Going Forward

DAY1- DAY2Netweaver gateway

  • 2. 2 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 SAP Netweaver Gateway INTRODUCTION SAP Netweaver Gateway based on ABAP to create ODAta Services DAY - 1
  • 3. 3 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Agenda for DAY 1 • Introduction to SAP NetWeaver Gateway   • Deployment Options • Introduction to REST • Introduction to OData • Walkthrough SAP NetWeaver Gateway Service Builder
  • 4. 4 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 SAP Gateway ( BOR / RFC ) DAY - 2 SAP Netweaver Gateway based on ABAP to create ODAta Services
  • 5. 5 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Agenda for DAY 2 • Netweaver Gateway Road Map from SAP • Creating a Odata Service from BOR/RFC • Odata Query Options
  • 6. 6 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Technical skills required for gateway development  ABAP  OOABAP
  • 7. 7 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 SAP NetWeaver Gateway Architecture part 1
  • 8. 8 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 SAP NetWeaver Gateway Architecture part 2
  • 9. 9 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 SAP Netweaver Gateway Deployment Options Part 1 1 Hub Deployment with Service Development in the SAP Business Suite Backend Advantages of this scenario: •Routing and composition of multiple systems is supported •Single point of access to backend systems •Hub system can be based on a newer release (7.31 or 7.40) that supports additional authentication options (Kerberos, SAML Browser protocol) •Hub system can be based on a newer release (7.31 or 7.40) that supports SAPUI5 •Enhanced security because of no direct access to the backend system •Direct local access to metadata (DDIC) and business data, meaning easy reuse of data
  • 10. 10 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 SAP Netweaver Gateway Deployment Options Part 2 Advantages of this scenario in addition to the ones mentioned in the 1st scenario: No need to install (and upgrade) SAP Gateway components in the backend Services developed by partners do not need any deployment in the backend systems Disadvantages: Access is limited to remote-enabled interfaces (RFC function modules, BAPIs, BW Easy Queries, SPI Objects) Remote-enabled interfaces might not be optimally suited (e.g. they might not offer appropriate filter options) GENIL objects cannot be accessed remotely Additional server needed for SAP Gateway No direct local access to metadata (DDIC) and business data, meaning reuse of data is limited to remote access as mentioned above 2.Hub Deployment with Service Development in the SAP Gateway Hub
  • 11. 11 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 SAP Netweaver Gateway Deployment Options Part 3 Advantages: •Less runtime overhead as remote calls are reduced. Disadvantages: •If multiple SAP Business Suite systems are used, SAP Gateway system would have to be configured multiple times •If embedded deployment is chosen, the system must not be used as a hub for additional backend systems. As a result Routing and composition cannot be used. •Upgrade of components in a SAP Business Suite backend system is usually only possible once or twice a year for larger companies Additional security component needed for extranet scenarios. 3. Embedded SAP Business Suite Deployment and Service Development
  • 12. 12 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 SAP Netweaver Gateway Development Life Cycle
  • 13. 13 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 REST - The Foundation of the World Wide Web Rest defines 6 architecture constrains
  • 14. 14 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 REST - The Foundation of the World Wide Web REST stands for Representational State Transfer It is an architectural pattern for developing web services as opposed to a specification. REST web services communicate over the HTTP specification, using HTTP vocabulary: Methods (GET, POST, etc.) HTTP URI syntax (paths, parameters, etc.) Media types (xml, json, html, plain text, etc) HTTP Response codes. Representational Clients possess the information necessary to identify, modify, and/or delete a web resource. State All resource state information is stored on the client. Transfer Client state is passed from the client to the service through HTTP.
  • 15. 15 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 REST - The Foundation of the World Wide Web The six characteristics of REST: 1.Uniform interface 2.Decoupled client-server interaction 3.Stateless 4.Cacheable 5.Layered 6.Extensible through code on demand (optional) •Services that do not conform to the above required contstraints are not strictly RESTful web services.
  • 16. 16 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 HTTP - An Implementation of the Principles of REST 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:
  • 17. 17 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Introduction to OData
  • 18. 18 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Introduction to OData 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.Ÿ
  • 19. 19 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Introduction to OData 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
  • 20. 20 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Atom in OData Details Introduction to OData
  • 21. 21 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Introduction to OData 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):
  • 22. 22 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Atom in OData Details Introduction to OData
  • 23. 23 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Introduction to OData OData for SAP– Extra Metadata OData for SAP is extra metadata that can be found in the service’s metadata OData for SAP contains: labels, annotations, etc.Extra metadata that can be accessed via SAP proxy generators.
  • 24. 24 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Gateway Service Builder development options
  • 25. 25 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Gateway Service Builder Tcode SEGW Step: Create a new project in the Service Builder (transaction SEGW)
  • 26. 26 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.1
  • 27. 27 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.2 Step: Import DDIC Structure to create the entity - Product 1. Right-click Data Model and choose Import DDIC Structure
  • 28. 28 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.3 Enter the following value in the wizard and then press Enter: ABAP Structure: BAPI_EPM_PRODUCT_HEADER and press ENTER. Result: The wizard will automatically fill the field ObjectName with the value BapiEpmProductHeader and create an entity set based on the DDIC structure. 3. Change the default values such that a. the property PRODUCT_ID becomes a key field b. the name of the entity type is Product rather than BapiEpmProductHeader
  • 29. 29 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.4 Press continue . Press Save.
  • 30. 30 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.5 Step: Create an entity set for the previously created entity 1. Expand the node Data Model and double-click Entity Sets: 2. Click the Create button to a new line to the table:
  • 31. 31 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.6 Enter the following values:
  • 32. 32 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.7 Task 2: Generate runtime objects and register and activate the service 1. Choose the Generate pushbutton:
  • 33. 33 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.8 2. Leave the default values and choose Enter:
  • 34. 34 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 0.9 Choose Local Object:
  • 35. 35 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Creating/Implementing a Odata Service part 1.0 Verify that the runtime objects have been generated successfully: The following objects have been generated:
  • 36. 36 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Operating BOR/RFC Generator 0.1 Step 1: Create EnityType and EntitySet for TimeConfirmation. At task 1 you created a structure that reflects that contains all attributes of the entity time confirmation. To create the EntityType and EntitySet TimeConfirmation left click on DataModel at the navigation tree and choose import RFC/BOR Interface
  • 37. 37 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Operating BOR/RFC Generator 0.2 At the first step of the wizard you specify the name of the EnityType. Choose Remote Function Call and use the Function Z_GW_TIMECONF_GET_ENTITY. Make sure that you have ticked “Create Default Entity Set”. So you don’t need to create the entity set later on. Choose all properties of ENTITY data source parameter.
  • 38. 38 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Operating BOR/RFC Generator 0.3 Repeat the same steps described at Step 1: Create EnityType and EntitySet of TimeConfirmation.  to create the EntityType and EntitySet for Attendance and Absence Types. 1.Use Context Menu of Data Model to choose import and RFC/BOR interface. 2.At the first step of the wizard specify AttendanceAbsenceType as EntityTypeName and Z_GW_TIMECONF_GET_ATT_ABS as the function name. 3.At the second step of the wizard choose AWART and ATEXT of the parameter ATTENDANCE_ABSENCE 4.Choose a meaningful name for AWART and ATEXT like in the screenshot below. 5.Check “Is Key” for AWART
  • 39. 39 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Operating BOR/RFC Generator 0.4 Create an association
  • 40. 40 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Operating BOR/RFC Generator 0.5 Step 1: Create the Mapping for the EntitySet AttaendanceAbsenceTypeSe GetEntity Left click at CreateEntity of AttendanceAbsenceTypeSet in the section Service Implementation. At the context menu choose Map to Data Sourc
  • 41. 41 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Operating BOR/RFC Generator 0.6 Choose Remote Function Call and the function Z_GW_TIMECONF_GET_ATT_ABS. More On http://scn.sap.com/docs/DOC-55554 for BOR RFC Generators
  • 42. 42 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Odata Query Options part1 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: 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.
  • 43. 43 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Odata Query Options part2 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:
  • 44. 44 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Odata Query Options part3 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:
  • 45. 45 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Odata Query Options part4 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:
  • 46. 46 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 Odata Query Options part4 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:
  • 47. 47 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 OData Operations – UpdateEntity Continued Odata Query Options part4 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:
  • 48. 48 | 13 August 2015 | Proprietary and confidential information. © Mphasis 2015 ANY QUESTIONS? END OF DAY