Table of Contents

Open all
Close all
Foreword by Jürgen Müller
17
Introduction
19
Acknowledgments
23
PART I: Getting Started
25
1 Introduction to SAP Gateway
27
1.1 Modern Business Applications
28
1.1.1 User Interfaces
29
1.1.2 Infrastructures
36
1.2 SAP Gateway for Modern Business Applications
39
1.3 SAP Gateway in SAP S/4HANA
43
1.4 Installation and Deployment
45
1.4.1 Installation
45
1.4.2 Deployment
48
1.5 SAP Gateway and Related Products
52
1.5.1 SAP Business Technology Platform
52
1.5.2 SAP Integration Suite
53
1.5.3 SAP Extensibility
53
1.5.4 SAP Process Orchestration
54
1.5.5 SAP HANA
54
1.5.6 SAP Business Warehouse and SAP BW/4HANA
55
1.5.7 SAP BTP, ABAP Environment
55
1.5.8 SAP Fiori
56
1.5.9 SAP API Management
56
1.6 Summary
57
2 Introduction to OData
59
2.1 OData and REST
59
2.1.1 What Is REST?
59
2.1.2 What Is OData?
62
2.2 Structure of an OData Service
67
2.2.1 Service Document
69
2.2.2 Service Metadata Document
73
2.3 OData Operations
76
2.3.1 Create
76
2.3.2 Read
76
2.3.3 Update
78
2.3.4 Delete
78
2.4 OData Query Options
78
2.4.1 Filtering and Projecting ($filter and $select)
80
2.4.2 Sorting ($orderby)
83
2.4.3 Client-Side Paging ($top, $skip, and $inlinecount)
84
2.4.4 Counting ($count)
88
2.4.5 Inlining ($expand)
88
2.4.6 Formatting ($format)
92
2.5 OData in SAP Solutions
94
2.5.1 SAP Fiori
96
2.5.2 SAP Build
96
2.5.3 SAP Analytics Cloud
97
2.5.4 SAP Mobile Start
98
2.5.5 SAP Solution Manager
98
2.5.6 SAP S/4HANA
98
2.5.7 SAP Business Technology Platform
99
2.5.8 SAP SuccessFactors Solutions
100
2.6 SAP Gateway OData Features
101
2.7 What’s Different with OData 4.0?
104
2.7.1 JavaScript Object Notation Format
104
2.7.2 Powerful Query Language
106
2.7.3 Cross-Service Navigation
107
2.7.4 Actions and Functions
107
2.7.5 Vocabularies and Annotations
108
2.8 Summary
108
3 Architecture and Integration
109
3.1 Gateway Principles
109
3.2 SAP Gateway Architecture
111
3.2.1 Consumer Tier
113
3.2.2 SAP Gateway Tier
114
3.2.3 SAP Backend Tier
116
3.2.4 Add-On Structure Evolution
116
3.3 Integration with Other Technologies
121
3.3.1 Remote Function Call
121
3.3.2 Business Object Repository
122
3.3.3 Service Provider Interface
122
3.3.4 SAP BW InfoCubes
123
3.3.5 Multidimensional Expressions
123
3.3.6 SAP BW Easy Queries and OData Queries
123
3.3.7 Generic Interaction Layer APIs
124
3.3.8 SAP Business Process Management
124
3.3.9 SAP Business Workflow
124
3.4 ABAP Programming Model for SAP Fiori
125
3.4.1 Architecture and Technology
125
3.4.2 SAPUI5 and SAP Fiori Elements
127
3.4.3 SAP Gateway and the ABAP Programming Model for SAP Fiori
129
3.4.4 SAP HANA
132
3.5 ABAP RESTful Application Programming Model
133
3.5.1 Architecture and Technology
133
3.5.2 CDS Data Modeling and Behavior Definition
139
3.5.3 Business Service Exposure
140
3.5.4 Service Consumption
140
3.6 Summary
141
4 Deployment Options, Installation, and Configuration
143
4.1 Introduction to SAP Gateway Deployment
143
4.1.1 Hub Deployment with Development in the SAP Backend System
146
4.1.2 Hub Deployment with Development on the Hub
147
4.1.3 Embedded Deployment
149
4.1.4 Mixed Deployment Options
150
4.1.5 Deployment Options for SAP Fiori and SAP S/4HANA
152
4.1.6 Comparison of Deployment Options
154
4.2 Preparing for Installation and Configuration
155
4.3 Quick Start Guide
157
4.3.1 Step 1: Deploy the SAP Gateway Add-Ons for Older SAP NetWeaver Versions
158
4.3.2 Step 2: Activate SAP Gateway
159
4.3.3 Step 3: Create an SAP System Alias
159
4.3.4 Step 4: Create an SAP Gateway Alias
161
4.3.5 Step 5: Activate the OPU Node
162
4.3.6 Step 6: Test Your Settings
163
4.4 Installation and Configuration in Detail
164
4.4.1 Installing the SAP Gateway Add-Ons
165
4.4.2 Basic Configuration Settings
165
4.4.3 OData Channel Configuration
167
4.4.4 Business Enablement Provisioning Configuration
173
4.4.5 Smoke Testing
173
4.5 Summary
175
PART II: Service Creation
177
5 Introduction to OData Service Creation
179
5.1 Methods for Creating an OData Service
180
5.2 Service Creation Process Overview
182
5.3 SAP Gateway Toolset
186
5.3.1 Service Builder
186
5.3.2 Supporting Tools during the Service Creation Process
189
5.3.3 ABAP Development Tools and CDS Views
193
5.4 Steps in the Service Creation Process
196
5.4.1 Data Model Definition in the Service Builder
196
5.4.2 Service Registration in the SAP Backend System
198
5.4.3 Service Implementation
200
5.4.4 Service Maintenance
205
5.4.5 Service Generation via Redefinition
206
5.4.6 Service Generation via Referenced Data Sources
212
5.4.7 Service Generation via OData.publish:true
213
5.4.8 Service Generation for Analytical Queries
214
5.5 OData Channel Development Paradigm
216
5.5.1 Model Provider Class
216
5.5.2 Data Provider Class and Data Provider Extension Class
218
5.5.3 Technical Considerations
221
5.6 Summary
221
6 Service Development
223
6.1 Data Model Definition
224
6.1.1 Creating a Project
224
6.1.2 Creating a Data Model
228
6.2 Service Registration
250
6.3 Service Stub Generation
255
6.4 Service Maintenance
257
6.5 Incremental Service Implementation and Model Enhancement
261
6.5.1 Feed (GET_ENTITYSET)
263
6.5.2 Single Read (GET_ENTITY)
267
6.5.3 Query Options
270
6.5.4 Navigation Properties
279
6.5.5 Create, Update, and Delete Methods
286
6.5.6 Function Imports
294
6.5.7 Media Resources
301
6.5.8 Expand/Self-Expand
312
6.5.9 Deep Insert
320
6.5.10 Batch
324
6.5.11 Adding UI Annotations
328
6.6 Summary
335
7 Service Generation
337
7.1 Generation via RFC/BOR Interface
340
7.1.1 Data Model Definition
342
7.1.2 Service Registration: Stub Creation
347
7.1.3 Service Maintenance
348
7.1.4 Service Implementation: SalesOrderHeaderSet
350
7.1.5 Service Implementation: SalesOrderLineItemSet
362
7.2 Generation via Search Help
372
7.3 Generation via Redefinition
374
7.3.1 Redefinition Options
376
7.3.2 Redefine Service Provider Interface Service
378
7.3.3 Activate Service
381
7.4 Generation via Analytical Queries
382
7.4.1 Analytical Queries with Query Property by OData
382
7.4.2 CDS View-Based Analytical Queries
389
7.5 Summary
392
8 ABAP Programming Model for SAP Fiori
395
8.1 Development of CDS Views
397
8.2 Modeled Data Sources
403
8.3 Referenced Data Sources
408
8.4 Adding Annotations to an OData Service
413
8.5 ABAP Programming Model for SAP Fiori with Classic APIs
416
8.6 ABAP Programming Model for SAP Fiori with BOPF
426
8.6.1 Defining the Business Object
426
8.6.2 Defining the Consumption View
431
8.6.3 Determinations, Validations, and Actions
434
8.6.4 Draft Support
437
8.7 Summary
438
9 ABAP RESTful Application Programming Model
441
9.1 Data Modeling
443
9.1.1 Database Tables
444
9.1.2 Data Definition
447
9.1.3 Customer Data
451
9.2 Business Service Exposure
455
9.2.1 CDS Projection Views
455
9.2.2 CDS Metadata Extensions
458
9.2.3 Service Definition
463
9.2.4 Service Binding
464
9.3 Service Consumption
467
9.4 Transactional Behavior
471
9.4.1 Managed
472
9.4.2 Managed with Unmanaged Save
488
9.4.3 Unmanaged
490
9.5 Generating an Application Using ABAP Development Tools
491
9.6 Entity Manipulation Language
495
9.6.1 EML Read
495
9.6.2 EML Modify
498
9.6.3 EML Commit Entities
499
9.7 Business Object Characteristics
499
9.7.1 Draft
500
9.7.2 Numbering
501
9.7.3 Permissions
502
9.8 Summary
504
PART III: Application Development
505
10 SAPUI5 Application Development
507
10.1 Building Blocks of Web Application Development
508
10.2 Introduction to SAP Fiori and SAPUI5
509
10.2.1 SAP Fiori
509
10.2.2 SAPUI5
513
10.3 Creating an SAPUI5 Application
515
10.4 Summary
517
11 SAP Business Application Studio
519
11.1 Setting Up SAP Business Application Studio
520
11.2 Connecting to SAP Gateway
524
11.2.1 Setting Up the Connection
525
11.2.2 Creating an SAP Business Application Studio Dev Space
529
11.3 OData Sample Services
532
11.4 Developing SAP Fiori Applications
534
11.4.1 Creating a Basic SAP Fiori App
534
11.4.2 Changing the UI and Adding an OData Entity Set
543
11.5 Summary
549
12 Extensibility
551
12.1 Redefining and Extending SAP Gateway OData Services
551
12.1.1 Redefinition
552
12.1.2 Field Extensibility
556
12.1.3 Node Extensibility
557
12.1.4 Step-by-Step Guide
558
12.2 Extending OData Services in SAP S/4HANA
581
12.2.1 Extensibility Concepts for SAP S/4HANA
581
12.2.2 Key User Extensibility
582
12.2.3 In-App Developer/On-Stack Extensibility
588
12.2.4 Side-by-Side Extensibility
592
12.3 Extending SAP Fiori Applications Using SAPUI5 Flexibility
601
12.3.1 Key User Adaptation
601
12.3.2 Creating an Adaptation Project in SAP Business Application Studio
603
12.4 Summary
607
13 Mobile Application Development
609
13.1 Overview
610
13.2 Mobile Development Kits
611
13.2.1 Accessing SAP Mobile Services
612
13.2.2 Creating a Mobile App
615
13.2.3 Creating a Project in SAP Business Application Studio
617
13.2.4 Deploying the Application
624
13.2.5 Using the Application
626
13.3 Native Application Development
628
13.3.1 SAP BTP SDK for iOS
629
13.3.2 SAP BTP SDK for Android
636
13.4 Summary
646
14 Social Media Application Development
647
14.1 PHP
648
14.2 Facebook
652
14.3 X
659
14.4 Sina Weibo (êVòQî˜îé)
663
14.5 Summary
674
15 Enterprise Application Development
675
15.1 Microsoft Excel
676
15.1.1 Microsoft Power Pivot
676
15.1.2 Get OData Service
681
15.1.3 $format=xlsx
684
15.2 Microsoft SharePoint/Microsoft 365
685
15.3 Microsoft Visual C# Windows Desktop
692
15.4 Microsoft ASP.NET
697
15.5 Summary
697
PARt IV: Administration
699
16 Lifecycle Management: Testing, Service Deployment, and Operations
701
16.1 Testing
702
16.1.1 Testing SAP Gateway Services
703
16.1.2 Testing a Client Application or Extension Application
706
16.1.3 Best Practices for Testing in SAP Gateway
709
16.2 Service Deployment
710
16.2.1 Transport of Repository Objects between SAP Backend Systems
711
16.2.2 Transport of Repository Objects and Customizing Entries between SAP Gateway Server Systems
713
16.2.3 Versioning
716
16.2.4 Activating and Maintaining Services
717
16.2.5 Service Deployment in OData 4.0
718
16.3 Operations
720
16.3.1 Periodic Cleanup Tasks
720
16.3.2 Monitoring Overview
721
16.4 DevOps and SAP Gateway Development
728
16.5 Summary
730
17 Security
731
17.1 Network and Communication Security
731
17.1.1 Transport Protection
732
17.1.2 Input Validation
735
17.2 User Management and Authorizations
739
17.3 Single Sign-On and Authentication Options
741
17.3.1 Basic Authentication
743
17.3.2 SAP Logon Tickets with SAP Enterprise Portal
744
17.3.3 X.509 Client Certificates
745
17.3.4 SAML 2.0 Browser SSO Protocol
746
17.3.5 OAuth
748
17.3.6 Kerberos: Integrated Windows Authentication
749
17.4 Recommended Authentication Options
750
17.4.1 SAP Fiori Applications
751
17.4.2 Desktop Application
752
17.4.3 Mobile Application (Direct Access)
753
17.4.4 Cloud-Based Scenario with SAP BTP
755
17.4.5 SAP Mobile Services
756
17.4.6 Web Server
757
17.4.7 Business-to-Consumer Scenario
758
17.4.8 Read Access Logging
763
17.5 Summary
766
Appendices
769
A Advanced Topics
769
A.1 Configuring Notifications in SAP Gateway
769
A.2 Event-Driven Architectures and SAP Gateway
776
A.3 Using the Error Log
781
A.4 Analyzing Performance and SAP Gateway Statistics
788
A.5 Summary
792
B The Authors
793
Index
797