SAP OData Service Development Options - ABAP RESTful Programming Model
SAP OData Service Development Options - ABAP RESTful Programming Model
DEVELOPMENT OPTIONS
Be prepared for the
ABAP RESTful Programming Model
Andre Fischer
July, 2019
PUBLIC
Agenda
ODATA V4
OData V2
SADL SADL
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC = code based implementation (ABAP, BOPF or CDS)4
SAP Gateway
Code-based service development
Create → <Entity_Set>_CREATE_ENTITY
Read → <Entity_Set>_GET_ENTITY
Query → <Entity_Set>_GET_ENTITYSET
Update → <Entity_Set>_UPDATE_ENTITY
Delete → <Entity_Set>_DELETE_ENTITY
OData V2
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC = code based implementation (ABAP, BOPF or CDS)6
Mapped Data Source
OData Model has to be modelled in New fields are not automatically included
SEGW
Code based implementation of CREATE,
Manual mapping of READ and QUERY
methods UPDATE, and DELETE methods
Available as of 7.40
Available as of 7.50
OData V2
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC = code based implementation (ABAP, BOPF or CDS)9
ABAP Programming Model for SAP Fiori – CDS based BOPF Objects
Managed scenario: Query engine (SADL) orchestrates all CRUD-Q calls to the SAP Gateway (OData) framework
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10
ABAP
RESTful
Programming
Model
ABAP RESTful Programming Model - big picture
SERVICE
SAP Fiori UI Web API
CONSUMPTION
SERVICE BINDING
BUSINESS Bind the service to OData protocol
SERVICES
PROVISIONING SERVICE DEFINITION
Define scope to be exposed
Behaviour implementation
implementation unmanaged;
{
field (read only) TravelID;
field (mandatory) AgencyID, CustomerID,
BeginDate, EndDate;
create;
update;
delete;
ABAP
ABAP RESTFUL
SCENARIO USE-CASE PROGRAMMING MODEL
PROGRAMMING MODEL
FOR SAP FIORI
Brownfield
un-managed
implementation ➖* ✔
Greenfield
managed
implementation ✔ (planned)
MANAGED SCENARIO
Query engine (SADL) orchestrates all CRUD-Q calls to the SAP Gateway (OData) framework
➖ = not supported
✔ = supported
➖* = not supported via BOPF but via SEGW (RDS + DPC_EXT)
INTERACTION SAVE
PHASE SEQUENCE
finalize UNMANAGED
Brownfield development with application coding fully available:
check_before_save Interaction phase + Transactional buffer + Save sequence
MODIFY
adjust_numbers
READ
LOCK
MANAGED
save
Greenfield development with standard implementation
(opt. appl. components: DB tables, lock objects, PFCG objects, update task FM)
Transactional
buffer
SAP HANA
BO RUNTIME IMPLEMENTATION
INTERACTION SAVE
PHASE SEQUENCE
finalize
Application coding
checkBeforeSave already available
for interaction phase, transactional buffer and save sequence
MODIFY
adjustNumbers
READ
LOCK
APPLICATION CODE
Examples
TX Buffer
Sales Order, Purchase Order
Wrapper Code
INTERACTION SAVE
SEQUENCE PLANNED
PHASE
adjustNumbers
READ
LOCK
Application coding
finalize
“update-task function module” available
checkBeforeSave
coding for interaction phase not available
(e.g. highly coupled in older UI technology: DYNP - PBO / PAI)
MODIFY
adjustNumbers
READ
LOCK
Examples
MANAGED RUNTIME
Function module Business Partner, Product
for UPDATE
TX Buffer TASK
SAP HANA
Application code in
determinations /
validations / … SAP HANA
OData V4
ADT Tools
Classic Classic
business logic DDIC tables
OData V4
ADT Tools
Custom
implementation
ABAP Platform 7.4 & 7.5 ABAP Platform ≥ 7.50 SAP Cloud Platform ABAP Environment ≥ 1808 *
SEGW
Modelled Data Source &
SEGW / @OData Business Service
Referenced Data Source Reference Data Source
Core Data Classic API’s Core Data CDS-based Core Data Behavior
Services (BAPI’s, classes, …) Services BOPF Services Definition
Dos and Don’ts Current best practice in SAP S/4HANA Future direction
Recommendations Getting Started Documentation
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC * On-premise planned upcoming SAP S/4HANA 27
Where to invest now to be prepared for the ABAP RESTful Programming Model?
© 2019 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC * Best practice Fiori apps, E2E documentation 28
Key Take Aways
https://www.sap.com/community/topic/gateway.html
https://blogs.sap.com/2017/12/12/odata-service-development-options/
https://blogs.sap.com/2019/02/08/evolution-of-the-abap-programming-model/
SAP SOURCES
https://cloudplatform.sap.com/business-platform/abap.html
You are invited to network, collaborate and learn while enjoying these community offerings: