Inhaltsverzeichnis

Alle Kapitel aufklappen
Alle Kapitel zuklappen
Preface
17
Part I: Getting Started
17
Part II: OData V4
18
Part III: OData V2
19
Part IV: Advanced Topics
20
PART 1 Getting Started
23
1 Introduction to Full Stack Development
25
1.1 What Is a Full Stack Developer
26
1.2 SAP Programming Models
31
1.2.1 ABAP Programming Model for SAP Fiori
31
1.2.2 ABAP RESTful Application Programming Model
35
1.2.3 SAP Cloud Application Programming Model
42
1.3 HTTP Basics
48
1.4 Summary
52
2 SAPUI5 and SAP Fiori 101
53
2.1 SAPUI5 versus SAP Fiori
53
2.2 SAP Fiori Launchpad
62
2.3 SAP Fiori Design Guidelines
70
2.4 Development Tools
72
2.4.1 SAP Business Application Studio
72
2.4.2 Visual Studio Code
77
2.5 Summary
78
3 OData 101
79
3.1 Introduction to OData
80
3.1.1 OData Fundamentals
81
3.1.2 CRUDQ Methods
85
3.1.3 OData Query Options
92
3.2 Development of OData Services
97
3.2.1 SAP Gateway Service Builder Projects
97
3.2.2 ABAP RESTful Application Programming Model
107
3.3 Testing OData
112
3.3.1 Testing Strategy
112
3.3.2 Testing OData Services from SAP Gateway Client
114
3.3.3 Testing OData Services from the Postman REST Client
119
3.4 Summary
125
4 CDS 101
127
4.1 Developing Core Data Services
128
4.1.1 Simple Core Data Services Views
129
4.1.2 Joins and Projections
133
4.1.3 Calculated Fields
134
4.1.4 Aggregate Functions
135
4.1.5 Cascaded Views
137
4.2 Associations and Navigation Properties
139
4.3 Core Data Services View Extensions
143
4.4 Authorizations
146
4.5 Summary
149
5 TypeScript 101
151
5.1 TypeScript Basics
151
5.1.1 JavaScript
152
5.1.2 TypeScript
152
5.1.3 Purpose of TypeScript
153
5.1.4 How to Use TypeScript
154
5.1.5 Data Types
156
5.2 Next Generation TypeScript
156
5.2.1 Anonymous Functions
157
5.2.2 Arrow Functions
157
5.2.3 Rest Parameters
158
5.2.4 Function Overloading
158
5.2.5 Static Members
159
5.2.6 Intersection and Union Types
160
5.2.7 Variable Declarations
160
5.2.8 Inheritance
161
5.2.9 Abstract Classes
163
5.3 Classes and Interfaces
164
5.3.1 Classes
164
5.3.2 Interfaces
167
5.4 Generics
171
5.4.1 Generics Example
171
5.4.2 Methods of Generic Types
173
5.4.3 Generic Contraints
173
5.4.4 Generic Interfaces
174
5.4.5 Generic Classes
174
5.5 Module Development
176
5.5.1 What Are Modules?
176
5.5.2 Why Use Modules?
177
5.5.3 Export Module
177
5.5.4 Import Module
177
5.6 Summary
178
PART II OData V4
179
6 Developing OData V4 Services with the ABAP RESTful Application Programming Model (Managed Scenario)
181
6.1 Business Objects Development (CRUDQ)
182
6.1.1 Data Model
183
6.1.2 Core Data Services: Behavior Definition
191
6.1.3 Projection Views
192
6.1.4 Service Definition and Service Binding
195
6.1.5 Draft Handling
201
6.2 Actions
209
6.3 Advanced Features
214
6.3.1 Value Help
214
6.3.2 Validations
216
6.3.3 Determinations
218
6.3.4 Feature Control
220
6.4 Authorization Checks
222
6.4.1 Core Data Services: Access Controls
223
6.4.2 Authorization Implementation Method
224
6.5 Composite Business Objects
224
6.6 Summary
226
7 Developing OData V4 Services with SAP Cloud Application Programming Model
229
7.1 Domain Modeling
230
7.1.1 Naming Conventions
231
7.1.2 Entities, Types, and Keys
232
7.1.3 Compositions and Associations
238
7.1.4 Localized Data
242
7.2 Service Provisioning
244
7.2.1 Input Validation
244
7.2.2 OData Annotations
246
7.2.3 Custom Logic
248
7.3 Setup of an SAP Cloud Application Programming Model Application
250
7.3.1 Installing the Necessary Software
251
7.3.2 Creating an SAP Cloud Application Programming Model Project
252
7.3.3 Creating the Data Model
252
7.3.4 Creating the Service Definition
254
7.3.5 Providing Data
259
7.3.6 Viewing Data
262
7.4 Authorization Checks
264
7.4.1 @requires
264
7.4.2 @restrict
264
7.5 Summary
265
8 User Interface Development with OData V4
267
8.1 Data Binding
268
8.1.1 Creating an OData Model
269
8.1.2 Data Binding Modes
272
8.1.3 Syntax for Data Binding
273
8.1.4 Data Binding Types
274
8.1.5 Changes Compared to the OData V2 Model
280
8.2 Display Data in a Table Control
281
8.2.1 Creating a Project
281
8.2.2 Implementing a Table Manually
287
8.3 Navigation between Views
298
8.3.1 Theory
299
8.3.2 Hardcoded Routing
300
8.3.3 Routing with Optional and Mandatory Parameters
304
8.3.4 Routing with Query Parameters
307
8.4 Display Data in Detail (Simple Form)
308
8.4.1 Implementing the Navigation with a Real-World Example
308
8.4.2 Implementing a Detail View Manually
310
8.5 Fragments (Create/Update)
314
8.5.1 Prepare the View
314
8.5.2 Instantiate Fragments Directly in Views
316
8.5.3 Instantiate Fragments Programmatically
318
8.5.4 Manually Implement Create, Read, and Update
324
8.6 Clone the SAPUI5 Application from a Git Repository
325
8.7 Summary
327
PART III OData V2
329
9 Development Projects with Transaction SEGW and OData V2
331
9.1 Service Modeling in Transaction SEGW
332
9.1.1 Create an SAP Gateway Service Builder Project
333
9.1.2 Define the Data Model
335
9.1.3 OData Registration and Testing
340
9.2 Create, Read, Update, Delete, and Query
344
9.2.1 Read/Query Implementation
344
9.2.2 Create Implementation
356
9.2.3 Update Implementation
359
9.2.4 Delete Implementation
362
9.2.5 Association Implementation
365
9.3 SADL-Based OData Provisioning
371
9.3.1 Mapping the Service Implementation to a Data Source via SADL
371
9.3.2 Expose a CDS View (Entity) via SADL
377
9.4 Summary
379
10 User Interface Development with OData V2
381
10.1 Data Binding
383
10.1.1 Creating an OData Model
383
10.1.2 Data Binding Modes
387
10.1.3 Syntax for Data Binding
388
10.1.4 Data Binding Types
390
10.2 Display Data in a Table Control
395
10.2.1 Creating a Project
395
10.2.2 Implementing a Table Manually
400
10.2.3 Implementing a Smart Table
417
10.3 Navigation between Views
420
10.3.1 Theory
420
10.3.2 Hardcoded Routing
422
10.3.3 Routing with Mandatory Parameters
424
10.3.4 Routing with Query Parameters
427
10.4 Display Data in Detail (Simple Form)
428
10.4.1 Implementing the Navigation with a Real-World Example
428
10.4.2 Implementing a Detail View Manually
429
10.4.3 Implementing a Detail View with a Smart Form
432
10.5 Fragments (Create/Update)
434
10.5.1 Prepare the View
434
10.5.2 Instantiate Fragments Directly in Views
436
10.5.3 Instantiate Fragments Programmatically
438
10.5.4 Manually Implement Create, Read, and Update
444
10.6 Deployment to the SAPUI5 ABAP Repository
446
10.7 Clone the SAPUI5 Application from a Git Repository
451
10.8 Summary
453
PART IV Advanced Topics
455
11 User Interface Development with SAP Fiori Elements
457
11.1 List Report
458
11.1.1 Use Cases
459
11.1.2 Annotations for the List Report
460
11.1.3 Implementing a List Report
460
11.2 Object Page
465
11.2.1 Use Cases
467
11.2.2 Annotations for the Object Page
467
11.2.3 Implementing an Object Page
470
11.3 Overview Page
479
11.3.1 Cards
479
11.3.2 Use Cases
481
11.3.3 Best Practices for Page Design
481
11.3.4 Annotations for the Overview Page
482
11.3.5 Implementing an Overview Page
483
11.4 Generic Annotations
492
11.4.1 UI.HeaderInfo
492
11.4.2 UI.selectionField
493
11.4.3 UI.lineItem
493
11.4.4 UI.hidden
494
11.5 Summary
494
12 File Upload
495
12.1 Media Entities
495
12.2 OData V2
496
12.2.1 On-Premise Groundwork
496
12.2.2 OData Service
499
12.2.3 File Upload
505
12.2.4 File Download
509
12.3 OData V4
510
12.3.1 Enhance the Database Tables
511
12.3.2 Make the Fields Available to the ABAP RESTful Application Programming Model
511
12.3.3 Project the Fields
512
12.3.4 Preview the Application
513
12.4 Summary
513
13 Form Validation and Error Handling
515
13.1 Form Validation
515
13.1.1 Validation Types
515
13.1.2 Recommendations in SAP Fiori Design Guidelines
518
13.1.3 Implementation
521
13.2 Error Handling
531
13.2.1 Recommendations in SAP Fiori Design Guidelines
531
13.2.2 Server-Side OData Implementation
531
13.2.3 SAP Fiori Implementation
536
13.3 Summary
536
14 Entity Tags and Soft State
537
14.1 Customizing for Soft State Activation
537
14.1.1 Redefine the DEFINE Method
538
14.1.2 Create an Instance Attribute
538
14.1.3 Redefine OPERATION_START
539
14.1.4 Redefine OPERATION_END
539
14.1.5 Set a Session Timeout
539
14.2 Implementation
541
14.2.1 ETags in the ABAP RESTful Application Programming Model
541
14.2.2 ETags in Transaction SEGW
542
14.3 Summary
542
15 Flexible Programming Model
543
15.1 Introduction
543
15.2 Programming Model Explorer
544
15.2.1 Extension Points
545
15.2.2 Building Blocks
547
15.2.3 Controller Extensions
548
15.2.4 SAP Fiori Elements: Advanced Features
549
15.3 Building Blocks
550
15.3.1 Field
550
15.3.2 Form
551
15.3.3 FormElement
551
15.3.4 Table
552
15.3.5 FilterBar
553
15.3.6 FilterField
554
15.3.7 MicroChart
554
15.3.8 Chart
555
15.3.9 FlexibleColumnLayoutActions
556
15.3.10 Share
557
15.3.11 Paginator
557
15.4 Implementation of the Flexible Programming Model
557
15.4.1 Flexible Programming Model in Freestyle Applications
557
15.4.2 New Flexible Programming Model Applications
558
15.4.3 Page Map
566
15.4.4 Controller Extensions
572
15.5 Summary
575
16 Extensibility
577
16.1 Adaptation Projects
577
16.1.1 Creating an Adaptation Project
578
16.1.2 Building Extensions in the Graphical Editor
581
16.1.3 Deploying an Adaptation Project
586
16.2 Key User Extensibility
589
16.3 Summary
595
17 Deployment
597
17.1 Continuous Integration, Continuous Delivery, and Continuous Deployment
597
17.1.1 CTS and CTS+
598
17.1.2 SAP Continuous Integration and Delivery Service
602
17.2 Deployment to SAP S/4HANA
615
17.3 Deployment to SAP Business Technology Platform
619
17.4 Summary
622
17.5 Conclusion
623
The Authors
625
Index
627