You are on page 1of 79

Week 3: Enabling the Transactional Behavior of an App

Unit 1: The Enhanced Business Scenario


The Enhanced Business Scenario
Topics

01 The Enhanced Business Scenario

02 Defining the Basic Business Object Behavior

03 Creating the Business Object Behavior Projection

04 Understanding Entity Manipulation Language (EML)

05 Enhancing the BO Behavior with App-Specific Logic

06 Implementing the Business Object Behavior

07 Enabling the Draft Handling


Week 3 08 Troubleshooting Your SAP Fiori App
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
The Enhanced Business Scenario
Resulting SAP Fiori elements app

BO-specific actions
TRANSACTIONAL LIST REPORT TRAVEL APP

Create

Delete

OBJECT PAGE

Draft

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


The Enhanced Business Scenario
Dev flow for managed scenarios
SERVICE
BINDING PREVIEW

BIND TO SCENARIO
AND PROTOCOL

SERVICE
DEFINITION
DEFINE SCOPE

ADD
BEHAVIOR

DATA MODEL BEHAVIOR


PROJECTION PROJECTION
PROJECT ELEMENTS & ENRICH PROJECT BEHAVIOR

ADD IMPLEMENT
BEHAVIOR BEHAVIOR
Authority object CDS role
QUERY
DATA ACCESS CDS-BASED CDS BEHAVIOR
CONTROL DATA MODEL DEFINITION ABAP CODE

AUTHORITY CHECK
APPLICATION DATA
DATABASE TABLES Lock object
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4
The Enhanced Business Scenario
Managed business object runtime implementation

INTERACTION SAVE
PHASE SEQUENCE

finalize Application code


checkBeforeSave Not yet available or fine granular reusable code available
Technical implementation tasks taken over by BO infrastructure
MODIFY

adjustNumbers
READ

LOCK

Standard CRUD operations available out-of-the-box


save
Developer focuses on adding BO-specific business logic via
dedicated code exits: determinations, validation and actions

MANAGED RUNTIME
Transactional Examples
Buffer
New applications on SAP Cloud Platform, ABAP environment
and SAP S/4HANA
Business logic via
determinations,
validations, … SAP HANA

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


The Enhanced Business Scenario
Wrap-up

IN THIS UNIT, YOU LEARNED


▪ About the transactional enhancements of the business
scenario we implement this week
▪ How the development flow will be in the upcoming units
▪ About the managed business object runtime implementation

NEXT UNIT
▪ Week 3 – Unit 2
Defining the Basic Business Object Behavior

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


The Enhanced Business Scenario
i Additional Material
Further reading

ABAP RESTful APPLICATION PROGRAMMING MODEL


INFORMATION PAGE

For more information, links to documentation, tutorials, and more, please


visit the RAP at openSAP information page by following the link below

RAP at openSAP information page (week 3)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2020 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.
The information contained herein may be changed without prior notice. 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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Enabling the Transactional Behavior of an App
Unit 2: Defining the Basic Business Object
Behavior
Enabling the Transactional Behavior of an App
Topics

01 The Enhanced Business Scenario

02 Defining the Basic Business Object Behavior

03 Creating the Business Object Behavior Projection

04 Understanding Entity Manipulation Language (EML)

05 Enhancing the BO Behavior with App-Specific Logic

06 Implementing the Business Object Behavior

07 Enabling the Draft Handling


Week 3
08 Troubleshooting Your SAP Fiori App
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Defining the Basic Business Object Behavior
Dev flow – Where we are

SERVICE
BINDING PREVIEW

BIND TO SCENARIO
AND PROTOCOL

SERVICE
DEFINITION
DEFINE SCOPE

ADD
BEHAVIOR

DATA MODEL BEHAVIOR


PROJECTION PROJECTION
PROJECT ELEMENTS & ENRICH PROJECT BEHAVIOR

ADD IMPLEMENT
BEHAVIOR BEHAVIOR
Authority object CDS role
QUERY
DATA ACCESS CDS-BASED CDS BEHAVIOR
CONTROL DATA MODEL DEFINITION ABAP CODE

AUTHORITY CHECK
APPLICATION DATA
DATABASE TABLES Lock object
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3
Defining the Basic Business Object Behavior
What we will achieve in this unit

Define table for


persistency

List of actions

Mapping between
entity and
persistent table

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Defining the Basic Business Object Behavior
Demo

HANDS ON

DEMO

Creating and Defining the Transactional BO behavior

1. Create the BO behavior definition for the travel and booking entities

2. Define the standard transactional BO behavior of each entity

3. Test the enhanced SAP Fiori elements app

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Defining the Basic Business Object Behavior
Wrap-up

IN THIS UNIT, YOU LEARNED


▪ About the transactional behavior of your app and how
to define it utilizing ABAP Development Tools

NEXT UNIT
▪ Week 3 – Unit 3
Creating the Business Object Behavior Projection

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Defining the Basic Business Object Behavior
i Additional Material
Further reading

ABAP RESTful APPLICATION PROGRAMMING MODEL


INFORMATION PAGE

For more information, links to documentation, tutorials, and more, please


visit the RAP at openSAP information page by following the link below

RAP at openSAP information page (week 3)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2020 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.
The information contained herein may be changed without prior notice. 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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Enabling the Transactional Behavior of an App
Unit 3: Creating the Business Object Behavior
Projection
Creating the Business Object Behavior Projection
Topics

01 The Enhanced Business Scenario

02 Defining the Basic Business Object Behavior

03 Creating the Business Object Behavior Projection

04 Understanding Entity Manipulation Language (EML)

05 Enhancing the BO Behavior with App-Specific Logic

06 Implementing the Business Object Behavior

07 Enabling the Draft Handling


Week 3
08 Troubleshooting Your SAP Fiori App
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Creating the Business Object Behavior Projection
Dev flow – Where we are

SERVICE
BINDING PREVIEW

BIND TO SCENARIO
AND PROTOCOL

SERVICE
DEFINITION
DEFINE SCOPE

ADD
BEHAVIOR

DATA MODEL BEHAVIOR


PROJECTION PROJECTION
PROJECT ELEMENTS & ENRICH PROJECT BEHAVIOR

ADD IMPLEMENT
BEHAVIOR BEHAVIOR
Authority object CDS role
QUERY
DATA ACCESS CDS-BASED CDS BEHAVIOR
CONTROL DATA MODEL DEFINITION ABAP CODE

AUTHORITY CHECK
APPLICATION DATA
DATABASE TABLES Lock object
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3
Creating the Business Object Behavior Projection
What we will achieve in this unit

Projected features
from the base
behavior definition

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Creating the Business Object Behavior Projection
Demo

HANDS ON

DEMO

Creating and Defining the Transactional BO Behavior

1. Create the BO behavior projection for the travel and booking entities

2. Project the transactional BO behavior of each entity

3. Test the enhanced SAP Fiori elements app

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Creating the Business Object Behavior Projection
Wrap-up

IN THIS UNIT, YOU LEARNED


▪ What a business object behavior projection is and
how it can be defined

NEXT UNIT
▪ Week 3 – Unit 4
Understanding Entity Manipulation Language (EML)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Creating the Business Object Behavior Projection
i Additional Material
Further reading

ABAP RESTful APPLICATION PROGRAMMING MODEL


INFORMATION PAGE

For more information, links to documentation, tutorials, and more, please


visit the RAP at openSAP information page by following the link below

RAP at openSAP information page (week 3)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2020 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.
The information contained herein may be changed without prior notice. 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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Enabling the Transactional Behavior of an App
Unit 4: Understanding
Entity Manipulation Language (EML)
Understanding Entity Manipulation Language (EML)
Topics

01 The Enhanced Business Scenario

02 Defining the Basic Business Object Behavior

03 Creating the Business Object Behavior Projection

04 Understanding Entity Manipulation Language (EML)

05 Enhancing the BO Behavior with App-Specific Logic

06 Implementing the Business Object Behavior

07 Enabling the Draft Handling


Week 3
08 Troubleshooting Your SAP Fiori App
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Understanding Entity Manipulation Language (EML)
EML at a glance

ENTITY EXTENSION OF THE ABAP LANGUAGE


MANIPULATION with an SQL-like syntax
LANGUAGE
CONTROL THE TRANSACTIONAL BO BEHAVIOR IN RAP CONTEXT

DIRECT API-BASED ACCESS TO RAP BOs

STANDARD EML API


for type-safe read and modifying access to RAP BOs

GENERIC EML API


for generic integration of RAP BOs into other frameworks

DATA CONSISTENCY ENSURED BY DATABASE LUW


COMMIT operation required to persist changes

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Understanding Entity Manipulation Language (EML)
READ operation

EXAMPLE

READ ACCESS
TO RAP BOs

Failure handling
(failed & reported)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Understanding Entity Manipulation Language (EML)
MODIFY – CREATE operation

EXAMPLE

MODIFY ACCESS
TO RAP BOs

Failure handling
(failed & reported)

COMMIT statement
for proper LUW
handling

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Understanding Entity Manipulation Language (EML)
MODIFY – UPDATE operation

EXAMPLE

MODIFY ACCESS
TO RAP BOs

Failure handling
(failed & reported)

COMMIT
statement for
proper LUW
handling

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Understanding Entity Manipulation Language (EML)
MODIFY – DELETE operation

EXAMPLE

DELETE ACCESS
TO RAP BOs

Failure handling
(failed & reported)

COMMIT
statement for
proper LUW
handling

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Understanding Entity Manipulation Language (EML)
MODIFY – EXECUTE ACTION operation

EXAMPLE

EXECUTION OF
RAP BO-
SPECIFIC
ACTIONS

Failure handling
(failed & reported)

COMMIT
statement for
proper LUW
handling

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


Understanding Entity Manipulation Language (EML)
Demo

HANDS ON

DEMO

Practice and Understand the EML Syntax

1. Read an existing travel business object instance

2. Update a given travel business object instance

3. Delete a travel business object instance

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Understanding Entity Manipulation Language (EML)
Wrap-up

IN THIS UNIT, YOU LEARNED


▪ What Entity Manipulation Language is all about and
how it helps to make the development of
transactional apps fast and easy

NEXT UNIT
▪ Week 3 – Unit 5
Enhancing the BO Behavior with App-Specific Logic

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Understanding Entity Manipulation Language (EML)
i Additional Material
Further reading

ABAP RESTful APPLICATION PROGRAMMING MODEL


INFORMATION PAGE

For more information, links to documentation, tutorials, and more, please


visit the RAP at openSAP information page by following the link below

RAP at openSAP information page (week 3)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2020 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.
The information contained herein may be changed without prior notice. 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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Enabling the Transactional Behavior of an App
Unit 5: Enhancing the Business Object Behavior
with App-Specific Logic
Enhancing the Business Object Behavior with App-Specific Logic
Topics

01 The Enhanced Business Scenario

02 Defining the Basic Business Object Behavior

03 Creating the Business Object Behavior Projection

04 Understanding Entity Manipulation Language (EML)

05 Enhancing the BO Behavior with App-Specific Logic

06 Implementing the Business Object Behavior

07 Enabling the Draft Handling


Week 3
08 Troubleshooting Your SAP Fiori App
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Enhancing the Business Object Behavior with App-Specific Logic
Dev flow – Where we are

SERVICE
BINDING PREVIEW

BIND TO SCENARIO
AND PROTOCOL

SERVICE
DEFINITION
DEFINE SCOPE

ADD
BEHAVIOR

DATA MODEL BEHAVIOR


PROJECTION PROJECTION
PROJECT ELEMENTS & ENRICH PROJECT BEHAVIOR

ADD IMPLEMENT
BEHAVIOR BEHAVIOR
Authority object CDS role
QUERY
DATA ACCESS CDS-BASED CDS BEHAVIOR
CONTROL DATA MODEL DEFINITION ABAP CODE

AUTHORITY CHECK
APPLICATION DATA
DATABASE TABLES Lock object
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3
Enhancing the Business Object Behavior with App-Specific Logic
What we will achieve in this unit

Projection of
actions

Definition of
actions

Definition of
determinations

Definition of
validations

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Enhancing the Business Object Behavior with App-Specific Logic
Demo

HANDS ON

DEMO

Enhancing the BO Behavior with App-Specific Logic

1. Enhance the BO behavior definition with validation, action, and


determination

2. Project the enhanced transactional BO behavior of both entities

3.
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC
Test the enhanced SAP Fiori elements App
5
Enhancing the Business Object Behavior with App-Specific Logic
Wrap-up

IN THIS UNIT, YOU LEARNED


▪ How to integrate your own app-specific logic to your app

NEXT UNIT
▪ Week 3 – Unit 6
Implementing the Business Object Behavior

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Enhancing the Business Object Behavior with App-Specific Logic
i Additional Material
Further reading

ABAP RESTful APPLICATION PROGRAMMING MODEL


INFORMATION PAGE

For more information, links to documentation, tutorials, and more, please


visit the RAP at openSAP information page by following the link below

RAP at openSAP information page (week 3)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2020 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.
The information contained herein may be changed without prior notice. 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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Enabling the Transactional Behavior of an App
Unit 6: Implementing the Business Object
Behavior
Implementing the Business Object Behavior
Topics

01 The Enhanced Business Scenario

02 Defining the Basic Business Object Behavior

03 Creating the Business Object Behavior Projection

04 Understanding Entity Manipulation Language (EML)

05 Enhancing the BO Behavior with App-Specific Logic

06 Implementing the Business Object Behavior

07 Enabling the Draft Handling


Week 3
08 Troubleshooting Your SAP Fiori App
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Implementing the Business Object Behavior
Dev flow – Where we are

SERVICE
BINDING PREVIEW

BIND TO SCENARIO
AND PROTOCOL

SERVICE
DEFINITION
DEFINE SCOPE

ADD
BEHAVIOR

DATA MODEL BEHAVIOR


PROJECTION PROJECTION
PROJECT ELEMENTS & ENRICH PROJECT BEHAVIOR

ADD IMPLEMENT
BEHAVIOR BEHAVIOR
Authority object CDS role
QUERY
DATA ACCESS CDS-BASED CDS BEHAVIOR
CONTROL DATA MODEL DEFINITION ABAP CODE

AUTHORITY CHECK
APPLICATION DATA
DATABASE TABLES Lock object
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3
Implementing the Business Object Behavior
What we will achieve in this unit

Implementation of
validation

Implementation of
determination

Implementation in local types Implementation in local types

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Implementing the Business Object Behavior
Demo

HANDS ON

DEMO

Implement the BO-specific Behavior

1. Create the BO behavior pool for the travel entity

2. Define and implement validations for the travel entity

3. Implement the dynamic feature control for fields and operations

4. Test the enhanced SAP Fiori elements app


© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5
Implementing the Business Object Behavior
Wrap-up

IN THIS UNIT, YOU LEARNED


▪ How to create the BO behavior pool class and how to
implement the validations for your app in ABAP
▪ How feature control enhances the user experience and
how to implement it

NEXT UNIT
▪ Week 3 – Unit 7
Enabling the Draft Handling

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Implementing the Business Object Behavior
i Additional Material
Further reading

ABAP RESTful APPLICATION PROGRAMMING MODEL


INFORMATION PAGE

For more information, links to documentation, tutorials, and more, please


visit the RAP at openSAP information page by following the link below

RAP at openSAP information page (week 3)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2020 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.
The information contained herein may be changed without prior notice. 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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Enabling the Transactional Behavior of an App
Unit 7: Enabling the Draft Handling
Enabling the Draft Handling
Topics

01 The Enhanced Business Scenario

02 Defining the Basic Business Object Behavior

03 Creating the Business Object Behavior Projection

04 Understanding Entity Manipulation Language (EML)

05 Enhancing the BO Behavior with App-Specific Logic

06 Implementing the Business Object Behavior

07 Enabling the Draft Handling


Week 3
08 Troubleshooting Your SAP Fiori App
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Enabling the Draft Handling
RESTful architecture and draft handling

CLOUD ENVIRONMENT EXPECTS HIGH AVAILABILITY, CONTINUOUS DELIVERY,


AND LOW TCO
RESTful avoids problematic server stickiness by introducing a stateless communication
Draft fills the gap between stateless communication and stateful application

ENABLERS FOR MODERN USER EXPERIENCE REQUIRES MULTI-DEVICE SUPPORT


CLOUD AND AND DATA LOSS PREVENTION WITHOUT CONNECTION TIMEOUTS
MODERN UX Draft persists the state device-independently in a non-process-relevant way
RESTful makes the draft available as an addressable resource

GUIDING PRINCIPLE
Draft is the persisted transactional buffer

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Enabling the Draft Handling
Draft – Stateful applications with stateless communication protocol

Stateless transactional app (w/out draft) Draft-enabled app


EDIT SAVE EDIT SAVE SAVE SAVE ALL

Perceived Perceived
transaction transaction
IMPACT
Transaction
steps on client

Back-end Back-end
execution execution

IMPACT IMPACT
for end user for end user

No feedback (e.g. messages, feature control) Early feedback from calculations and validations in the back
until SAVE is triggered end including feature control
Draft automatically supports data loss prevention, continuous
work, and device switch

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Enabling the Draft Handling
Draft – Impact for concurrency handling: Locks

Stateless transactional app (w/out draft) Draft-enabled app


EDIT SAVE ALL EDIT

Perceived Perceived
transaction transaction
exclusive exclusive optimistic exclusive
optimistic lock (ETag) lock lock lock (ETag) lock
Lock lifetime Lock lifetime
timeout resume
Request
Back-end
processing
execution

End user perceived transaction distributed over


a long period, so locks can‘t be held all the time
Locks are not bound to a session and have their own timeout
After timeout of exclusive locks an optimistic lock is used
Resume re-acquires the exclusive locks
Request processing is executed in a single ABAP session

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Enabling the Draft Handling
Dev flow – Where we are

SERVICE
BINDING PREVIEW

BIND TO SCENARIO
AND PROTOCOL

SERVICE
DEFINITION
DEFINE SCOPE

ADD
BEHAVIOR

DATA MODEL BEHAVIOR


PROJECTION PROJECTION
PROJECT ELEMENTS & ENRICH PROJECT BEHAVIOR

ADD IMPLEMENT
BEHAVIOR BEHAVIOR
Authority object CDS role
QUERY
DATA ACCESS CDS-BASED CDS BEHAVIOR
CONTROL DATA MODEL DEFINITION ABAP CODE

AUTHORITY CHECK
APPLICATION DATA
DATABASE TABLES Lock object
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6
Enabling the Draft Handling
What we will achieve in this unit
Projection draft
enablement

Enable draft for


this business
object

Define draft
table

Define total
etag

Enable draft for


associations

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Enabling the Draft Handling
Demo

HANDS ON

DEMO

Enable the draft handling in the BO behavior

1. Adjust the CDS data models of the travel and booking entities

2. Enable the draft handling in BO behavior definitions

3. Adjust the business logic in BO behavior implementations

4. Test the enhanced SAP Fiori elements app


© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8
Enabling the Draft Handling
Wrap-up

IN THIS UNIT, YOU LEARNED


▪ The purpose of draft handling
▪ How to enable and implement the draft handling in an OData-based
SAP Fiori UI service

NEXT UNIT
▪ Week 3 – Unit 8
Troubleshooting Your SAP Fiori App

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Enabling the Draft Handling
i Additional Material
Further reading

ABAP RESTful APPLICATION PROGRAMMING MODEL


INFORMATION PAGE

For more information, links to documentation, tutorials, and more, please


visit the RAP at openSAP information page by following the link below Update Slide

RAP at openSAP information page (week 3)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2020 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.
The information contained herein may be changed without prior notice. 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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.
Week 3: Enabling the Transactional Behavior of an App
Unit 8: Troubleshooting Your SAP Fiori App
Troubleshooting Your SAP Fiori App
Topics

01 The Enhanced Business Scenario

02 Defining the Basic Business Object Behavior

03 Creating the Business Object Behavior Projection

04 Understanding Entity Manipulation Language (EML)

05 Enhancing the BO Behavior with App-Specific Logic

06 Implementing the Business Object Behavior

07 Enabling the Draft Handling


Week 3
08 Troubleshooting Your SAP Fiori App
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
Troubleshooting Your SAP Fiori App
ADT troubleshooting tools for ABAP

Gateway Dynamic ABAP ADT Feed


ABAP Profiling Error Log
Error Log Logpoints Debugger Reader

Browser’s Debug
Console

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Troubleshooting Your SAP Fiori App
ADT troubleshooting tools for ABAP CDS

Data Preview

Activation
Graph

Dictionary Log

Annotation Active
Propagation Annotations

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


Troubleshooting Your SAP Fiori App
Demo

HANDS ON

DEMO

Troubleshoot Your SAP Fiori App

1. Examples for using ABAP troubleshooting tools

2. How to use CDS troubleshooting tools

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Troubleshooting Your SAP Fiori App
Wrap-up

IN THIS UNIT, YOU LEARNED


▪ What troubleshooting tools are available in ABAP and
CDS and how these tools can be used to analyze your
app

NEXT UNIT
▪ Week 4
Dealing with Existing Code

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Troubleshooting Your SAP Fiori App
i Additional Material
Further reading

ABAP RESTful APPLICATION PROGRAMMING MODEL


INFORMATION PAGE

For more information, links to documentation, tutorials, and more, please


visit the RAP at openSAP information page by following the link below

RAP at openSAP information page (week 3)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2020 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.
The information contained herein may be changed without prior notice. 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 or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP 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 platforms, 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, and they
should not be relied upon in making purchasing decisions.
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. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/copyright for additional trademark information and notices.

You might also like