0% found this document useful (0 votes)
38 views

CAP_Small

The document outlines the integration of SAP Cloud Application Programming Model with SAP HANA Cloud to develop full-stack applications. It includes an agenda for exercises that guide users through setting up their development environment, creating projects, and implementing various functionalities such as user authentication and database artifacts. Additionally, it emphasizes the benefits of using SAP Business Application Studio and the key propositions of the Cloud Application Programming Model.

Uploaded by

Raaj GK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

CAP_Small

The document outlines the integration of SAP Cloud Application Programming Model with SAP HANA Cloud to develop full-stack applications. It includes an agenda for exercises that guide users through setting up their development environment, creating projects, and implementing various functionalities such as user authentication and database artifacts. Additionally, it emphasizes the benefits of using SAP Business Application Studio and the key propositions of the Cloud Application Programming Model.

Uploaded by

Raaj GK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

1

Combine SAP Cloud


Application Programming
Model with SAP HANA
Cloud to Create Full-
Stack Applications
Public
Agenda

• Introduction to SAP Cloud Application Programming Model


• Introduction to SAP Business Application Studio / Build Code
• Exercise 1 - Set Up SAP HANA Cloud and Development Environment
• Exercise 2 - Create an SAP Cloud Application Programming Model Project for SAP HANA Cloud
• Exercise 3 - Create Database Artifacts Using Core Data Services for SAP HANA Cloud
• Exercise 4 - Create a User Interface with CAP
• Exercise 5 - Add User Authentication to Your Application
• Exercise 6 - Create Calculation View and Expose via CAP
• Exercise 7 - Create HANA Stored Procedure and Expose as CAP Service Function
• Wrap-Up

Public 3
Introduction to SAP Cloud Application
Programming Model
Introduction – Cloud Application Programming Model

The SAP Cloud Application Programming Model is an


SAP BAS
opinionated, yet open framework of tools, languages and Eclipse
VSCode CDS
libraries to efficiently build enterprise-grade services and CLI

applications. Node.js Service


express SDKs

It guides developers along a ‘golden path’ of proven best REST


Java EE,
OData
practices, while minimizing boilerplate so they can focus on Spring GraphQL

their domain problems at hand. HANA Fiori

The framework features a mix of broadly adopted open-


source and SAP tools and technologies.

Public 5
SAP Cloud Application Programming Model – One Level Deeper
We complement cloud-native technologies with…

• a CDS-based Services framework…


+ local
IDE

SAP
App
Fiori
UIs?
+ other

Platform Services
• w/ intrinsic enterprise & cloud qualities
Web
localbased IDE

CDS
CDS
CDS Domain
Service
Logic?
SDKs
w/ 1st-class support by and for…
web

Domain
SAP HANA
Model?
+ other
• SAP Business Application Studio
• SAP Fiori
Infrastructure without lock-in!
• SAP HANA
• S/4 Extension scenarios, …
SAP BAS
Eclipse
VSCode CDS
CLI
→ Guidance and best practices leveraging proven
Node.js Service SAP technologies + Open Source software
express SDKs

→ A consistent end-to-end programming model


Java EE, REST for enterprise services & applications
OData
Spring GraphQL

HANA Fiori
Public 6
Context And CAP’s Focus
Consumers

Frontends / UIs
Services Services Services
Scaling
Provisioning

Profiling
Data
CI/CD

Monitoring Your Services


and Apps
Databases

Identities
SAP HANA
Setup

Authentication Develop Run Test


Big Data

Caching CI/CD
API Management

Destinations Connectivity Operate

By SAP Cloud SDK, …

Public 7
CAP Focus Areas Breakdown

Serving Fiori UIs Providing Services

• OData v2+v4 • Service Definitions in CDS


• Draft support • Service Providers
• $batch support • Event Handlers → generic + custom
• Emitting Events

UIs UIs UIs

Services Services Services

Data Data Data

Consuming Services

• Import Service Definitions from OData, … Database Support


• Mashup with local services (using CDS)
• Service Client APIs → typed / cds.ql; pre-built S/4 • Out-of-the-box: HANA, sqlite, PostgreSQL
(community)
• Connectivity & Resilience by SDKs
• Extensible Data Access layers (cds.ql)
• Subscribing to & Handling Events
• Schema evolution

Public 8
CAP: Key Value Propositions

✓ Guidance and Best Practices → opinionated and staying open and flexible

✓ Intrinsic Enterprise & Cloud Qualities → taken care of out-of-the-box

✓ Integration and Interoperability → easily reuse models and services

✓ Accelerated Development → grow as you go & time to market

✓ Focus on your Domain → what, not how; minimized boilerplate

✓ Minimized Footprint → enabling serverless deployments

✓ Safeguarded Investments → e.g. on journeys to new platform picks

Public 9
Cookbook — Walking Through Your Tasks…

Add UIs / Frontends Reuse & Modularize Customize


—————————————— ————————————— ——————————

▪ Switch to BAS/IDE, and… ▪ Reuse @sap/cds/common ▪ Verticalization


▪ Add a Fiori app → Run ▪ Reuse other packages ▪ Tenant-level
Customization
Getting Started ▪ Add Fiori markup → Run ▪ Modularize your app
————————————— ▪ Localize your App
▪ Setup your env (once)
▪ Start a Project
▪ Define Services → Run
Provide Services Consume Services Deploy…
—————————————— ————————————— ——————————

▪ Derive Data Models → Run ▪ Import ext. Service APIs ▪ To SAP BTP
▪ Deploy to DBs → Run ▪ Consume Services ▪ for own use
▪ Add Initial Data → Run ▪ Service-level Mashups ▪ as SaaS solution
▪ Add Custom Logic → Run ▪ Service-level Replication ▪ to K8S
▪ Reading / Writing Data ▪ Serve required Interfaces ▪ Serverless
▪ Add Authorization, I18n, …

Public 10
CAP: A Layered Model

SAP Fiori

SAP Business Application

CLI, VSCode, Eclipse, …


SAP Cloud Appl. Prog. Model

Studio IDE

CI / CD
SAP Service SDKs, Events, FaaS

Cloud-Native Technologies

SAP BTP, SAP HANA, …

Public 11
Introduction to SAP Business
Application Studio

12
Introduction to SAP Business Application
Studio / Build Code
SAP Business Application Studio on BTP
General Availability on Azure, AWS, Google, and Ali-Cloud

A modern development environment, tailored for efficient development of


business applications for SAP enterprise scenarios

Public 14
SAP Business Application Studio / Build Code
Value Proposition

Turn-key Simplified Integrate SAP Ultimate


Solution Development Solutions Productivity
Instantly spin-up pre-packaged Enjoy a seamless end-to-end Build smarter, more intelligent Accelerate app development
environments with tools and development environment with a applications integrating SAP using wizards, optimized code &
runtimes, tailored for developing desktop like experience in the cloud services, technologies, and graphical editors, local test run &
SAP business applications - available anywhere, anytime solutions to cater for your debug, terminal (CLI) access,
business needs quick deployment, and more

SAP Business Application Studio is built on Open Source and leading industry standards

Public 15
The Big Picture
Browser
based
access Data Sources

SAP BTP

SAP Business Application Studio

Dev-Space
SAP HANA Native Applications Internet / Cloud
Additional Extensions
Dev-Space
Workflow SAP Cloud Business Application

Dev-Space
Open VSX SAP Fiori On-Premise

Custom
Additional Extensions Development File System
Extensions (per scenario) environment
• SAPUI5
• Layout Editor
• LSP
• … and more

Source Control
SAP BTP, Cloud Foundry SAP BTP, ABAP SAP HANA Cloud
SAP S/4HANA Cloud On-premise ABAP
environment environment SAP HANA service
Public 16
SAP Business Application Studio Vs. SAP Web IDE

SAP Business Application Studio SAP Web IDE Full Stack

Available on SAP BTP, Cloud Foundry environment SAP BTP, Neo environment

Deployment target SAP BTP, Cloud Foundry environment, SAP BTP, Cloud Foundry environment,
on-premise ABAP on-premise ABAP,
SAP BTP, ABAP environment SAP BTP, Neo environment
Solution Instantly spin-up pre-packaged isolated Generic workspace that contains many tools.
environments/Dev-spaces (“virtual machine on the cloud”) Some tools are not necessarily required for the target business
with tools and runtimes, tailored per business scenario which scenario
provide more control over the environment and code
Configure and share Dev-spaces*
Experience Embraces VS Code experience, will provide the ability to add SAP proprietary experience
custom extensions* Browser based experience
Desktop like experience in the cloud including local test,
run & debug, terminal (CLI) access, and superior code editors
Support for various Better support for pro-code, cloud and full stack • Cloud and full stack developers – partial
personas developers with superior for Java and node. js coding • Web/mobile developers
Additional personas can be supported with a suited • Similar experience for all personas
experience per persona using dev-spaces concept.
Open Source & Based on open source & leading industry standards Uses open sources but majority is proprietary
standards Provides possibility to quickly integrate capabilities and SAP proprietary framework with limited number of extensions
technologies that exist in the market*

Public 17
Visual Studio Code and SAP Business Application Studio

Visual Studio Code SAP Business Application Studio / Build Code


▪ Provides development flexibility with offline ▪ Provides a managed, preconfigured, hosted
environment, optimized for SAP application
capabilities development
▪ Features a developer-controlled, highly ▪ Can be centrally administrated with tools
configurable development environment repositories, systems access and company
policies
▪ Allows access to thousands of extensions from
the Visual Studio Code marketplace ▪ Integrates with existing SAP solutions, systems &
services
▪ Is part of a fast growing open source community ▪ Easy access to Visual Studio Code-compatible
extensions from open source Theia marketplace

Public 18
Hands-on Exercises

https://github.com/SAP-samples/cap-hana-
exercises-codejam

19
Hands-on Exercises
Where to Find More Information

https://github.com/SAP-samples/cap-hana-exercises-codejam
Exercise Instruction

https://pages.community.sap.com/topics/hana
HANA Topic Page

https://pages.community.sap.com/topics/business-application-studio
Business Application Studio Topic Page

https://pages.community.sap.com/topics/cloud-application-programming
SAP Cloud Application Programming Model Topic Page

https://cap.cloud.sap/docs/
SAP Cloud Application Programming Model Documentation

Public 21
Key Points to Take Home

• The value of the dev space in the SAP Business Application Studio

• How to use SAP Cloud Application Programming Model (CAP) Core Data
Services (CDS) to create simple database entities

• How to define database-agnostic artifacts in the persistence module

• How to create an SAP Fiori freestyle web interface

• How to configure the AppRouter

• How to create an instance of the User Authentication and Authorization


service

• How to configure Cloud Application Programming (CAP) service


authentication

Public 22
Thank you.
Contact information:

Thomas Jung
[email protected]

© 2022 SAP SE or an SAP affiliate company. All rights reserved. See Legal Notice on www.sap.com/legal-notice for use terms, disclaimers, disclosures, or restrictions related to SAP Materials for general audiences.

You might also like