Inhaltsverzeichnis

Alle Kapitel aufklappen
Alle Kapitel zuklappen
Foreword
15
Preface
17
Acknowledgements
19
Basic Concepts and Technical Components
21
1 Introduction
23
1.1 What is the ABAP RESTful Application Programming Model?
24
1.1.1 The Purpose of the Programming Model
24
1.1.2 The REST Architectural Style
29
1.1.3 OData
34
1.1.4 Technological Innovations with SAP S/4HANA
36
1.1.5 Evolution of ABAP-Based Programming Models
38
1.2 Architecture and Concepts
42
1.2.1 Transaction Model
42
1.2.2 Implementation Types
43
1.2.3 Entity Manipulation Language
45
1.2.4 Technical Context of Applications and Runtime Environment
45
1.3 Development Objects
48
1.3.1 Data Modeling with Core Data Services
48
1.3.2 Behavior Definition
49
1.3.3 Behavior Implementation
50
1.3.4 Projection Layer
51
1.3.5 Business Services
51
1.3.6 Interaction of the Artifacts
52
1.4 ABAP Development Tools
53
1.5 Quality Attributes of the ABAP RESTful Application Programming Model
54
1.5.1 Evolution Capability
54
1.5.2 Development Efficiency
55
1.5.3 Testability
57
1.5.4 Separation between Business and Technology
57
1.6 Availability of the ABAP RESTful Application Programming Model
58
1.6.1 SAP BTP, ABAP Environment
58
1.6.2 ABAP Platform for SAP S/4HANA On-Premise
59
2 Core Data Services: Data Modeling
61
2.1 What are Core Data Services?
62
2.2 Structure and Syntax of Core Data Services
65
2.2.1 Creating a Basic Interface View
66
2.2.2 Analyzing the Data Model
70
2.2.3 Using CDS Views
74
2.2.4 Extending the Data Model
74
2.3 Associations
79
2.4 Annotations
83
2.5 Access Controls
89
2.6 Extensibility of CDS Entities
94
2.6.1 CDS View Extensions
94
2.6.2 CDS Metadata Extension
98
2.7 Additional CDS Functionality
101
2.7.1 Virtual Elements
101
2.7.2 CDS Custom Entities
105
2.8 Virtual Data Model
109
2.9 CDS Language Elements for Modeling Business Objects
113
3 Behavior Definition
117
3.1 What is a Behavior Definition?
117
3.1.1 Context and Structure of a Behavior Definition
118
3.1.2 Syntax of a Behavior Definition
121
3.1.3 Possible Behavior
122
3.2 Editing a Behavior Definition in ABAP Development Tools
129
3.2.1 Creating a Behavior Definition
129
3.2.2 Changing and Activating a Behavior Definition
132
3.2.3 Finding and Opening a Behavior Definition
133
3.2.4 Documenting Behavior Definitions and Relationships
134
3.3 Implementation Types
136
3.3.1 Managed Scenario
138
3.3.2 Unmanaged Scenario
140
3.4 Strict Mode
141
3.5 Entity Behavior Definition
142
3.6 Defining a Behavior Pool
143
3.6.1 Behavior Pool for Behavior Definition
143
3.6.2 Behavior Pool for the CDS Entity
144
3.6.3 Behavior Pool for the Implementation Group
144
3.7 Numbering
146
3.7.1 Early, External Numbering
147
3.7.2 Early, Internal Numbering
147
3.7.3 Late Numbering
149
3.8 Field Properties
150
3.8.1 Mandatory Fields
150
3.8.2 Protection Against Write Access
151
3.8.3 Combination: Mandatory Field in Case of Creation, Write Protection in Case of Updates
152
3.9 Field Mappings
153
3.10 Standard Operations for a CDS Entity
155
3.10.1 Create, Read, Update, and Delete
155
3.10.2 Create and Read Operation by Association
156
3.11 Specific Operations for a CDS Entity
159
3.11.1 Actions
159
3.11.2 Functions
166
3.12 Concurrency and Locking Behavior
168
3.12.1 Pessimistic Locking
169
3.12.2 Optimistic Locking
171
3.13 Internal Business Logic
173
3.13.1 Determinations
173
3.13.2 Validations
179
3.13.3 Calling Determinations via an Action
182
3.14 Authorization Checks
184
3.14.1 Authorization Master
185
3.14.2 Authorization-Dependent
187
3.14.3 Delegating Authorization Checks
188
3.15 Draft Handling
189
3.15.1 Enabling Draft Handling
190
3.15.2 Draft Handling in the Business Object Composition Tree
191
3.15.3 Draft Lifecycle and Draft Actions
193
3.16 Overarching Concepts
196
3.16.1 Dynamic Feature Control
196
3.16.2 Preliminary Checks of Operations
200
3.16.3 Internal Visibility of Operations
201
4 Entity Manipulation Language: Accessing Business Logic
205
4.1 Data Types
206
4.1.1 Derived Data Types
206
4.1.2 Implicit Return Parameters
209
4.2 EML Operations
210
4.2.1 READ ENTITIES
210
4.2.2 MODIFY ENTITIES
213
4.2.3 GET PERMISSIONS
216
4.2.4 SET LOCKS
217
4.2.5 COMMIT ENTITES
218
4.2.6 ROLLBACK ENTITIES
219
4.3 Using EML Outside of Behavioral Implementations
220
4.3.1 Use in the Context of an ABAP Report
220
4.3.2 Implementation in the Context of a Test Class
222
5 Behavior Implementation
225
5.1 Business Object Provider API
225
5.2 Runtime Behavior of the ABAP RESTful Application Programming Model
226
5.2.1 Interaction Phase and Transaction Buffer
227
5.2.2 Save Sequence
228
5.3 Interfaces for the Interaction Handler and the Save Handler
229
5.4 Interaction Handler
230
5.4.1 FOR MODIFY
231
5.4.2 FOR INSTANCE AUTHORIZATION
234
5.4.3 FOR GLOBAL AUTHORIZATION
237
5.4.4 FOR FEATURES
239
5.4.5 FOR GLOBAL FEATURES
242
5.4.6 FOR LOCK
243
5.4.7 FOR READ
245
5.4.8 FOR READ BY ASSOCIATION
246
5.4.9 FOR DETERMINE
249
5.4.10 FOR VALIDATE
250
5.4.11 FOR NUMBERING
250
5.4.12 FOR PRECHECK
252
5.5 Save Handler
253
5.5.1 FINALIZE
254
5.5.2 CHECK_BEFORE_SAVE
256
5.5.3 ADJUST_NUMBERS
257
5.5.4 SAVE
258
5.5.5 CLEANUP
260
5.5.6 CLEANUP_FINALIZE
262
6 Business Services
263
6.1 Projection Layer
264
6.1.1 CDS Projection View
265
6.1.2 Projection Behavior Definition
266
6.2 Service Definition
267
6.3 Service Binding
268
6.4 Testing Business Services in the SAP Gateway Client
272
6.5 Testing UI Services with SAP Fiori Elements Preview
275
7 User Interfaces and SAP Fiori Elements
277
7.1 Development Tools
277
7.1.1 SAP Business Application Studio
278
7.1.2 Visual Studio Code
280
7.2 SAP Fiori Elements
281
7.2.1 Floorplans in SAP Fiori Elements
281
7.2.2 Selected UI Annotations
283
7.2.3 Defining UI Annotations in a CDS View
285
7.2.4 Generating Annotations via the Service Modeler
302
Practical Application Development
313
8 Use Cases
315
8.1 Applications Types
315
8.2 Implementation Types
316
8.3 Selecting the Appropriate Implementation Type
318
9 Managed Scenario: Developing an Application with SAP Fiori Elements
321
9.1 Description of the Use Case
321
9.2 Building the Data Model
322
9.2.1 Database Tables
322
9.2.2 CDS Modeling
326
9.3 Creating Behavior Definitions
334
9.3.1 Creating Behavior Definitions for Certificate Management
334
9.3.2 Enabling Draft Handling
339
9.4 Defining a Business Service
340
9.4.1 Creating a Service Definition
341
9.4.2 Creating the Service Binding
342
9.5 Creating an SAP Fiori Elements User Interface
344
9.6 Enrichment with a Determination
352
9.7 Enrichment with a Validation
356
9.8 Enrichment with an Action
360
9.9 Generation and Deployment of the Application
362
10 Managed Scenario with Unmanaged Save: Integrating an Existing Application
371
10.1 Description of the Use Case
371
10.2 Building the Data Model
375
10.2.1 Overview of the Logical Data Model
375
10.2.2 Database Tables
377
10.2.3 CDS Modeling
379
10.3 Creating a Behavior Definition
385
10.4 Implementing the Create Purchase Order Function
387
10.4.1 Declaring Late Numbering
387
10.4.2 Setting Field Properties
388
10.4.3 Creating the Behavior Pool
390
10.4.4 Implementing Determinations
391
10.4.5 Save Sequence: Implementing the Creation via BAPI
398
10.4.6 Implementing Validations
403
10.5 Implementing the Delete Purchase Order Function
409
10.5.1 Save Sequence: Implementing the Deletion via BAPI
409
10.5.2 Implementing a Validation
414
10.6 Defining Business Services
416
10.6.1 Setting up the Projection Layer for the My Purchase Orders Application
416
10.6.2 Creating a Service Definition
418
10.6.3 Creating a Service Binding
419
10.7 Implementing Authorization Checks
419
10.7.1 Access Controls for Read Access
419
10.7.2 Access Controls for Write Access
421
10.8 Creating an SAP Fiori Elements User Interface
424
10.8.1 Creating a Metadata Extension
424
10.8.2 Generating and Deploying the Application
427
11 Unmanaged Scenario: Reusing Existing Source Code
429
11.1 Description of the Use Case
430
11.2 Description of the Existing Application
431
11.2.1 Database Tables
431
11.2.2 Source Code of the Existing Application
434
11.3 Extending the Data Model
437
11.4 Creating a Behavior Definition
443
11.5 Creating a Behavior Implementation
447
11.5.1 Implementing the Interaction Phase
450
11.5.2 Implementing the Save Sequence
458
11.6 Defining a Business Service
462
12 Specific Features for the SAP BTP, ABAP Environment
465
12.1 Technical Fundamentals
466
12.1.1 ABAP for Cloud Development
469
12.1.2 Technical Infrastructure Components
470
12.1.3 Migrating Legacy Code
472
12.2 Identity and Access Management
473
12.3 Deploying SAP Fiori Apps and Assigning Authorizations
476
12.3.1 Creating an IAM App and Business Catalog
477
12.3.2 Creating an IAM Business Role
479
12.3.3 Integration in SAP Fiori Launchpad
480
12.4 Consuming Business Services
484
13 Outlook
491
13.1 Build
492
13.2 Extensibility
492
13.3 Integration and Reusability
494
Bibliography
497
A.1 Books
497
A.2 Online Resources
497
Authors
499
Index
501