
Sap Btp Developer Guide
- 623 installs
- 399 repo stars
- Updated August 4, 2026
- secondsky/sap-skills
sap-btp-developer-guide is a Claude Code agent skill that navigates SAP BTP services, destinations, and deployment patterns for developers building cloud extensions connecting SAP ERP with custom microservices.
About
sap-btp-developer-guide is a Claude Code agent skill from secondsky/sap-skills that provides comprehensive guidance for developing business applications on SAP Business Technology Platform. The skill covers CAP development with Node.js, Java, and TypeScript on Cloud Foundry or Kyma runtimes, ABAP Cloud in the BTP ABAP Environment, SAP HANA Cloud persistence, and SAP Fiori or SAPUI5 UIs. Reference guides address architecture, connectivity via Destination and Connectivity services, XSUAA OAuth security, observability with SAP Cloud ALM, CI/CD pipelines, and multitenant SaaS patterns. Developers use it for side-by-side extensions to SAP S/4HANA and SuccessFactors, OData and CDS modeling, and SAP Business Application Studio workflows. The skill is based on SAP-docs/btp-developer-guide and bundles multiple reference markdown files for CAP, ABAP Cloud, security, and operations. Engineers reach for sap-btp-developer-guide when wiring BTP destinations, deploying CAP apps, or integrating remote SAP systems.
- BTP service orientation
- Destination and connectivity setup
- Extension deployment patterns
- Identity and subaccount guidance
- SAP platform best practices
Sap Btp Developer Guide by the numbers
- 623 all-time installs (skills.sh)
- +49 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #348 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/secondsky/sap-skills --skill sap-btp-developer-guideAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 623 |
|---|---|
| repo stars | ★ 399 |
| Last updated | August 4, 2026 |
| Repository | secondsky/sap-skills ↗ |
How do you build SAP BTP CAP cloud extensions?
Navigate SAP BTP services, destinations, and deployment patterns when building cloud extensions that connect SAP ERP data with custom microservices and side-by-side apps.
Who is it for?
Enterprise developers building SAP BTP side-by-side extensions with CAP, ABAP Cloud, or Fiori connecting to S/4HANA systems.
Skip if: Developers building non-SAP greenfield apps without BTP, CAP, OData, or ERP integration requirements.
When should I use this skill?
User discusses SAP BTP, CAP development, Cloud Foundry deployment, XSUAA auth, or S/4HANA connectivity from custom apps
What you get
CAP project structure, BTP service bindings, destination configs, XSUAA security setup, and Cloud Foundry deployment patterns
- CAP project scaffolding guidance
- BTP service binding configs
- Connectivity and security patterns
By the numbers
- Based on SAP-docs/btp-developer-guide official documentation source
- Covers CAP and ABAP Cloud development paths with dedicated reference guides
Files
SAP BTP Developer Guide Skill
Related Skills
- sap-btp-cloud-platform: Use for platform fundamentals, account management, and runtime configurations
- sap-btp-best-practices: Use for architectural guidance, governance models, and production patterns
- sap-cap-capire: Use for CAP development details, service definitions, and database integration
- sap-fiori-tools: Use for UI development, Fiori application setup, and frontend deployment
- sap-abap: Use for ABAP Cloud development, RAP patterns, and ABAP Environment specifics
- sap-btp-connectivity: Use for implementing secure connections to on-premise systems
- sap-ai-core: Use for AI Core platform setup, model deployment, and orchestration
- sap-cloud-sdk-ai: Use for SDK-level AI integration in CAP applications
Comprehensive guidance for developing, deploying, and operating business applications on SAP Business Technology Platform.
Table of Contents
Quick Navigation
- Table of Contents
- When to Use This Skill
- Runtime and Programming Model Selection
- Development Workflow
- Key Services and Tools
- Security Implementation
- Connectivity Patterns
- CI/CD Implementation
- Observability Implementation
- Tutorials and Missions
- Partner/ISV Development
- Common Errors and Solutions
- Bundled Resources
- Quick Reference Links
- Version Information
When to Use This Skill
Use when:
- Building new applications on SAP BTP (Cloud Foundry or Kyma runtime)
- Developing with SAP Cloud Application Programming Model (CAP)
- Building ABAP Cloud applications in SAP BTP ABAP Environment
- Deploying SAP Fiori or SAPUI5 user interfaces
- Connecting applications to SAP S/4HANA, SuccessFactors, or on-premise systems
- Building multitenant SaaS applications
- Implementing side-by-side extensions for SAP solutions
- Building AI-powered extensions (LLM analysis, document processing, intelligent automation)
- Setting up CI/CD pipelines for SAP BTP
- Implementing observability with SAP Cloud ALM or SAP Cloud Logging
- Using SAP HANA Cloud for data persistence
Runtime and Programming Model Selection
For detailed runtime comparison: See references/runtimes.md
Decision Matrix
| Criteria | CAP (Cloud Foundry/Kyma) | ABAP Cloud |
|---|---|---|
| Languages | Node.js, Java, TypeScript | ABAP |
| Best For | New cloud-native apps, extensions | Organizations with ABAP expertise |
| Runtime | Cloud Foundry or Kyma | SAP BTP ABAP Environment |
| Persistence | SAP HANA Cloud, PostgreSQL | SAP HANA Cloud (ABAP-managed) |
| UI Framework | SAP Fiori Elements, SAPUI5 | SAP Fiori Elements, SAPUI5 |
| IDE | SAP Business Application Studio, VS Code | ABAP Development Tools (Eclipse) |
CAP Application Development
CAP provides three operational profiles:
- Development: Mock services, minimal setup, SQLite/H2 for local testing
- Hybrid: Local app connected to cloud services
- Production: Full cloud deployment with SAP HANA Cloud
Key capabilities:
- Domain-driven design with CDS (Core Data Services)
- Built-in multitenancy support
- Automatic OData/REST service generation
- Platform-agnostic design (no vendor lock-in)
For CAP details: See references/cap-development.md
AI-Powered Extensions with CAP
Build intelligent side-by-side extensions by combining CAP with SAP AI Core:
1. Bind AI Core to your CAP app via MTA (service: aicore, plan: extended) 2. Use SAP Cloud SDK for AI (@sap-ai-sdk/orchestration) in CAP event handlers — never raw HTTP calls 3. Process asynchronously: LLM calls can take 30-60 seconds. Return 202 Accepted and use cds.spawn for background processing to avoid BTP load balancer timeouts 4. Store vectors: Use HANA Cloud Vector(1536) type in CDS entities for RAG scenarios 5. Externalize prompts: Store in JSON files or CDS entities for updates without redeployment 6. Allocate memory: At least 512MB for Node.js containers with AI SDK
For complete code examples, see sap-cap-capire skill (AI Integration section) and sap-cloud-sdk-ai skill (CAP Integration subsection).
ABAP Cloud Development
ABAP Cloud uses four foundational technologies: 1. Core Data Services (CDS) - Data modeling and analytics 2. ABAP RESTful Application Programming Model (RAP) - Service-oriented development 3. Restricted ABAP Language - Cloud-safe API access 4. Released Public APIs - Upgrade-stable extensions
For ABAP details: See references/abap-cloud.md
Development Workflow
Phase 1: Explore and Discover
1. Identify business problem - Conduct stakeholder interviews 2. Understand user needs - Visit customers, observe workflows 3. Define security requirements - Threat modeling, compliance planning (GDPR, HIPAA) 4. Establish governance - Set up organizational structure
Phase 2: Design
1. User Experience Design
- Follow SAP Fiori Design Guidelines
- Implement accessibility (WCAG 2.2)
- Use design thinking methodology
2. Technology Design
- Apply Domain-Driven Design for complex applications (30+ use cases)
- Define module boundaries and communication patterns
- Plan microservices architecture if needed
3. Security in Design
- Secure user interfaces with SAP Fiori authentication
- Implement RBAC/ABAC using OAuth/OpenID Connect
- Validate CDS models for data protection
For design patterns: See references/design-patterns.md
Phase 3: Develop
CAP Development:
# Initialize CAP project
cds init my-project
cd my-project
# Add SAP HANA support
cds add hana
# Add authentication
cds add xsuaa
# Run locally
cds watchKey development tools:
- SAP Business Application Studio (primary IDE)
- SAP Cloud SDK (OData/OpenAPI clients)
- MTA Build Tool (packaging)
Coding standards:
- Follow SAPUI5 Guidelines and SAP Fiori Design Guidelines
- Establish naming conventions
- Implement parameterized queries (prevent SQL injection)
- Use CDS constraints for input validation
For tools catalog: See references/tools.md
Phase 4: Deploy
Cloud Foundry Deployment:
# Build MTA archive
mbt build
# Deploy to Cloud Foundry
cf deploy mta_archives/my-project_1.0.0.mtarKyma Deployment:
# Use Helm charts or Terraform
terraform init
terraform applyABAP Deployment:
- Use Manage Software Components app (gCTS)
- Transport via Landscape Portal
- Partner options: Multitenant SaaS or Add-on Product
For deployment details: See references/deployment.md
Phase 5: Run and Scale
Monitoring:
- SAP Cloud ALM (central observability)
- SAP Cloud Logging (detailed logs, metrics, traces)
- ABAP Technical Monitoring Cockpit
Scaling:
- Cloud Foundry: Automatic instance distribution across AZs
- Kyma: Kubernetes-native scaling
- ABAP: Elastic scaling with ACUs (0.5 ACU increments)
Cost optimization:
- System hibernation (ABAP) - reduce to <5% operational cost
- SAP HANA Cloud Native Storage Extension
- Elastic Compute Nodes for peak workloads
For operations: See references/operations.md
Key Services and Tools
Platform Services
| Service | Purpose |
|---|---|
| SAP HANA Cloud | Database-as-a-Service, multi-model |
| SAP Connectivity Service | On-premise/VPC connections via Cloud Connector |
| SAP Destination Service | Routing, authentication management |
| SAP Event Mesh | Event distribution between applications |
| SAP Integration Suite | API Management, Cloud Integration |
Development Tools
| Tool | Purpose |
|---|---|
| SAP Business Application Studio | Primary cloud IDE |
| SAP Build | Low-code/no-code development |
| Cloud Foundry CLI | CF deployment and management |
| kubectl/Helm | Kyma/Kubernetes management |
| Terraform Provider for SAP BTP | Infrastructure as code |
For architecture details: See references/architecture.md
Security Implementation
CAP Security Features
- Parameterized queries (SQL injection prevention)
- CSRF protection for UI applications
- Built-in authentication/authorization frameworks
- SAP Credential Store for secrets management
Security Guidelines
1. Secure environment configuration - Restrict network access 2. Security testing - Penetration testing before go-live 3. Secure deployment pipelines - Code scanning, dependency validation 4. Secrets management - Use SAP Credential Store
For security details: See references/security.md
Connectivity Patterns
Cloud-to-On-Premise
- SAP Connectivity Service + Cloud Connector
- User propagation supported
- Protocols: HTTP, RFC, LDAP, FTP
Cloud-to-Cloud
- SAP Destination Service for routing
- OAuth token management
- SAP Transparent Proxy for Kubernetes
For connectivity details: See references/connectivity.md
CI/CD Implementation
SAP Continuous Integration and Delivery provides pre-configured pipelines:
- Cloud Foundry Environment jobs (SAP Fiori, CAP)
- SAP Fiori for ABAP Platform jobs
- SAP Integration Suite Artifacts jobs
Setup steps: 1. Enable in SAP BTP cockpit 2. Assign Administrator/Developer roles 3. Configure repository credentials (GitHub, GitLab, Bitbucket, Azure Repos) 4. Add repositories and create jobs 5. Configure webhooks for automated builds
For CI/CD details: See references/cicd.md
Observability Implementation
Central Layer (SAP Cloud ALM)
- Real User Monitoring
- Health Monitoring
- Integration and Exception Monitoring
- Synthetic User Monitoring
Local Layer (SAP Cloud Logging)
- Log Analytics (OpenSearch-based)
- Distributed tracing
- Custom dashboards and alerting
OpenTelemetry is the industry standard for instrumentation.
For observability details: See references/observability.md
Tutorials and Missions
CAP Learning Path
1. Starter Mission: Full-Stack CAP Application 2. Extension Mission: Side-by-Side CAP-Based Extensions 3. Enterprise Mission: Change Tracking, Audit Logging, Attachments 4. Multitenant Mission: SaaS Application Development 5. Observability Mission: SAP Cloud Logging Integration
ABAP Learning Path
1. RAP100 Basics: Fiori apps, OData services, business logic 2. RAP100 Intermediate: Actions, dynamic feature control, unit testing 3. RAP120: AI-assisted development with SAP Joule 4. Analytics: CDS views with SAP Analytics Cloud
Sample applications:
- Incident Management (CAP)
- Flight Reference Scenario (ABAP)
- Poetry Slam Manager (Partner SaaS)
For tutorial details: See references/tutorials.md
Bundled Resources
File Structure
sap-btp-developer-guide/
├── SKILL.md # This file - Main guidance
├── README.md # Quick reference with auto-trigger keywords
└── references/ # Detailed guides (22 files)
├── Architecture & Setup
│ ├── architecture.md # Platform services and architecture
│ ├── runtimes.md # Runtime comparison (CF vs Kyma vs ABAP)
│ ├── setup.md # BTP landscape setup and Terraform
│ └── tools.md # Development tools catalog
├── Development
│ ├── cap-development.md # CAP development guide
│ ├── abap-cloud.md # ABAP Cloud development guide
│ ├── design-patterns.md # Design patterns and DDD
│ ├── extensions.md # SAP solution extensions
│ ├── mta.md # Multitarget applications
│ ├── testing.md # Testing strategies
│ └── ux-design.md # UX design and Fiori
├── Integration & Security
│ ├── connectivity.md # Connectivity patterns
│ ├── security.md # Security implementation
│ ├── hana-cloud.md # SAP HANA Cloud
│ └── resilience.md # Resilience patterns
├── Deployment & Operations
│ ├── deployment.md # Deployment options
│ ├── cicd.md # CI/CD pipelines
│ ├── observability.md # Monitoring and logging
│ ├── operations.md # Operations and scaling
│ └── partners.md # ISV/Partner development
└── Additional Resources
├── tutorials.md # Learning paths and missions
└── whats-new.md # Changelog and updatesReference Files by Category
Architecture & Platform (4 files)
architecture.md- Platform services overview and architecture patternsruntimes.md- Runtime comparison and selection guidesetup.md- BTP landscape setup with sizing recommendationstools.md- Complete development tools catalog
Development (8 files)
cap-development.md- CAP development with Node.js/Javaabap-cloud.md- ABAP Cloud development with RAPdesign-patterns.md- Domain-driven design and patternsextensions.md- Side-by-side extensions for SAP solutionsmta.md- Multitarget application packagingtesting.md- Testing strategies and frameworksux-design.md- SAP Fiori UX design guidelines
Integration & Security (4 files)
connectivity.md- Cloud-to-on-premise connectivitysecurity.md- Authentication, authorization, and securityhana-cloud.md- SAP HANA Cloud databaseresilience.md- Application resilience patterns
Deployment & Operations (5 files)
deployment.md- Deployment to CF, Kyma, and ABAPcicd.md- CI/CD pipelines with SAP toolsobservability.md- Monitoring, logging, and tracingoperations.md- Operations, scaling, and cost optimizationpartners.md- ISV/partner development guidelines
Learning & Updates (2 files)
tutorials.md- Hands-on missions and tutorialswhats-new.md- Latest features and changelog
Partner/ISV Development
Deployment Options
1. Multitenant SaaS - Cloud service operated in partner's global account 2. Add-on Product - Installed in customer's ABAP environment
Requirements
- SAP PartnerEdge Build contract
- Registered ABAP namespace (mandatory)
- Landscape Portal for lifecycle management
For partner details: See references/partners.md
Quick Reference Links
Official Documentation:
- SAP BTP Help: https://help.sap.com/docs/btp
- CAP Documentation: https://cap.cloud.sap/docs/
- SAP Discovery Center: https://discovery-center.cloud.sap/
- SAP API Business Hub: https://api.sap.com/
Design Resources:
- SAP Fiori Design: https://experience.sap.com/fiori-design-web/
- SAPUI5 SDK: https://sapui5.hana.ondemand.com/
Learning:
- SAP Developers: https://developers.sap.com/
- SAP Learning: https://learning.sap.com/
Source Documentation:
- This skill is based on: https://github.com/SAP-docs/btp-developer-guide
Common Errors and Solutions
| Error | Cause | Solution |
|---|---|---|
| Third-party cookie issues | Browser deprecation | See SAP Note 3409306 |
| XSUAA binding failures | Missing service instance | Run cf create-service xsuaa application |
| HANA deployment errors | Wrong target container | Check requires in mta.yaml |
| ATC Priority 1 findings | Non-cloud-compliant code | Use ABAP_CLOUD_DEVELOPMENT_DEFAULT variant |
Version Information
- Source Last Updated: 2025-11-21
- Based On: SAP BTP Developer Guide (https://github.com/SAP-docs/btp-developer-guide)
- Next Review: 2026-02-21
SAP BTP Developer Guide Skill
Comprehensive skill for developing business applications on SAP Business Technology Platform using CAP (Node.js/Java) or ABAP Cloud.
Capability Index
| Capability | Status |
|---|---|
| Commands | 1: /btp-app-readiness-review |
| Agents | 0 |
| Hooks | No |
| MCP | No |
| LSP | No |
| Source Freshness | last_verified: 2025-11-27; app readiness guidance requires project/tenant evidence for final verification. |
| Verification | npm run validate; deployment checks pending unless target evidence is provided. |
Auto-Trigger Keywords
This skill triggers when discussing:
Platform & Runtime
- SAP BTP, SAP Business Technology Platform
- Cloud Foundry, CF runtime, Cloud Foundry deployment
- Kyma, Kyma runtime, Kubernetes on SAP
- SAP BTP ABAP environment, ABAP Cloud
- BTP subaccount, global account, entitlements
CAP Development
- CAP, Cloud Application Programming Model
- CDS, Core Data Services, cds init
- CAP Node.js, CAP Java, CAP TypeScript
- cds watch, cds build, cds deploy
- @sap/cds, @sap/cds-dk
- OData service, REST API on BTP
ABAP Cloud Development
- RAP, ABAP RESTful Application Programming Model
- ABAP CDS views, ABAP behavior definition
- ABAP Development Tools, ADT Eclipse
- gCTS, abapGit, ABAP transport
- ABAP Cloud, ABAP environment
- ABAP unit test, ATC check
UI Development
- SAP Fiori, SAP Fiori Elements
- SAPUI5, UI5 development
- Fiori Launchpad, FLP
- SAP Build Work Zone
- Fiori annotations, UI annotations
Database
- SAP HANA Cloud, HDI container
- hdi-shared, HANA deployment
- CDS persistence, database artifacts
- HANA elastic scaling, NSE, ECN
Security
- XSUAA, xs-security.json
- SAP Identity Authentication, IAS
- OAuth, OpenID Connect on BTP
- Role collections, authorization
- SAP Credential Store
Connectivity
- SAP Connectivity Service, Cloud Connector
- SAP Destination Service, destinations
- Remote service, external service
- Principal propagation, user propagation
- SAP Cloud SDK
Integration
- SAP Event Mesh, eventing
- SAP Integration Suite
- SAP API Business Hub
- S/4HANA integration, SuccessFactors integration
- Side-by-side extension
Deployment
- MTA, multitarget application
- mta.yaml, mbt build
- cf deploy, cf push
- Helm chart, Kubernetes deployment
- Terraform SAP BTP
CI/CD
- SAP Continuous Integration and Delivery
- CI/CD pipeline SAP
- Build automation SAP
Observability
- SAP Cloud ALM, Cloud ALM
- SAP Cloud Logging
- OpenTelemetry SAP
- SAP Alert Notification
- Technical Monitoring Cockpit
Development Tools
- SAP Business Application Studio, BAS
- SAP Build, low-code SAP
- CF CLI, Cloud Foundry CLI
- SAP Fiori tools
Multitenancy
- Multitenant SAP, SaaS SAP BTP
- Tenant isolation, subscriber
- Key user extensibility
Partner/ISV
- SAP ISV, independent software vendor
- Landscape Portal
- Add-on product, partner solution
- SAP PartnerEdge
Operations
- System hibernation ABAP
- Elastic scaling ABAP
- ABAP compute units, ACU, HCU
- SAP BTP operations
Common Scenarios
- "deploy to SAP BTP"
- "create CAP application"
- "build Fiori app"
- "connect to S/4HANA"
- "set up HANA Cloud"
- "configure authentication BTP"
- "multitenant application"
- "ABAP Cloud development"
- "SAP extension application"
Skill Contents
Main File
SKILL.md- Core guidance for SAP BTP development
Reference Files (Progressive Disclosure)
| File | Content |
|---|---|
references/architecture.md | Platform services, tools, architecture |
references/cap-development.md | CAP development guide |
references/abap-cloud.md | ABAP Cloud development guide |
references/connectivity.md | Connectivity patterns and services |
references/security.md | Security implementation |
references/observability.md | Monitoring and logging |
references/cicd.md | CI/CD pipelines |
references/deployment.md | Deployment options |
references/tutorials.md | Learning paths and missions |
references/partners.md | ISV/Partner development |
references/operations.md | Operations and scaling |
references/tools.md | Development tools |
references/hana-cloud.md | SAP HANA Cloud |
references/resilience.md | Resilience patterns |
references/extensions.md | SAP solution extensions |
references/mta.md | Multitarget applications |
references/testing.md | Testing strategies |
references/ux-design.md | UX design and Fiori |
references/design-patterns.md | Design patterns and DDD |
references/setup.md | BTP setup and Terraform |
references/runtimes.md | Runtime comparison (CF vs Kyma vs ABAP) |
references/whats-new.md | Changelog and latest updates |
Tracking
Source Documentation
Based on: https://github.com/SAP-docs/btp-developer-guide
Installation
Copy the sap-btp-developer-guide folder to your Claude Code skills directory:
# User-level installation
cp -r sap-btp-developer-guide ~/.claude/skills/
# Project-level installation
cp -r sap-btp-developer-guide .claude/skills/Usage
The skill automatically activates when you discuss SAP BTP development topics. Examples:
- "Create a CAP application with HANA database"
- "Deploy my app to Cloud Foundry"
- "Set up authentication with XSUAA"
- "Connect to S/4HANA from my CAP app"
- "Build a multitenant SaaS application"
Version
- Skill Version: 1.1.0
- Last Updated: 2025-11-27
- Last Verified: 2025-11-27
- SAP BTP Developer Guide Source: https://github.com/SAP-docs/btp-developer-guide
License
GPL-3.0
ABAP Cloud Development Reference
Overview
ABAP Cloud is SAP's cloud-ready development model for building extensible, maintainable applications in the SAP BTP ABAP Environment.
Foundational Technologies
| Technology | Purpose |
|---|---|
| Core Data Services (CDS) | Data modeling, integrated analytics |
| ABAP RESTful Application Programming Model (RAP) | Service-oriented application development |
| Restricted ABAP Language | Cloud-safe development through controlled API access |
| Released Public APIs | Upgrade-stable extensions |
Development Environment
Primary IDE: ABAP Development Tools for Eclipse (ADT)
Additional Tools:
- ABAP Test Cockpit (ATC) - Static analysis
- ABAP Unit - Dynamic testing
- SAP Fiori Launchpad - UI deployment
Application Development Process
6-Step Development Workflow
| Step | Activity | Details |
|---|---|---|
| 1 | Model the Domain | Define domain-specific data models aligned with RAP architecture |
| 2 | Implement Business Behavior | Add validations, determinations, actions, consistency management |
| 3 | Expose Services | Define and bind services via OData |
| 4 | Secure Access | Configure authorization, assign proper scopes and roles |
| 5 | Build the UI | Develop SAP Fiori applications consuming services |
| 6 | Ensure Quality | Add automated tests and static checks |
Development Approaches
Develop from Scratch:
- Build new applications and services using RAP blueprint
- Domain-specific data models with extensibility built-in
Extend Existing Services:
- Extend SAP or custom services in upgrade-safe way
- Opt-in extensibility: original data models must explicitly enable each option
S/4HANA Extension Options
| Type | Description | Use Case |
|---|---|---|
| On-Stack | Extensions run within S/4HANA Cloud, share database and lifecycle | Tight integration, key-user extensibility (low-code), developer extensibility (pro-code) |
| Side-by-Side | Extensions run on SAP BTP with separate runtime and lifecycle | Loosely coupled solutions, partner offerings, hub scenarios |
Test Strategy
Automated Testing is essential for reliability, stability, and quality:
- Unit Tests: ABAP Unit for functional correctness
- Integration Tests: Cross-component validation
- Static Analysis: ABAP Test Cockpit (ATC)
Development Recommendations
1. Connect ABAP Cloud systems to Eclipse with ABAP Development Tools 2. Build OData services using RAP optimized for SAP HANA Cloud 3. Perform static code analysis with ATC including Code Vulnerability Analyzer 4. Use central ATC on SAP BTP for custom code governance 5. Leverage the Analyze Custom Code application for code inspection
Model-Driven Architecture
Three-Tier Structure
1. Data Access Layer - Database tables, CDS views 2. Domain Model Layer - Business logic, validations 3. Service Exposure Layer - OData services, Web APIs
Benefits
- Faster delivery via standardized stacks
- Interoperability through consistent rules
- Multipurpose CDS models (transactional + analytical)
CDS Data Modeling
Basic Entity Definition
@EndUserText.label: 'Travel'
@AccessControl.authorizationCheck: #NOT_REQUIRED
define root view entity ZI_Travel
as select from ztravel
{
key travel_uuid as TravelUUID,
travel_id as TravelID,
agency_id as AgencyID,
customer_id as CustomerID,
begin_date as BeginDate,
end_date as EndDate,
booking_fee as BookingFee,
total_price as TotalPrice,
currency_code as CurrencyCode,
description as Description,
overall_status as OverallStatus,
@Semantics.user.createdBy: true
created_by as CreatedBy,
@Semantics.systemDateTime.createdAt: true
created_at as CreatedAt,
@Semantics.user.lastChangedBy: true
last_changed_by as LastChangedBy,
@Semantics.systemDateTime.lastChangedAt: true
last_changed_at as LastChangedAt
}Projection View for UI
@EndUserText.label: 'Travel Projection'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.allowExtensions: true
define root view entity ZC_Travel
provider contract transactional_query
as projection on ZI_Travel
{
key TravelUUID,
TravelID,
AgencyID,
CustomerID,
BeginDate,
EndDate,
BookingFee,
TotalPrice,
CurrencyCode,
Description,
OverallStatus,
CreatedBy,
CreatedAt,
LastChangedBy,
LastChangedAt
}RAP Business Object Definition
Behavior Definition
managed implementation in class zbp_i_travel unique;
strict ( 2 );
define behavior for ZI_Travel alias Travel
persistent table ztravel
lock master
authorization master ( instance )
etag master LastChangedAt
{
// Standard operations
create;
update;
delete;
// Field controls
field ( readonly ) TravelUUID, TravelID, CreatedBy, CreatedAt, LastChangedBy, LastChangedAt;
field ( mandatory ) AgencyID, CustomerID;
// Determinations
determination setTravelID on modify { create; }
determination calculateTotalPrice on modify { field BookingFee; }
// Validations
validation validateCustomer on save { field CustomerID; }
validation validateDates on save { field BeginDate, EndDate; }
// Actions
action acceptTravel result [1] $self;
action rejectTravel result [1] $self;
// Factory action
factory action copyTravel [1];
// Draft handling
draft action Edit;
draft action Activate optimized;
draft action Discard;
draft action Resume;
draft determine action Prepare;
}Behavior Implementation
CLASS zbp_i_travel DEFINITION PUBLIC ABSTRACT FINAL
FOR BEHAVIOR OF zi_travel.
ENDCLASS.
CLASS zbp_i_travel IMPLEMENTATION.
METHOD setTravelID.
" Get max Travel ID
SELECT MAX( travel_id ) FROM ztravel INTO @DATA(lv_max_id).
" Set Travel ID for new entities
MODIFY ENTITIES OF zi_travel IN LOCAL MODE
ENTITY Travel
UPDATE FIELDS ( TravelID )
WITH VALUE #( FOR key IN keys
( %tky = key-%tky
TravelID = lv_max_id + 1 ) ).
ENDMETHOD.
METHOD validateDates.
READ ENTITIES OF zi_travel IN LOCAL MODE
ENTITY Travel
FIELDS ( BeginDate EndDate )
WITH CORRESPONDING #( keys )
RESULT DATA(lt_travels).
LOOP AT lt_travels INTO DATA(ls_travel).
IF ls_travel-BeginDate > ls_travel-EndDate.
APPEND VALUE #( %tky = ls_travel-%tky ) TO failed-travel.
APPEND VALUE #( %tky = ls_travel-%tky
%msg = new_message_with_text(
severity = if_abap_behv_message=>severity-error
text = 'End date must be after begin date' )
) TO reported-travel.
ENDIF.
ENDLOOP.
ENDMETHOD.
ENDCLASS.Service Definition and Binding
Service Definition
@EndUserText.label: 'Travel Service Definition'
define service ZUI_TRAVEL_O4 {
expose ZC_Travel as Travel;
}Service Binding
Create via ADT: OData V4 - UI binding type
Extensibility Options
Developer Extensibility
- Custom fields and nodes
- Custom business logic
- ABAP Development Tools required
Key User Extensibility (Multitenant SaaS)
- UI adaptations
- Custom fields
- Business Add-Ins (BAdIs)
- No coding required
Reuse Services
Pre-built building blocks available:
- Application Jobs
- Application Logging
- Forms (Adobe Document Services)
- Emails
- Change Documents
- Workflow (SAP Build Process Automation)
- Number Ranges
Transport Mechanisms
gCTS (Recommended)
- Modern transport for BTP systems within same global account
- Managed via "Manage Software Components" app
- Automatic Git repository management
abapGit
- Open-source Git client
- Use cases:
- Migrate on-premise code to cloud
- System decommissioning (export/import)
- Cross-account code transfers
- Not recommended for standard production transports
Quality Assurance
ABAP Test Cockpit (ATC)
Default Variant: ABAP_CLOUD_DEVELOPMENT_DEFAULT
Check Categories:
- Approved enhancement technologies
- API usage governance
- Critical ABAP statement analysis
- Code Vulnerability Analyzer (optional)
Blocking Mode: Configure to prevent Priority 1/2 findings from transport
ABAP Unit Testing
CLASS ltcl_travel DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PRIVATE SECTION.
DATA: mo_cut TYPE REF TO zcl_travel_handler.
METHODS setup.
METHODS test_date_validation FOR TESTING.
ENDCLASS.
CLASS ltcl_travel IMPLEMENTATION.
METHOD setup.
mo_cut = NEW #( ).
ENDMETHOD.
METHOD test_date_validation.
" Given
DATA(lv_begin) = cl_abap_context_info=>get_system_date( ).
DATA(lv_end) = lv_begin + 7.
" When
DATA(lv_valid) = mo_cut->validate_dates(
iv_begin = lv_begin
iv_end = lv_end
).
" Then
cl_abap_unit_assert=>assert_true( lv_valid ).
ENDMETHOD.
ENDCLASS.Elastic Scaling
ABAP Compute Units (ACUs)
- Manual scaling via BTP Cockpit
- Automatic elastic scaling (0.5 ACU increments)
- Metrics: CPU, memory, work process counts
HANA Compute Units (HCUs)
- Manual adjustment with near-zero downtime
- Native Storage Extension for cost optimization
System Hibernation
Benefits:
- Reduces costs to <5% of operational expenses
- Preserves HANA Cloud instance
- Automatic restart during scheduled maintenance
Management:
- Via Landscape Portal
- Scheduling available (except trial accounts)
SAP Joule Integration
AI Capabilities: 1. Predictive code completion 2. Joule chat (natural language) 3. Code explanation 4. ABAP Unit generation 5. CDS test generation
ABAP AI SDK:
- Standardized access to language models on SAP AI Core
- Intelligent Scenario Lifecycle Management
Partner Deployment Models
Multitenant SaaS
- Cloud service in partner's global account
- Customers subscribe
- Partner manages operations
- Key user extensibility for customers
Add-on Product
- Installed in customer's ABAP environment
- Customer manages lifecycle
- Developer extensibility available
- Requires SAP PartnerEdge Build contract
Requirements
- Registered ABAP namespace (mandatory)
- Software Components for transport
- Landscape Portal for lifecycle management
Upgrade Management
Downtime-Optimized Upgrades
1. Preparation: New release in shadow layer (system available) 2. Takeover: 10-40 minutes downtime 3. Postprocessing: Background cleanup (system available)
Pre-Upgrade Option
- Test on non-production 4 weeks before release
- Validate custom applications
- Report issues through SAP support
Source Documentation
- ABAP Environment: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/sap-btp-abap-environment-with-abap-cloud-174b229.md
- ABAP Cloud Development: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/developing-with-abap-cloud-in-the-sap-btp-abap-environment-9aaaf65.md
- Elastic Scaling: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/benefit-from-the-elastic-scaling-of-abap-application-servers-c1d35c5.md
- System Hibernation: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/use-system-hibernation-6a8d7ee.md
- ATC Governance: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/keep-clean-core-governance-with-abap-test-cockpit-698ddfa.md
- Joule: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/use-joule-for-developers-generative-ai-in-abap-cloud-63c8ac1.md
SAP BTP Architecture Reference
Platform Overview
SAP BTP provides a three-tier architecture:
- Presentation Layer: SAP Fiori/SAPUI5 frontends
- Logic Layer: CAP (Node.js/Java) or ABAP Cloud
- Persistence Layer: SAP HANA Cloud
Data Protocols:
- OData (transactional data)
- InA (analytical data)
Core Services Catalog
Persistence & Data
| Service | Purpose | Details |
|---|---|---|
| SAP HANA Cloud | Database-as-a-Service | Relational, document, geospatial, vector data |
| HANA Data Lake Files | Object storage | Large-scale data storage |
| SAP Datasphere | Cross-application analytics | Data federation and warehousing |
HANA Cloud Optimization Features:
| Feature | Description | Free/Trial | Paid |
|---|---|---|---|
| Native Storage Extension (NSE) | Store infrequently accessed data on disk | No | Yes |
| Elastic Compute Nodes (ECN) | On-demand scaling for peak workloads | No | Yes |
| Table Partitioning | Enhanced query performance | Limited | Yes |
| Native Multi-Tenancy | Up to 1,000 isolated tenants per instance | No | Yes |
| Free Tier | 16GB memory at no cost | Yes (16GB) | N/A |
Note: Feature availability varies by plan. See SAP HANA Cloud Capacity Units for detailed tier comparison.
Integration Services
| Service | Purpose | Supported Scenarios |
|---|---|---|
| SAP Event Mesh | Event distribution | Cross-application eventing |
| SAP Integration Suite | API Management, Cloud Integration | B2B, A2A, API publishing |
| SAP Master Data Integration | Central data hub | SAP One Domain Model |
| Cloud Integration Automation | Guided workflows | Automated integration setup |
Identity & Security
| Service | CAP | ABAP |
|---|---|---|
| SAP Authentication and Trust Management | Yes | Yes |
| Identity Authentication | Yes (SSO, on-prem) | Yes (SSO, on-prem) |
| SAP Credential Store | Yes (secrets via REST) | Communication Management |
| SAP Audit Log Service | Yes | Security audit logging |
| Identity Provisioning | Yes | Yes (business user provisioning) |
Workflow & Automation
| Service | Purpose |
|---|---|
| SAP Task Center | Unified inbox across applications |
| SAP Build Process Automation | Workflow, RPA, decision management |
| SAP Job Scheduling Service | REST APIs, recurring schedules (CAP) |
| Application Jobs | Integrated scheduling (ABAP) |
Observability
| Service | Purpose |
|---|---|
| SAP Cloud ALM | Central monitoring (RUM, health, integration) |
| SAP Cloud Logging | Logs, metrics, traces (OpenSearch-based) |
| SAP Alert Notification | Event subscriptions, multi-channel delivery |
| Technical Monitoring Cockpit | ABAP on-stack analysis |
Extensibility Services
| Service | Purpose |
|---|---|
| SAP S/4HANA Cloud Extensibility | Side-by-side extensions |
| SAP SuccessFactors Extensibility | HR solution extensions |
| SAP Build Work Zone | Business sites, central entry point |
Client Libraries
CAP (Non-ABAP)
- SAP Cloud SDK: OData/OpenAPI clients, Destination, Connectivity services
- Languages: Java (Spring Boot), JavaScript, TypeScript (Node.js)
- Guaranteed Node.js/Java version compatibility
ABAP
- Service Consumption Model: Generates local APIs for OData, SOAP, RFC
- Communication Management: System integration with credentials
- Native RAP event support
User Interface Options
Web Development
| Approach | Description | Use When |
|---|---|---|
| SAP Fiori Elements | Predefined templates (List Report, Object Page) | Standard business apps |
| Flexible Programming Model | Fiori Elements + custom extensions | Selective customization |
| Freestyle SAPUI5 | Full UI control | Highly custom interfaces |
Mobile Development
| SDK | Platform |
|---|---|
| SAP Mobile Development Kit | Cross-platform |
| SAP BTP SDK for Android | Android native |
| SAP BTP SDK for iOS | iOS native |
Features: Offline sync, push notifications, mobile security
Central Access Points
| Application Type | Entry Point |
|---|---|
| CAP Applications | SAP Build Work Zone, HTML5 Repository |
| ABAP Applications | SAP Fiori Launchpad for BTP ABAP Environment |
Analytics Capabilities
CAP
- SAP Analytics Cloud (embedded dashboards)
- SAP Datasphere (cross-application analytics)
ABAP
- SAP Analytics Cloud on InA-enabled CDS models
- Dragonfly-based multidimensional reporting
- SAP Datasphere via ABAP SQL Service
System Landscape Management
Unified Customer Landscape
- Auto-discovery of associated systems
- Manual system registration
- Support for S/4HANA, Ariba, SuccessFactors, third-party
ABAP-Specific
- Landscape Portal for system hibernation
- Pre-upgrade nomination for quarterly releases
Low-Code/No-Code Options
SAP Build Suite:
- SAP Build Apps (enterprise applications)
- SAP Build Process Automation (workflow, RPA)
- SAP Build Work Zone (business sites)
- Prebuilt connectors for SAP and third-party
Infrastructure Automation
| Tool | Purpose |
|---|---|
| Terraform Provider for SAP BTP | Resource provisioning automation |
| SAP Automation Pilot | Operational task automation, database lifecycle |
Key Design Principles
1. API-First: Follow SAP Business Accelerator Hub guidelines 2. Compliance: Accessibility, theming for all UI components 3. Observability: Central unified operations experience 4. Consistency: Unified solution experience across customer base 5. Enterprise Standards: Prefer SAP BTP services over custom solutions
Source Documentation
CAP Development Reference
Overview
SAP Cloud Application Programming Model (CAP) is SAP's recommended framework for building enterprise-grade applications on SAP BTP using Node.js or Java.
Operational Profiles
CAP provides three operational profiles for different development stages:
Development Profile
Database: SQLite (Node.js) / H2 (Java)
Features:
- Rapid prototyping with minimal setup
- Mocked variants of SAP BTP services (authentication, database, messaging, app gateway)
- No BTP subscription required
- Cost-effective testing
Usage:
cds watch # Automatically uses development profileHybrid Profile
Database: Cloud services (e.g., SAP HANA Cloud)
Features:
- Run application locally
- Bind to real cloud services for integration testing
- Use
cds bindor local configuration files - Test with production-like data
Usage:
cds bind --to hana:my-hana-instance
cds watch --profile hybridProduction Profile
Database: SAP HANA Cloud
Features:
- Deployed to SAP BTP (Cloud Foundry or Kyma)
- Platform-managed service bindings
- Production configuration for logging and security
- Database migrations via
cds deploy
Usage:
cds build --production
cf deploy mta_archives/my-app.mtarProfile Summary
| Profile | Database | Use Case |
|---|---|---|
| Development | SQLite/H2 | Local prototyping, mock services |
| Hybrid | Cloud services | Local app with cloud DB/services |
| Production | SAP HANA Cloud | Full cloud deployment |
Supported Languages and Runtimes
| Language | Framework | Runtime Options |
|---|---|---|
| Node.js | Express.js | Cloud Foundry, Kyma |
| Java | Spring Boot | Cloud Foundry, Kyma |
| TypeScript | Node.js | Cloud Foundry, Kyma |
Development Tools
| Tool | Purpose |
|---|---|
| SAP Business Application Studio | Primary cloud IDE |
| Visual Studio Code | Local development with CDS extension |
| IntelliJ IDEA | Java CAP development |
| CDS CLI | Command-line development |
Core CDS Commands
# Initialize new project
cds init my-project
# Add features
cds add hana # SAP HANA Cloud support
cds add xsuaa # Authentication
cds add mta # MTA descriptor
cds add helm # Helm charts for Kyma
cds add multitenancy # Multitenant support
cds add approuter # Application router
# Development
cds watch # Run with live reload
cds build # Build for deployment
cds deploy # Deploy to HANA
# Service inspection
cds compile # Compile CDS models
cds serve # Start servicesDomain Modeling with CDS
Entity Definition
namespace my.bookshop;
entity Books {
key ID : UUID;
title : String(111);
author : Association to Authors;
stock : Integer;
}
entity Authors {
key ID : UUID;
name : String(111);
books : Association to many Books on books.author = $self;
}Service Definition
using my.bookshop from '../db/schema';
service CatalogService {
@readonly entity Books as projection on bookshop.Books;
entity Authors as projection on bookshop.Authors;
action submitOrder(book: Books:ID, quantity: Integer);
}CAP Design Principles
Domain-Driven Design
- Focus on core domain logic
- Align code structure with business concepts
- Collaboration between technical and domain experts
Agnostic Design
CAP abstracts:
- Deployment approaches
- Authentication strategies
- Protocols (REST, OData, GraphQL)
- Asynchronous channels
- Database technologies
Out-of-the-Box Integration
- SAP HANA Cloud for persistence
- Authorization management services
- Connectivity tools for external systems
Platform Integration
Database Support
| Database | Use Case |
|---|---|
| SQLite | Development (Node.js) |
| H2 | Development (Java) |
| PostgreSQL | Production alternative |
| SAP HANA Cloud | Production (recommended) |
Service Bindings
# mta.yaml service binding example
modules:
- name: my-srv
type: nodejs
requires:
- name: my-hana
- name: my-xsuaa
- name: my-destination
resources:
- name: my-hana
type: com.sap.xs.hdi-container
- name: my-xsuaa
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: applicationMicroservices Architecture
CAP supports microservice development with:
- Separate lifecycles per service
- Independent runtimes
- Event-based communication
Considerations:
- Microservices introduce complexity
- Potential performance trade-offs
- Start monolithic, extract when needed
API Consumption
Supported Protocols
- OData V2/V4
- REST
- OpenAPI
SAP Cloud SDK Integration
Generate typed client (recommended approach):
# Generate OData client from service specification
npx @sap-cloud-sdk/generator --input ./API_BUSINESS_PARTNER.edmx --outputDir ./generatedUse generated client:
// Import from generated client (path depends on generator output)
const { businessPartnerApi } = require('./generated/business-partner-service');
// Fetch business partners from S/4HANA
const businessPartners = await businessPartnerApi
.requestBuilder()
.getAll()
.execute({ destinationName: 'S4HANA' });Note: The@sap/cloud-sdk-vdm-*packages are deprecated. Use@sap-cloud-sdk/generatorto generate typed clients from OData service specifications. See SAP Cloud SDK documentation for details.
Multitenancy
Enable Multitenancy
cds add multitenancyKey Features
- Tenant isolation
- Per-tenant database schemas
- Subscription lifecycle hooks
- Resource sharing across tenants
SaaS Entry Points
| Approach | Description | Consumer Requirements |
|---|---|---|
| Central | SAP Build Work Zone managed | Own Work Zone instance |
| Local | Standalone app router | None |
Extensibility
In-App Extensions
// Extend existing service
extend service CatalogService with {
entity CustomEntity {
key ID : UUID;
customField : String;
}
}Custom Handlers
// srv/cat-service.js
module.exports = (srv) => {
srv.before('CREATE', 'Books', async (req) => {
// Validation logic
if (!req.data.title) {
req.error(400, 'Title is required');
}
});
srv.on('submitOrder', async (req) => {
// Custom action implementation
const { book, quantity } = req.data;
// Process order...
});
};Security Implementation
Authentication
// Require authentication
service CatalogService @(requires: 'authenticated-user') {
entity Books as projection on bookshop.Books;
}Authorization
// Role-based access
service AdminService @(requires: 'admin') {
entity Books as projection on bookshop.Books;
@(restrict: [{ grant: 'READ', to: 'viewer' }])
entity Reports { ... }
}Built-in Security Features
- Parameterized queries (SQL injection prevention)
- CSRF protection for UI applications
- CDS constraints for input validation
Testing
Unit Testing with Jest
const cds = require('@sap/cds');
describe('CatalogService', () => {
let srv;
beforeAll(async () => {
srv = await cds.connect.to('CatalogService');
});
it('should return books', async () => {
const books = await srv.read('Books');
expect(books).toBeDefined();
});
});Integration Testing
# Run tests
npm test
# With coverage
npm test -- --coverageDeployment Commands
Cloud Foundry
# Build MTA
mbt build
# Deploy
cf deploy mta_archives/my-project_1.0.0.mtar
# Or with cf push for simple apps
cf pushKyma
# Add Helm support
cds add helm
# Deploy with Helm
helm upgrade --install my-app ./chartCommon Issues and Solutions
| Issue | Cause | Solution |
|---|---|---|
HANA deployment fails | Wrong HDI container | Verify requires in mta.yaml |
Authentication errors | XSUAA not bound | Run cf bind-service |
Database connection refused | Wrong profile | Set NODE_ENV=production |
Model compilation errors | CDS syntax | Run cds compile --to json for details |
Source Documentation
- CAP Documentation: https://cap.cloud.sap/docs/
- SAP BTP CF/Kyma with CAP: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/sap-btp-cloud-foundry-and-sap-btp-kyma-runtimes-with-cap-0f9cfe9.md
- Development Guide: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/develop-7e30686.md
SAP BTP CI/CD Reference
Overview
Continuous Integration (CI) and Continuous Delivery (CD) are complementary DevOps practices that automate application development, testing, and deployment on SAP BTP.
Core Concepts
Continuous Integration (CI)
- Frequent code integration into central repository
- Automated builds and tests on each commit
- Early error detection
- Prevents integration problems from accumulating
Continuous Delivery (CD)
- Extends CI with deployment automation
- Successfully tested changes ready for release review
- Code built, tested, and packaged in deployable format
- Deploy at management's discretion
SAP Continuous Integration and Delivery
Service Type: BTP-native service with pre-configured pipelines
Advantages
| Feature | Benefit |
|---|---|
| Simplicity | Out-of-the-box pipelines, minimal configuration |
| Flexibility | Customizable pipelines, additional commands |
| Infrastructure | Built-in management, no server maintenance |
| SAP-Specific | Optimized for SAP technologies |
Supported Pipeline Types
| Pipeline | Use Case |
|---|---|
| Cloud Foundry Environment | SAP Fiori, CAP applications |
| SAP Fiori for ABAP Platform | Fiori apps on ABAP |
| SAP Integration Suite Artifacts | Integration content |
Setup Process
Step 1: Enable Service
1. Open SAP BTP Cockpit 2. Navigate to subaccount 3. Enable "Continuous Integration & Delivery" 4. Subscribe to the service
Step 2: Assign Roles
| Role | Permissions |
|---|---|
| Administrator | Full access, job management |
| Developer | Create/run jobs, view results |
Step 3: Configure Repository Credentials
Supported Repositories:
- GitHub
- GitLab
- Bitbucket
- Azure Repos
# Example credential configuration
credentials:
- name: github-credentials
type: basic
username: ${GITHUB_USER}
password: ${GITHUB_TOKEN}Step 4: Create CI/CD Job
# .pipeline/config.yml for CAP application
general:
projectName: my-cap-app
buildTool: mta
stages:
Build:
mtaBuildParameters:
platform: cf
Additional Unit Tests:
npmExecuteScripts: true
npmScripts: ['test']
Release:
cloudFoundryDeploy: true
cfApiEndpoint: https://api.cf.eu10.hana.ondemand.com
cfOrg: my-org
cfSpace: my-space
mtarFilePath: mta_archives/my-cap-app.mtarStep 5: Configure Webhooks
Automate builds on push: 1. Copy webhook URL from CI/CD service 2. Add webhook in repository settings 3. Select events (push, pull request)
Pipeline Configuration
CAP Node.js Pipeline
# .pipeline/config.yml
general:
buildTool: mta
stages:
Build:
mtaBuildParameters:
platform: cf
Additional Unit Tests:
npmExecuteScripts: true
npmScripts:
- test
Acceptance:
cfDeploy: true
cloudFoundryDeploy: true
cfApiEndpoint: https://api.cf.eu10.hana.ondemand.com
cfOrg: my-org
cfSpace: dev
Release:
cfDeploy: true
cloudFoundryDeploy: true
cfApiEndpoint: https://api.cf.eu10.hana.ondemand.com
cfOrg: my-org
cfSpace: prodCAP Java Pipeline
general:
buildTool: mta
stages:
Build:
mtaBuildParameters:
platform: cf
mavenExecuteStaticCodeChecks: true
Additional Unit Tests:
mavenExecute: true
goals: ['test']SAP Fiori Pipeline
general:
buildTool: npm
stages:
Build:
npmExecuteScripts: true
npmScripts: ['build']
Additional Unit Tests:
npmExecuteScripts: true
npmScripts: ['test']
karmaExecuteTests: trueABAP CI/CD
gCTS Integration
# Pipeline for ABAP Cloud
stages:
Import:
abapEnvironmentPullGitRepo: true
repositoryName: my-software-component
Test:
abapEnvironmentRunATCCheck: true
atcConfig:
checkVariant: ABAP_CLOUD_DEVELOPMENT_DEFAULT
Release:
abapEnvironmentAssembleConfirm: trueATC Integration
stages:
Quality:
abapEnvironmentRunATCCheck: true
atcConfig:
checkVariant: ABAP_CLOUD_DEVELOPMENT_DEFAULT
failOn: ERROR
priorityFilter:
- '1'
- '2'Kyma CI/CD
Terraform Integration
# main.tf for Kyma provisioning
module "kyma" {
source = "github.com/SAP/terraform-module-kyma"
subaccount_id = var.subaccount_id
cluster_name = "my-kyma-cluster"
region = "eu-central-1"
}Helm Deployment
stages:
Build:
containerBuild: true
dockerfilePath: Dockerfile
Deploy:
helmDeploy: true
helmValues:
- ./chart/values.yaml
kubeConfigPath: ${KUBECONFIG}Security in CI/CD
Code Scanning
stages:
Security:
sonarQubeScan: true
sonarQubeConfig:
serverUrl: ${SONAR_URL}
projectKey: my-project
dependencyTrackUpload: true
fortifyScan: trueSecrets Management
# Using credentials
credentials:
- name: cf-credentials
type: usernamePassword
username: ${CF_USER}
password: ${CF_PASSWORD}
- name: hana-credentials
type: usernamePassword
username: ${HANA_USER}
password: ${HANA_PASSWORD}Best Practices
Pipeline Design
1. Keep pipelines fast (< 15 minutes ideal) 2. Fail fast on critical issues 3. Use parallel stages where possible 4. Cache dependencies
Testing Strategy
stages:
Unit Tests:
# Fast, run on every commit
npmScripts: ['test:unit']
Integration Tests:
# Slower, run on PR merge
npmScripts: ['test:integration']
E2E Tests:
# Slowest, run before release
npmScripts: ['test:e2e']Environment Strategy
| Environment | Trigger | Purpose |
|---|---|---|
| Development | Every push | Developer testing |
| QA | PR merge | QA testing |
| Staging | Release branch | Pre-production |
| Production | Manual approval | Live system |
Monitoring
Job Status
- View in CI/CD service UI
- Email notifications
- Webhook integrations
Metrics
- Build duration
- Success rate
- Test coverage
- Deployment frequency
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Build timeout | Long-running tests | Increase timeout, parallelize |
| Authentication failed | Expired credentials | Refresh tokens |
| Deployment failed | Resource quota | Check CF/Kyma limits |
| Test failures | Environment mismatch | Use consistent test data |
Learning Resources
| Resource | Description |
|---|---|
| "Exploring DevOps with SAP BTP" | SAP Learning course |
| "Efficient DevOps with SAP" | openSAP course |
| CI/CD Introduction Guide | Technical documentation |
Source Documentation
- CI/CD Overview: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/continuous-integration-and-delivery-ci-cd-fe74df5.md
- CI/CD Introduction: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/introducing-continuous-integration-and-delivery-ci-cd-8ee5353.md
- SAP CI/CD Service: https://help.sap.com/docs/continuous-integration-and-delivery
SAP BTP Connectivity Reference
Overview
SAP BTP provides comprehensive connectivity infrastructure for secure communication between cloud applications and various system types including on-premise systems, private clouds, and public cloud services.
Core Components
SAP Connectivity Service
Purpose: Secure connections to on-premise and private cloud systems
Features:
- Cloud Connector integration
- Connectivity Proxy support
- Multiple protocol support
Cloud Connector
Purpose: Secure link between cloud and on-premise systems
Characteristics:
- Operates as reverse proxy in secured networks
- Controlled resource access
- No inbound firewall rules required
- High availability configuration supported
Installation:
- Windows or Linux
- Portable version available
- Master-shadow configuration for HA
Connectivity Proxy
Purpose: Cloud-side counterpart to Cloud Connector
Supported Environments:
- Cloud Foundry
- Kyma
- Native Kubernetes
- ABAP Environment
SAP Destination Service
Purpose: Routing and authentication management
Capabilities:
- Store connection properties
- Manage OAuth token flows
- Custom parameter handling
- Design-time configuration
Destination Types:
| Type | Use Case |
|---|---|
| HTTP | REST/OData APIs |
| RFC | SAP function calls |
| LDAP | Directory services |
| Email servers |
SAP Transparent Proxy
Purpose: Simplify Kubernetes connectivity
Features:
- Exposes target systems on local network
- Automates authentication
- Automatic destination retrieval
- Native Kubernetes integration
Connectivity Patterns
Cloud-to-Cloud
Use Cases:
- Kubernetes to databases
- Application to SAP services
- OData endpoint consumption
- Third-party API integration
Implementation:
# destination configuration
- name: S4HANA_CLOUD
type: HTTP
url: https://my-s4.cloud.sap
authentication: OAuth2SAMLBearerAssertion
tokenServiceURL: https://my-s4.cloud.sap/sap/bc/sec/oauth2/tokenCloud-to-On-Premise
Supported Systems:
- ABAP systems (RFC, OData)
- Databases
- Mail servers
- FTP servers
- LDAP directories
User Propagation:
- Principal propagation supported
- SSO via SAML/OAuth
- Technical user fallback
Configuration Steps: 1. Install Cloud Connector 2. Connect to BTP subaccount 3. Map virtual hosts to internal systems 4. Configure destinations in BTP Cockpit
On-Premise-to-Cloud
Use Cases:
- RFC callbacks from cloud
- Kubernetes cluster service access
- Event notifications
Destination Configuration
HTTP Destination (CAP)
// package.json
{
"cds": {
"requires": {
"API_BUSINESS_PARTNER": {
"kind": "odata-v2",
"model": "srv/external/API_BUSINESS_PARTNER",
"credentials": {
"destination": "S4HANA",
"path": "/sap/opu/odata/sap/API_BUSINESS_PARTNER"
}
}
}
}
}Destination in BTP Cockpit
| Property | Value | Description |
|---|---|---|
| Name | S4HANA | Destination identifier |
| Type | HTTP | Protocol type |
| URL | https://... | Target system URL |
| Proxy Type | Internet/OnPremise | Connection type |
| Authentication | OAuth2SAMLBearerAssertion | Auth method |
Authentication Types
| Type | Use Case |
|---|---|
| NoAuthentication | Public APIs |
| BasicAuthentication | Technical users |
| OAuth2ClientCredentials | Server-to-server |
| OAuth2SAMLBearerAssertion | User propagation |
| OAuth2UserTokenExchange | Token exchange |
| PrincipalPropagation | SSO on-premise |
| ClientCertificateAuthentication | mTLS |
Cloud Connector Configuration
System Mapping
Cloud Configuration:
Virtual Host: s4hana.cloud
Virtual Port: 443
On-Premise Configuration:
Internal Host: s4hana.internal.corp
Internal Port: 44300
Protocol: HTTPSAccess Control
- Define allowed resources
- Path-based filtering
- HTTP method restrictions
High Availability
1. Install secondary Cloud Connector 2. Configure as shadow instance 3. Automatic failover
CAP Integration
Remote Service Configuration
// srv/external/API_BUSINESS_PARTNER.cds
using { API_BUSINESS_PARTNER as external } from './API_BUSINESS_PARTNER';
service RemoteService {
entity BusinessPartners as projection on external.A_BusinessPartner {
BusinessPartner,
BusinessPartnerFullName,
BusinessPartnerType
};
}Service Implementation
const cds = require('@sap/cds');
module.exports = cds.service.impl(async function() {
const bupa = await cds.connect.to('API_BUSINESS_PARTNER');
this.on('READ', 'BusinessPartners', async (req) => {
return bupa.run(req.query);
});
});ABAP Integration
Communication Arrangement
1. Create Communication System 2. Define Communication Arrangement 3. Configure Authentication 4. Test Connection
Service Consumption Model
" Generated proxy class usage
DATA(lo_client) = NEW /sap/bc/bupa/a_businesspartner( ).
TRY.
DATA(lt_partners) = lo_client->get_business_partners(
iv_top = 100
).
CATCH cx_remote_call_error INTO DATA(lx_error).
" Handle error
ENDTRY.RFC Destination (SM59 equivalent)
- Configure in Communication Systems app
- Support for trusted RFC
- User propagation options
Kyma Connectivity
Transparent Proxy Deployment
apiVersion: gateway.kyma-project.io/v1beta1
kind: APIRule
metadata:
name: my-api
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
host: my-api
rules:
- path: /.*
methods: ["GET", "POST"]
accessStrategies:
- handler: jwtDestination Binding
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
name: destination-binding
spec:
serviceInstanceName: destination-instance
secretName: destination-secretBest Practices
1. Use Transparent Proxy for Kubernetes connectivity 2. Design-time configuration via Destination Service 3. Connectivity Service for hybrid cloud-to-on-premise 4. Principal propagation when user context needed 5. Technical users for batch/background processing 6. High availability Cloud Connector for production
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Connection timeout | Firewall blocking | Check Cloud Connector logs |
| Authentication failed | Token expired | Refresh OAuth configuration |
| Destination not found | Wrong name | Verify destination exists in subaccount |
| Certificate error | Untrusted CA | Import certificate in Cloud Connector |
Source Documentation
- Connecting to Remote Systems: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/connecting-to-remote-systems-d61a5fc.md
- SAP Connectivity Service: https://help.sap.com/docs/connectivity
- Cloud Connector: https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/cloud-connector
SAP BTP Deployment Reference
Overview
SAP BTP supports multiple deployment approaches depending on the runtime (Cloud Foundry, Kyma, or ABAP Environment) and application architecture.
Cloud Foundry Deployment
Multitarget Application (MTA)
Recommended for: Complex applications with multiple modules and services
Build and Deploy
# Install MTA Build Tool
npm install -g mbt
# Build MTA archive
mbt build
# Deploy to Cloud Foundry
cf deploy mta_archives/my-app_1.0.0.mtarmta.yaml Structure
_schema-version: "3.1"
ID: my-cap-app
version: 1.0.0
parameters:
enable-parallel-deployments: true
modules:
# Backend service
- name: my-srv
type: nodejs
path: gen/srv
parameters:
buildpack: nodejs_buildpack
memory: 256M
requires:
- name: my-hana
- name: my-xsuaa
- name: my-destination
provides:
- name: srv-api
properties:
srv-url: ${default-url}
# UI application
- name: my-app
type: approuter.nodejs
path: app/
parameters:
memory: 256M
requires:
- name: srv-api
group: destinations
properties:
name: srv-api
url: ~{srv-url}
forwardAuthToken: true
- name: my-xsuaa
- name: my-html5-repo-runtime
# Database deployer
- name: my-db-deployer
type: hdb
path: gen/db
parameters:
buildpack: nodejs_buildpack
requires:
- name: my-hana
resources:
- name: my-hana
type: com.sap.xs.hdi-container
parameters:
service: hana
service-plan: hdi-shared
- name: my-xsuaa
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
- name: my-destination
type: org.cloudfoundry.managed-service
parameters:
service: destination
service-plan: lite
- name: my-html5-repo-runtime
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-plan: app-runtimeSimple cf push
For: Simple applications without complex dependencies
# Deploy single application
cf push my-app -p ./dist -m 256M -b nodejs_buildpackmanifest.yml
applications:
- name: my-app
memory: 256M
instances: 1
buildpack: nodejs_buildpack
path: ./dist
routes:
- route: my-app.cfapps.eu10.hana.ondemand.com
services:
- my-xsuaa
- my-destination
env:
NODE_ENV: productionKyma Deployment
Helm Charts
# Add Helm support to CAP
cds add helm
# Deploy to Kyma
helm upgrade --install my-app ./chart \
--namespace my-namespace \
--set image.repository=my-registry/my-app \
--set image.tag=1.0.0Helm Chart Structure
chart/
├── Chart.yaml
├── values.yaml
└── templates/
├── deployment.yaml
├── service.yaml
├── hpa.yaml
└── servicebinding.yamlvalues.yaml
replicaCount: 2
image:
repository: my-registry/my-app
tag: "1.0.0"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8080
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilization: 80
serviceBindings:
hana:
serviceInstanceName: my-hana
xsuaa:
serviceInstanceName: my-xsuaaTerraform for Kyma
Purpose: Automate Kyma cluster provisioning via CI/CD pipelines for resource creation, deployment, testing, and teardown.
Key Resources:
- Terraform Provider for SAP BTP:
SAP/btp- Official SAP-maintained provider (Terraform Registry) - Kyma Terraform Module:
github.com/kyma-project/terraform-module- Open-source module maintained by the Kyma project (SAP-backed)
Note: The Kyma Terraform module is an open-source project. Verify version compatibility and review the module documentation before production use.
Prerequisites
1. Terraform CLI on CI worker agents 2. Admin access (subaccount or global account level) 3. Dedicated Identity Authentication tenant 4. Technical user account
Variables File (.tfvars)
# .tfvars - Store securely, use credential management
BTP_BOT_USER = "technical-user@example.com"
BTP_BOT_PASSWORD = "***"
BTP_GLOBAL_ACCOUNT = "global-account-subdomain"
BTP_BACKEND_URL = "https://cpcli.cf.sap.hana.ondemand.com"
BTP_CUSTOM_IAS_TENANT = "custom-ias-tenant"
BTP_NEW_SUBACCOUNT_NAME = "my-subaccount"
BTP_NEW_SUBACCOUNT_REGION = "eu10"
BTP_KYMA_PLAN = "azure"
BTP_KYMA_REGION = "westeurope"main.tf Configuration
# main.tf
terraform {
required_providers {
btp = {
source = "SAP/btp"
}
}
}
provider "btp" {
globalaccount = var.globalaccount
}
# Create Kyma environment using official module
module "kyma" {
source = "git::https://github.com/kyma-project/terraform-module.git?ref=v0.3.1"
subaccount_id = var.subaccount_id
cluster_name = var.BTP_NEW_SUBACCOUNT_NAME
region = var.BTP_KYMA_REGION
administrators = [
"admin@example.com"
]
}
# Outputs
output "kubeconfig" {
value = module.kyma.kubeconfig
sensitive = true
}
output "cluster_id" {
value = module.kyma.cluster_id
}
output "domain" {
value = module.kyma.domain
}Execution Commands
# Initialize Terraform
terraform init
# Apply configuration
terraform apply -var-file=.tfvars -auto-approve
# Retrieve outputs
terraform output -raw cluster_id
# Destroy resources when done
terraform destroy -var-file=.tfvars -auto-approveSecurity Recommendation: Use credential management systems (e.g., HashiCorp Vault) for sensitive variables
ABAP Deployment
Software Components (gCTS)
Manage Software Components App:
1. Create software component 2. Clone to development system 3. Develop and release transport requests 4. Pull to test/production systems
Development Flow:
[Dev System] → Release TR → [Git Repository] → Pull → [Test System] → Pull → [Prod System]Partner Deployment
Multitenant SaaS
Partner Global Account:
├── Provider Subaccount
│ ├── ABAP System (Development)
│ ├── ABAP System (Test)
│ └── ABAP System (Production)
│ └── Tenant 1
│ └── Tenant 2
│ └── Tenant NSubscription Process: 1. Customer subscribes via SaaS Provisioning 2. Tenant automatically created 3. Customer receives access URL
Add-on Product
Partner Global Account:
├── Development Subaccount
│ └── ABAP System (Dev)
├── Test Subaccount
│ └── ABAP System (Test)
└── Assembly Subaccount
└── ABAP System (Assembly)
Customer Global Account:
└── Production Subaccount
└── ABAP System + Add-onDelivery via Landscape Portal: 1. Build add-on product 2. Register in SAP Store 3. Customer installs via Landscape Portal
abapGit (Migration)
Use Cases:
- On-premise to cloud migration
- System decommissioning
- Cross-account transfers
Not recommended for: Standard production transports
SAP Cloud Transport Management
Configuration
# Integration with CI/CD
transport:
enabled: true
landscape:
- name: DEV
type: Cloud Foundry
- name: QA
type: Cloud Foundry
requires: DEV
- name: PROD
type: Cloud Foundry
requires: QATransport Routes
DEV → QA → PROD
↓
[Manual Approval]Deployment Best Practices
Blue-Green Deployment
# Deploy new version
cf push my-app-blue
# Test blue deployment
# ...
# Switch routes
cf map-route my-app-blue cfapps.eu10.hana.ondemand.com --hostname my-app
cf unmap-route my-app-green cfapps.eu10.hana.ondemand.com --hostname my-appRolling Updates (Kyma)
# deployment.yaml
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0Environment Variables
# mta.yaml
modules:
- name: my-srv
properties:
NODE_ENV: production
LOG_LEVEL: info
# Don't hardcode secrets!Resource Sizing
| Environment | Memory | Instances |
|---|---|---|
| Development | 256M | 1 |
| QA | 512M | 2 |
| Production | 1G | 3+ |
Common Issues
| Issue | Cause | Solution |
|---|---|---|
| Memory exceeded | Insufficient allocation | Increase memory in mta.yaml |
| Service binding failed | Service not created | Create service first |
| Route conflict | Route already exists | Use unique hostname |
| Build failed | Missing dependencies | Check package.json |
Useful Commands
Cloud Foundry
# View logs
cf logs my-app --recent
# Scale application
cf scale my-app -i 3 -m 512M
# Restart application
cf restart my-app
# View environment
cf env my-app
# Bind service
cf bind-service my-app my-serviceKyma/Kubernetes
# View pods
kubectl get pods -n my-namespace
# View logs
kubectl logs -f deployment/my-app -n my-namespace
# Scale deployment
kubectl scale deployment my-app --replicas=3 -n my-namespace
# Describe pod
kubectl describe pod my-app-xxx -n my-namespaceSource Documentation
- Deploy (ABAP): https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/deploy-d7aec3c.md
- Terraforming Kyma: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/terraforming-kyma-runtimes-57c82ab.md
- MTA Documentation: https://help.sap.com/docs/btp/sap-business-technology-platform/multitarget-applications-in-cloud-foundry-environment
SAP BTP Design Patterns Reference
Overview
Design patterns provide guidance for creating superior user experiences, implementing secure architectures, and building well-modularized applications on SAP BTP.
User Experience Design
Core Principle
Superior UX drives business value through:
- Improved productivity
- Better data quality
- Higher user adoption
Common Challenges
| Challenge | Impact |
|---|---|
| Information discovery | Users can't find data |
| Data fragmentation | Multiple systems to check |
| Excessive navigation | Wasted time |
| Poor error handling | User frustration |
Design Thinking
Approach: Understand user needs through observation and feedback
Process: 1. Empathize - Understand users 2. Define - Clarify problems 3. Ideate - Generate solutions 4. Prototype - Build quickly 5. Test - Validate with users
Motto: "Fail fast, fail early"
Development Use Case Patterns
Process Automation
Type: Low-code/no-code
Tool: SAP Build Process Automation
Best For: Business experts creating workflows
Web and Mobile Applications
Tool: SAP Build Apps, MDK
Best For: Cross-platform consumer applications
Full-Stack Development
Types:
- Single-tenant applications
- Multitenant SaaS applications
- Tenant-specific extensions
Reference Apps:
- Poetry Slam Manager (SaaS)
- Catering Management (Extension)
- Incident Management (Full-stack)
Technology Design
Modularization Benefits
| Benefit | Description |
|---|---|
| Maintainability | Easier to understand and modify |
| Testability | Independent unit testing |
| Scalability | Scale individual components |
| Reduced coupling | Changes don't cascade |
| Faster innovation | Independent development |
Domain-Driven Design (DDD)
When to Use: Applications with 30+ use cases, complex domains
Recommended Approach (SAP BTP/CAP): 1. SAP One Domain Model: Leverage SAP's standardized business data model for consistency across SAP solutions 2. CAP Domain Modeling: Use CDS for human-readable, business-aligned domain models 3. Community Practices: Apply EventStorming, bounded-context discovery for complex scenarios
Complexity Scoring Heuristic:
Note: This scoring is a pragmatic heuristic to help decide when deeper DDD practices (EventStorming, bounded-context discovery) may provide value. Always validate triggers against domain expert input, non-functional requirements (performance, scalability), and team constraints before applying.
| Criterion | Points | Consideration |
|---|---|---|
| 30+ use cases | 2 | Scale indicator |
| Anticipated growth | 1 | Future complexity |
| Significant future changes | 2 | Maintainability needs |
| Novel domain | 2 | Unknown complexity |
Score 7+ points: Consider deeper DDD practices
DDD Process (8 steps from ddd-crew): 1. Align business goals 2. Discover domain 3. Decompose domain 4. Connect bounded contexts 5. Strategize models 6. Define domain events 7. Design bounded contexts 8. Evolve architecture
Resources:
- SAP One Domain Model: https://api.sap.com/sap-one-domain-model
- CAP Domain Modeling: https://cap.cloud.sap/docs/guides/domain-modeling
- DDD Starter Modeling: https://github.com/ddd-crew/ddd-starter-modelling-process
CAP Design Principles
Domain-Driven Development
- Collaborate with domain experts
- Use CDS for human-readable models
- Focus on business concepts
Out-of-the-Box Best Practices
CAP provides automatic:
- OData service generation
- CRUD operations
- Authorization checks
- Audit logging
Platform Agnostic Design
CAP abstracts:
- Deployment targets (CF, Kyma)
- Authentication methods
- Protocols (REST, OData, GraphQL)
- Database technologies
- Messaging systems
ABAP Design Principles
Model-Driven Architecture
Benefits:
- Common architecture reduces boilerplate
- Patterns transfer across implementations
- Built-in mock frameworks
- Consistent code quality
Use Case Patterns
Customer Applications:
- Decoupled lifecycles
- Independent workload management
- Hub scenarios
Partner Solutions:
- Multitenant SaaS
- Add-on products
Other:
- Mobile applications
- Business automation
- Code quality analysis
Security Design
Five Guidelines
| Guideline | Focus |
|---|---|
| Secure User Interfaces | SAP Fiori authentication, validation |
| Access Control Models | RBAC/ABAC with OAuth/OpenID Connect |
| API Security | OAuth 2.0, TLS encryption |
| Secure Extensibility | Isolate and validate custom logic |
| Domain Model Validation | Review CDS models for data protection |
Secure SDLC
Explore Phase:
- Implement OWASP standards
- Train development teams
- Conduct risk assessments
- Plan compliance requirements
Discover Phase:
- Map data flows
- Establish secure architecture
- Validate third-party services
- Incorporate security in prototypes
Design Phase:
- Apply least privilege
- Implement defense in depth
- Validate inputs at boundaries
Microservices Patterns
When to Use
Benefits:
- Independent scaling
- Technology flexibility
- Team autonomy
Considerations:
- Increased complexity
- Network latency
- Distributed transactions
CAP Approach
Start monolithic, extract services when:
- Different scaling needs
- Different team ownership
- Independent deployment required
Communication Patterns
| Pattern | Use Case |
|---|---|
| Synchronous (REST/OData) | Real-time queries |
| Asynchronous (Events) | Decoupled processes |
| Event Sourcing | Audit requirements |
Database Design
CAP with CDS
// Domain model
entity Orders {
key ID : UUID;
customer : Association to Customers;
items : Composition of many OrderItems on items.order = $self;
status : Status;
}
entity OrderItems {
key ID : UUID;
order : Association to Orders;
product : Association to Products;
quantity : Integer;
}ABAP with CDS
define root view entity ZI_Order
as select from zorder
composition [0..*] of ZI_OrderItem as _Items
{
key order_uuid as OrderUUID,
customer_id as CustomerID,
_Items
}API Design
API-First Approach
1. Design API before implementation 2. Use OpenAPI/OData specifications 3. Follow SAP API Style Guide 4. Publish to API Business Hub
Versioning Strategy
/api/v1/orders # Version 1
/api/v2/orders # Version 2 (breaking changes)Testing Patterns
Test Pyramid
/\
/ \ E2E Tests (few)
/----\
/ \ Integration Tests (some)
/--------\
/ \ Unit Tests (many)
/------------\CAP Testing
const cds = require('@sap/cds');
describe('OrderService', () => {
let srv;
beforeAll(async () => {
srv = await cds.connect.to('OrderService');
});
it('creates order', async () => {
const order = await srv.create('Orders', {
customerID: '123'
});
expect(order.ID).toBeDefined();
});
});ABAP Testing
CLASS ltcl_order DEFINITION FOR TESTING.
METHODS test_create_order FOR TESTING.
ENDCLASS.
CLASS ltcl_order IMPLEMENTATION.
METHOD test_create_order.
" Test implementation
cl_abap_unit_assert=>assert_not_initial( lv_order_id ).
ENDMETHOD.
ENDCLASS.Source Documentation
- Design (CAP): https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/design-6bb7339.md
- Design (ABAP): https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/design-314ae3e.md
- Technology Design: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/technology-design-a5b8129.md
- UX Design: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/user-experience-design-323bd93.md
SAP Solution Extensions Reference
Overview
SAP BTP enables organizations to extend existing SAP solutions without disrupting core performance and business processes. Extensions can add new functionality while maintaining upgrade compatibility.
Extension Types
In-App Extensions
Definition: Extend backend and UI directly within the SAP solution
Supported Products:
- SAP SuccessFactors
- SAP S/4HANA Cloud
- SAP Cloud for Customer
Capabilities:
- Custom fields
- Custom logic (BAdIs)
- UI adaptations
- Custom reports
Side-by-Side Extensions
Definition: Additional functionality deployed on SAP BTP, integrated with SAP solutions
Advantages:
| Area | Benefit |
|---|---|
| Business | Independent feature development |
| Technology | Modern cloud-native architecture |
| Operations | Separate lifecycle management |
Planning Recommendations
1. Start simple - Begin with straightforward implementations 2. Maintain focused digital core - Keep core system clean 3. Choose simplest approach - Don't over-engineer 4. Verify API/event availability - Ensure integration points exist
Supported SAP Solutions
Solutions with Automated Configuration
| Solution | Extension Service |
|---|---|
| SAP S/4HANA Cloud | SAP S/4HANA Cloud Extensibility |
| SAP SuccessFactors | SAP SuccessFactors Extensibility |
| SAP Cloud for Customer | Standard extensibility service |
| SAP Commerce Cloud | Commerce Cloud extensibility |
| SAP Field Service Management | FSM extensibility |
Extension Use Cases
UI Enhancement
Scenario: Build new SAP Fiori interfaces integrated with SAP solutions
Implementation:
// CAP service consuming S/4HANA API
const cds = require('@sap/cds');
module.exports = (srv) => {
srv.on('READ', 'BusinessPartners', async (req) => {
const s4 = await cds.connect.to('API_BUSINESS_PARTNER');
return s4.run(req.query);
});
};Functionality Expansion
Scenario: Connect multiple SAP solutions
Example: Link SAP SuccessFactors employee data with SAP S/4HANA
Advanced Capabilities
Scenarios:
- Add analytics dashboards
- Implement machine learning
- Enable IoT integration
Data Consolidation
Scenario: Centralize insights across systems
Tools:
- SAP Datasphere
- SAP Analytics Cloud
- Custom CAP aggregators
SaaS Ecosystems
Scenario: Create multi-tenant extension applications for distribution
Considerations:
- Subscription management
- Tenant isolation
- Key user extensibility
Implementation Patterns
Remote Service Integration (CAP)
Step 1: Import Service Definition
# Download API specification
cds import API_BUSINESS_PARTNER.edmxStep 2: Configure Connection
// package.json
{
"cds": {
"requires": {
"API_BUSINESS_PARTNER": {
"kind": "odata-v2",
"model": "srv/external/API_BUSINESS_PARTNER",
"credentials": {
"destination": "S4HANA"
}
}
}
}
}Step 3: Implement Service
// srv/extension-service.js
const cds = require('@sap/cds');
module.exports = cds.service.impl(async function() {
const s4 = await cds.connect.to('API_BUSINESS_PARTNER');
this.on('READ', 'BusinessPartners', async (req) => {
return s4.run(req.query);
});
this.on('CREATE', 'LocalEntities', async (req) => {
// Local business logic
const data = req.data;
// Enrich with S/4HANA data
const bp = await s4.read('A_BusinessPartner').where({ BusinessPartner: data.partnerId });
data.partnerName = bp[0]?.BusinessPartnerFullName;
return data;
});
});Event-Based Integration
Event Subscription
// srv/extension-service.cds
using { sap.s4.beh } from 'srv/external/OP_API_BUSINESS_PARTNER_SRV';
service ExtensionService {
// React to S/4HANA events
event BusinessPartnerChanged : {
BusinessPartner : String;
}
}Event Handler
// srv/extension-service.js
module.exports = (srv) => {
srv.on('BusinessPartnerChanged', async (msg) => {
const { BusinessPartner } = msg.data;
console.log(`Business Partner ${BusinessPartner} changed`);
// Trigger local business logic
});
};Eventing via SAP Event Mesh
# mta.yaml
resources:
- name: my-event-mesh
type: org.cloudfoundry.managed-service
parameters:
service: enterprise-messaging
service-plan: default
config:
emname: my-namespaceABAP Extensions (On-Stack)
Developer Extensibility
Available In: SAP S/4HANA Cloud, Private Edition
Capabilities:
- Custom CDS views
- Custom RAP business objects
- Released API consumption
Key User Extensibility
Available In: Multitenant SaaS applications
Capabilities:
- UI adaptations
- Custom fields
- Business Add-Ins (BAdIs)
- Business configuration
Best Practices
Architecture
| Principle | Description |
|---|---|
| Loose coupling | Use APIs/events, not direct DB access |
| Idempotent operations | Handle duplicate events gracefully |
| Error handling | Implement retry logic, circuit breakers |
| Security | Follow least privilege principle |
Development
1. Use mock servers for development without production access 2. Test with real data before production deployment 3. Monitor integration health with SAP Cloud ALM 4. Document APIs for maintainability
Operations
1. Separate lifecycles - Deploy extensions independently 2. Version APIs - Maintain compatibility during upgrades 3. Monitor performance - Track integration latency 4. Plan for upgrades - Test against SAP update schedules
Resources
| Resource | URL |
|---|---|
| SAP Extensibility Explorer | https://experience.sap.com/extensibility-explorer/ |
| Discovery Center Missions | https://discovery-center.cloud.sap/ |
| CAP External Services | https://cap.cloud.sap/docs/guides/using-services |
Related Skill Guides
| Topic | Reference |
|---|---|
| Design Patterns | references/design-patterns.md - DDD, modularization |
| Security | references/security.md - Authentication, authorization |
| Operations | references/operations.md - Scaling, monitoring |
| Connectivity | references/connectivity.md - Remote services, destinations |
Source Documentation
SAP HANA Cloud Reference
Overview
SAP HANA Cloud is a cloud-native Database-as-a-Service forming the database management foundation of SAP BTP. It eliminates hardware management overhead and supports multiple data models.
Supported Data Models
| Model | Use Case |
|---|---|
| Relational | Traditional OLTP/OLAP |
| Document | JSON storage |
| Geospatial | Location data |
| Vector | AI/ML applications |
Cost Optimization Features
Native Storage Extension (NSE)
Purpose: Store infrequently accessed data on disk instead of in-memory
Benefits:
- Reduced memory requirements
- Lower costs for cold data
- Automatic data tiering
NSE Advisor: Provides data-driven suggestions for storage optimization
Elastic Compute Nodes (ECN)
Purpose: On-demand computational scaling during peak workloads
Features:
- Scheduled activation/deactivation
- Automatic scaling based on metrics
- ECN Advisors for usage pattern analysis
Table Partitioning
Purpose: Divide large tables for better query performance
Benefits:
- Parallel query processing
- Partition pruning
- Works on multi-host and single-host configurations
Native Multi-Tenancy
Capability: Up to 1,000 isolated database tenants per instance
Use Case: SaaS applications with tenant data isolation
Free Tier
Allocation: 16GB memory at no cost via BTP
Benefits:
- Development without trial limitations
- Upgrade path to paid plans
- Full feature access
CAP Integration
CDS-Based Modeling
// db/schema.cds
namespace my.bookshop;
entity Books {
key ID : UUID;
title : String(111);
stock : Integer;
price : Decimal(10, 2);
}Automatic Artifact Generation
CAP uses CDS to:
- Define domain models
- Generate database artifacts automatically
- Support local, hybrid, and cloud deployments
Adding HANA Support
# Add HANA to CAP project
cds add hana
# Build for HANA
cds build --production
# Deploy database
cds deploy --to hanaService Configuration
// package.json
{
"cds": {
"requires": {
"db": {
"[production]": {
"kind": "hana"
},
"[development]": {
"kind": "sqlite"
}
}
}
}
}HDI Container Configuration
# mta.yaml
resources:
- name: my-hana
type: com.sap.xs.hdi-container
parameters:
service: hana
service-plan: hdi-shared
config:
schema: MY_SCHEMAABAP Environment Integration
Automatic Integration
The SAP BTP ABAP environment automatically includes:
- Dedicated HANA Cloud instance
- ABAP-managed database access
- Native SQL support via ABAP SQL
Features
| Feature | Description |
|---|---|
| Native Storage Extensions | Extended disk storage |
| Database Indexes | Custom index creation |
| Partitioning | Table partitioning support |
| ABAP SQL Service | External access to data |
CDS Views in ABAP
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Sales Order'
define view entity ZI_SalesOrder
as select from zsales_order
{
key order_uuid as OrderUUID,
order_id as OrderID,
customer_id as CustomerID,
@Semantics.amount.currencyCode: 'CurrencyCode'
total_amount as TotalAmount,
currency_code as CurrencyCode
}Database Development
Native SQL in CAP (Node.js)
const cds = require('@sap/cds');
module.exports = (srv) => {
srv.on('customQuery', async (req) => {
const db = await cds.connect.to('db');
const result = await db.run(`
SELECT * FROM my_bookshop_Books
WHERE stock > 0
ORDER BY title
`);
return result;
});
};Stored Procedures
-- db/src/procedures/calculateTotal.hdbprocedure
PROCEDURE "calculateTotal" (
IN iv_order_id NVARCHAR(36),
OUT ov_total DECIMAL(15,2)
)
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
READS SQL DATA
AS
BEGIN
SELECT SUM(quantity * price) INTO ov_total
FROM "my_bookshop_OrderItems"
WHERE order_id = :iv_order_id;
END;Calculation Views
<!-- db/src/views/SalesAnalytics.hdbcalculationview -->
<Calculation:scenario xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:Calculation="http://www.sap.com/ndb/BiModelCalculation.ecore"
id="SalesAnalytics"
applyPrivilegeType="NONE">
<!-- View definition -->
</Calculation:scenario>Performance Optimization
Best Practices
| Practice | Description |
|---|---|
| Use NSE for cold data | Move infrequently accessed data to disk |
| Partition large tables | Improve query performance |
| Create appropriate indexes | Speed up common queries |
| Use calculation views | Optimize analytical queries |
| Leverage in-memory | Keep hot data in memory |
Monitoring
Tools:
- SAP HANA Cockpit
- Technical Monitoring Cockpit (ABAP)
- SAP Cloud ALM
Key Metrics:
- Memory utilization
- CPU usage
- Query performance
- Connection pool status
Backup and Recovery
Automatic Backups
- Continuous backup
- Point-in-time recovery
- Cross-region backup options
Recovery Options
- Self-service restore via HANA Cockpit
- SAP support for disaster recovery
Security
Data Encryption
- Encryption at rest
- Encryption in transit (TLS)
- Column-level encryption options
Access Control
- Database users and roles
- Row-level security via CDS
- Integration with XSUAA
Source Documentation
- Data Persistence: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/data-persistence-using-usap-hana-cloud-f19c8e9.md
- SAP HANA Cloud: https://help.sap.com/docs/hana-cloud
- CAP HANA Guide: https://cap.cloud.sap/docs/guides/databases-hana
Multitarget Applications (MTA) Reference
Overview
Multitarget Applications enable packaging multiple interconnected cloud components into a single deployable bundle, addressing the complexity of modern cloud applications.
Key Characteristics
- Single archive with all modules and dependencies
- Deployable across multiple SAP BTP subaccounts
- Automated deployment in proper dependency order
- Integrated deployment descriptor (mta.yaml)
When to Use MTAs
| Scenario | Recommendation |
|---|---|
| Business app with multiple components | Use MTA |
| Dependencies on external resources (DB, messaging) | Use MTA |
| Need standardized configuration | Use MTA |
| Simple single-module app | Consider cf push |
Creation Options
| Tool | Description |
|---|---|
| SAP Business Application Studio | Native MTA support |
| SAP Web IDE Full-Stack | Automatic descriptor maintenance |
| mbt (Command Line) | Java-based builder |
| CI/CD Pipelines | Automated archive generation |
MTA Structure
my-app/
├── mta.yaml # Deployment descriptor
├── package.json # Node.js dependencies
├── xs-security.json # Security configuration
├── app/ # UI module
│ ├── webapp/
│ └── package.json
├── srv/ # Service module
│ ├── src/
│ └── package.json
└── db/ # Database module
├── src/
└── package.jsonmta.yaml Anatomy
Schema and Identification
_schema-version: "3.1"
ID: my-cap-app
version: 1.0.0
description: My CAP ApplicationParameters
parameters:
enable-parallel-deployments: true
deploy_mode: html5-repoModules
modules:
- name: my-srv
type: nodejs
path: gen/srv
parameters:
buildpack: nodejs_buildpack
memory: 256M
disk-quota: 512M
build-parameters:
builder: npm
requires:
- name: my-hana
- name: my-xsuaa
provides:
- name: srv-api
properties:
srv-url: ${default-url}Resources
resources:
- name: my-hana
type: com.sap.xs.hdi-container
parameters:
service: hana
service-plan: hdi-shared
- name: my-xsuaa
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.jsonModule Types
| Type | Description |
|---|---|
| nodejs | Node.js application |
| java | Java application |
| hdb | HANA database content |
| html5 | Static HTML5 content |
| approuter.nodejs | Application Router |
| com.sap.application.content | Generic content |
Resource Types
| Type | Description |
|---|---|
| com.sap.xs.hdi-container | HDI container |
| org.cloudfoundry.managed-service | Managed service instance |
| org.cloudfoundry.existing-service | Existing service reference |
| org.cloudfoundry.user-provided-service | User-provided service |
Complete Example
_schema-version: "3.1"
ID: incident-management
version: 1.0.0
parameters:
enable-parallel-deployments: true
build-parameters:
before-all:
- builder: custom
commands:
- npm ci
- npx cds build --production
modules:
# Service module
- name: incident-srv
type: nodejs
path: gen/srv
parameters:
buildpack: nodejs_buildpack
memory: 256M
requires:
- name: incident-db
- name: incident-auth
- name: incident-destination
provides:
- name: srv-api
properties:
srv-url: ${default-url}
# Database deployer
- name: incident-db-deployer
type: hdb
path: gen/db
parameters:
buildpack: nodejs_buildpack
requires:
- name: incident-db
# UI Application
- name: incident-app
type: approuter.nodejs
path: app/
parameters:
memory: 256M
requires:
- name: srv-api
group: destinations
properties:
name: srv-api
url: ~{srv-url}
forwardAuthToken: true
- name: incident-auth
- name: incident-html5-repo-runtime
# UI content deployer
- name: incident-ui-deployer
type: com.sap.application.content
path: .
requires:
- name: incident-html5-repo-host
parameters:
content-target: true
build-parameters:
build-result: resources
requires:
- artifacts:
- nsincidents.zip
name: nsincidents
target-path: resources/
- name: nsincidents
type: html5
path: app/incidents
build-parameters:
build-result: dist
builder: custom
commands:
- npm ci
- npm run build:cf
resources:
- name: incident-db
type: com.sap.xs.hdi-container
parameters:
service: hana
service-plan: hdi-shared
- name: incident-auth
type: org.cloudfoundry.managed-service
parameters:
service: xsuaa
service-plan: application
path: ./xs-security.json
config:
xsappname: incident-${org}-${space}
tenant-mode: dedicated
- name: incident-destination
type: org.cloudfoundry.managed-service
parameters:
service: destination
service-plan: lite
- name: incident-html5-repo-runtime
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-plan: app-runtime
- name: incident-html5-repo-host
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-plan: app-hostBuild Commands
# Install MTA Build Tool
npm install -g mbt
# Build MTA archive
mbt build
# Build with specific platform
mbt build -p cf
# Build to specific directory
mbt build -t ./distDeploy Commands
# Install MTA plugin
cf install-plugin multiapps
# Deploy
cf deploy mta_archives/my-app_1.0.0.mtar
# Deploy with options
cf deploy my-app.mtar --version-rule ALL
# Blue-green deployment
cf bg-deploy my-app.mtar
# List deployed MTAs
cf mtas
# Undeploy
cf undeploy my-app --delete-servicesCommon Issues
| Issue | Cause | Solution |
|---|---|---|
| Service binding fails | Service not ready | Add dependency order |
| Memory exceeded | Insufficient allocation | Increase in mta.yaml |
| Build fails | Missing dependencies | Run npm ci first |
| Deploy timeout | Large application | Increase timeout |
Best Practices
1. Use build-parameters for complex builds 2. Enable parallel deployments for faster deploys 3. Externalize configuration via variables 4. Version your MTAs semantically 5. Test locally before deploying
Source Documentation
SAP BTP Observability Reference
Overview
SAP BTP observability operates through two interconnected layers:
- Central Layer: SAP Cloud ALM - unified strategic view
- Local Layer: SAP Cloud Logging - granular technical insights
Both layers integrate through APIs and context-sensitive navigation using telemetry data (logs, metrics, traces).
OpenTelemetry Strategy
SAP has standardized on OpenTelemetry as the industry standard for cloud-native observability.
Key Principles:
- Standardized instrumentation across SAP and customer applications
- Open APIs for non-SAP data source integration
- Seamless data flow through managed collectors
SAP Cloud ALM
Included with: Enterprise Support subscriptions
Provisioning: Via SAP for Me
Capabilities
| Feature | Description |
|---|---|
| Real User Monitoring | Actual user experience tracking |
| Health Monitoring | System and application health |
| Integration Monitoring | Cross-system integration status |
| Exception Monitoring | Error tracking and analysis |
| Job Monitoring | Background job status |
| Automation Monitoring | Automated process tracking |
| Synthetic User Monitoring | Selenium-based availability tests |
| Business Service Management | End-to-end service health |
| Intelligent Event Processing | Automated event correlation |
Supported Platforms
SaaS Applications:
- SAP S/4HANA Cloud
- SAP HANA Cloud
- SAP Analytics Cloud
PaaS Runtimes:
- Cloud Foundry
- Kyma
Integration
# CAP configuration for Cloud ALM
cds:
requires:
cloud-alm:
kind: sap-cloud-alm
credentials:
destination: cloud-alm-apiSAP Cloud Logging
Based on: OpenSearch
Deployment: Instance-based service
Capabilities
| Feature | Description |
|---|---|
| Log Analytics | Full-text search, structured queries |
| Distributed Tracing | Cross-microservice request tracking |
| Technology Monitoring | Runtime metrics (Java/Node.js) |
| Custom Telemetry | Application-specific metrics |
| Alerting | Threshold-based notifications |
| Dashboards | Custom visualizations |
Service Binding
# mta.yaml
resources:
- name: my-cloud-logging
type: org.cloudfoundry.managed-service
parameters:
service: cloud-logging
service-plan: standard
modules:
- name: my-srv
requires:
- name: my-cloud-loggingCAP Integration
// Automatic logging with CAP
const cds = require('@sap/cds');
const LOG = cds.log('my-service');
module.exports = (srv) => {
srv.on('READ', 'Books', (req) => {
LOG.info('Reading books', { user: req.user.id });
// Business logic
});
};Custom Metrics
Note: This snippet assumes a MeterProvider is already configured by the platform (e.g., SAP Cloud Logging SDK) or application bootstrap. When using SAP BTP services, the telemetry infrastructure typically provides this setup automatically.
const { metrics } = require('@opentelemetry/api');
// Assumes MeterProvider is registered by SAP Cloud Logging or platform setup
const meter = metrics.getMeter('my-app');
const orderCounter = meter.createCounter('orders_created', {
description: 'Number of orders created'
});
// Increment counter
orderCounter.add(1, { customer_type: 'enterprise' });Custom Traces
const { trace } = require('@opentelemetry/api');
const tracer = trace.getTracer('my-app');
async function processOrder(orderId) {
const span = tracer.startSpan('process-order');
span.setAttribute('order.id', orderId);
try {
// Processing logic
span.setStatus({ code: SpanStatusCode.OK });
} catch (error) {
span.setStatus({ code: SpanStatusCode.ERROR, message: error.message });
throw error;
} finally {
span.end();
}
}SAP Alert Notification
Purpose: Route critical events to notification channels
Channels:
- SMS
- Slack
- Microsoft Teams
- ServiceNow
- Custom webhooks
Configuration
{
"conditions": [
{
"name": "critical-errors",
"propertyKey": "severity",
"predicate": "EQUALS",
"propertyValue": "CRITICAL"
}
],
"actions": [
{
"name": "notify-team",
"type": "SLACK",
"properties": {
"webhookUrl": "https://hooks.slack.com/..."
}
}
]
}ABAP Technical Monitoring Cockpit
Purpose: On-stack analysis and optimization
Features:
- System workload monitoring
- Resource consumption tracking
- Request statistics
- Outbound communication analysis
- SQL statement analysis
- Work process monitoring
Key Metrics
| Metric | Description |
|---|---|
| Dialog Response Time | Average transaction response |
| CPU Utilization | Application server CPU usage |
| Memory Consumption | Heap and stack usage |
| Database Time | SQL execution duration |
| Work Process Usage | Active vs. total processes |
Implementation by Runtime
Cloud Foundry
# manifest.yml
applications:
- name: my-app
env:
SAP_CLOUD_LOGGING_ENABLED: true
OTEL_EXPORTER_OTLP_ENDPOINT: "..."Kyma
apiVersion: telemetry.kyma-project.io/v1alpha1
kind: LogPipeline
metadata:
name: my-logs
spec:
input:
application:
namespaces:
include: [my-namespace]
output:
http:
host: cloud-logging-endpointABAP Environment
Automatic integration with:
- Technical Monitoring Cockpit
- SAP Cloud ALM
- Security Audit Log
- Application Logging
Best Practices
Logging
1. Use structured logging (JSON format) 2. Include correlation IDs for request tracing 3. Log at appropriate levels (DEBUG, INFO, WARN, ERROR) 4. Avoid logging sensitive data
Metrics
1. Define SLIs (Service Level Indicators) 2. Set up SLOs (Service Level Objectives) 3. Create dashboards for key metrics 4. Configure alerts for threshold breaches
Tracing
1. Propagate trace context across services 2. Add meaningful span attributes 3. Use semantic conventions 4. Sample appropriately in production
Learning Resources
| Resource | Description |
|---|---|
| Mission 4432/4718 | Implement Observability in CAP Application |
| Learning Journey | Cloud Foundry Observability |
| Expert Portal | SAP Cloud ALM Configuration |
Source Documentation
- Observability: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/establish-end-to-end-observability-34065a4.md
- Observability Mission: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/mission-implement-observability-in-a-full-stack-cap-application-c5636db.md
- SAP Cloud ALM: https://help.sap.com/docs/cloud-alm
- SAP Cloud Logging: https://help.sap.com/docs/cloud-logging
SAP BTP Operations Reference
Overview
Effective administration and operations ensure stable, efficient, and cost-optimized application performance in the cloud.
Administrator Responsibilities
User and Access Management
Tasks:
- Identity management
- Organizational structure setup
- Quota allocation
- Role assignments
Tools:
- SAP BTP Cockpit
- Identity Authentication Service
- Role Collections
Performance Monitoring
Key Metrics:
- System runtime
- SQL query execution
- Background job status
- Response times
- Error patterns
Resource Management
Activities:
- Monitor consumption patterns
- Adjust sizing configurations
- Leverage hibernation features
- Cost optimization
Lifecycle Oversight
Scope:
- Custom application management
- Transport processes
- Add-on deployments
- Multi-tenant administration
Integration Assurance
Focus:
- Data synchronization between cloud and on-premises
- API health monitoring
- Event processing status
Supporting Tools
| Tool | Purpose | Environment |
|---|---|---|
| SAP Fiori Launchpad | UI access, administration | All |
| SAP BTP Cockpit | Platform administration | All |
| Landscape Portal | Partner/SaaS management | ABAP |
| Technical Monitoring Cockpit | On-stack analysis | ABAP |
| SAP Cloud ALM | Central monitoring | All |
| ABAP Test Cockpit | Code quality | ABAP |
Run and Scale Operations
Core Principles
1. Continuous user feedback - Optimize based on real usage 2. Proactive monitoring - Use SAP BTP observability tools 3. Security integration - Protect against emerging threats 4. Compliance maintenance - Regular security audits
Scaling Strategies
Cloud Foundry
Horizontal Scaling:
# Scale instances
cf scale my-app -i 5
# Scale memory
cf scale my-app -m 1GAuto-scaling:
- Configure in BTP Cockpit
- Based on CPU/memory thresholds
- Schedule-based scaling
Availability Zones:
- Automatic distribution across AZs
- Handle ~1/3 capacity loss during AZ failure
Kyma
Horizontal Pod Autoscaler:
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: my-app-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: my-app
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80ABAP Environment
Elastic Scaling:
- Manual ACU/HCU adjustment via BTP Cockpit
- Automatic scaling between 1 ACU and configured maximum
- 0.5 ACU increments
Decision Metrics:
- CPU usage
- Memory consumption
- Active work process counts
Cost Optimization
System Hibernation (ABAP)
Benefits:
- Reduces costs to <5% of operational expenses
- Preserves HANA Cloud instance
- Automatic restart during maintenance
Management:
- Via Landscape Portal
- Scheduled activation/deactivation
- Trial accounts auto-hibernate nightly
Resource Right-Sizing
| Environment | Recommendation |
|---|---|
| Development | Minimal resources, hibernation |
| Test | Moderate resources, scheduled scaling |
| Production | Right-sized, auto-scaling enabled |
Maintenance and Upgrades
ABAP Environment Updates
Downtime-Optimized Process:
| Phase | Status | Duration |
|---|---|---|
| Preparation | System available | Variable |
| Takeover | Downtime | 10-40 minutes |
| Postprocessing | System available | Background |
Pre-Upgrade Option
Purpose: Test custom applications before standard upgrades
Guidelines:
- Non-development systems only
- Available 4 weeks before release
- Report issues via SAP support
- Validates existing applications (not early feature access)
Security Patching
Best Practices: 1. Regularly apply security patches 2. Monitor dependency vulnerabilities 3. Test patches in non-production first 4. Maintain patch schedule
Secure Operations
Continuous Threat Monitoring
Tools:
- SAP Cloud ALM
- SAP Cloud Logging
- Alert Notification Service
Actions:
- Real-time anomaly detection
- Automated alerting
- Incident response procedures
Secure Auto-Scaling
CAP Multitenancy:
- Built-in tenant isolation
- Resource management per tenant
- Secure scaling for SaaS
Security Audits
Schedule: Periodic (quarterly recommended)
Scope:
- Configuration review
- Compliance verification
- Vulnerability assessment
Data Protection
Requirements:
- Privacy law compliance (GDPR, HIPAA)
- Secure data handling
- User consent management
Transport Management
gCTS (ABAP)
Flow:
Development → Test → Production
↓ ↓ ↓
Release Import ImportTools: Manage Software Components app
SAP Cloud Transport Management (CAP)
Configuration:
transport:
landscape:
- name: DEV
- name: QA
requires: DEV
- name: PROD
requires: QAMonitoring Best Practices
Dashboards
Key Panels:
- Application health
- Response times
- Error rates
- Resource utilization
- Integration status
Alerts
Configuration:
| Metric | Threshold | Action |
|---|---|---|
| Error rate | > 1% | Page on-call |
| Response time | > 2s | Warning email |
| Memory | > 80% | Auto-scale or alert |
| CPU | > 70% | Auto-scale or alert |
Log Management
Retention:
- Development: 7 days
- Test: 14 days
- Production: 30+ days
Analysis:
- Full-text search
- Structured queries
- Correlation with traces
Troubleshooting
Common Issues
| Issue | Diagnosis | Resolution |
|---|---|---|
| High latency | Check traces | Optimize queries, scale |
| Memory pressure | Check heap usage | Increase memory, optimize code |
| Connection errors | Check destinations | Verify credentials, network |
| Failed jobs | Check job logs | Fix data issues, retry |
Useful Commands
Cloud Foundry:
# Recent logs
cf logs my-app --recent
# Application info
cf app my-app
# Environment variables
cf env my-app
# Events
cf events my-appKyma:
# Pod logs
kubectl logs -f deployment/my-app
# Describe pod
kubectl describe pod my-app-xxx
# Resource usage
kubectl top podsSource Documentation
- Administrate and Operate: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/administrate-and-operate-f8fe432.md
- Run and Scale: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/run-and-scale-fcb51b5.md
- Maintain and Upgrade: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/maintain-and-upgrade-d24bc66.md
SAP BTP Partner Development Reference
Overview
SAP BTP provides deployment options for partners (ISVs) to build and deliver ABAP and CAP-based applications as products or SaaS offerings.
Deployment Models
Multitenant SaaS
Definition: Cloud service operated in partner's global account
Characteristics:
- Partner owns infrastructure
- Customers subscribe to service
- Partner manages operations, monitoring
- Customers get key-user extensibility
Advantages:
- Single codebase for all customers
- Centralized operations
- Easy updates (deploy once)
- Lower per-customer costs at scale
Add-on Product
Definition: Product installed in customer's ABAP environment
Characteristics:
- Customer owns infrastructure
- Customer manages lifecycle
- Customer has full data control
- Developer extensibility available
Requirements:
- SAP PartnerEdge Build contract
- Distribution via SAP Store
- Registered ABAP namespace
ABAP Partner Development
Landscape Portal
Purpose: Central management for partner solutions
Capabilities:
| Feature | Description |
|---|---|
| System Management | Create, configure ABAP systems |
| Tenant Management | SaaS tenant operations |
| Product Lifecycle | Build, register, publish products |
| Deployment Pipelines | CI/CD for ABAP |
| Monitoring | System and application health |
Software Components
Requirement: At least one software component per solution
Rules:
- Registered ABAP namespace mandatory
- Y/Z objects only within single global account
- Multiple global accounts require add-on products
Transport Mechanisms
| Tool | Use Case |
|---|---|
| gCTS | BTP system-to-system transports (recommended) |
| abapGit | On-premise migration, backup, cross-account |
| Landscape Portal Products | Multi-account delivery |
Namespace Requirements
Mandatory: All objects in a Product require registered namespace
Process: 1. Request namespace from SAP 2. Register in development system 3. Use namespace prefix for all objects
CAP Partner Development
Poetry Slam Manager
Type: Reference application for multitenant CAP SaaS
GitHub: https://github.com/SAP-samples/partner-reference-application/
Demonstrates:
- Full-stack cloud applications using SAP Cloud Application Programming Model (CAP)
- Multitenant architecture aligned with SAP BTP Developer's Guide
- ERP-agnostic design (compatible with S/4HANA Cloud, Business One, Business ByDesign)
- Subscription lifecycle management
- Cost optimization patterns
Tutorial Structure: 1. Core application development (business models, logic) 2. Enhancement to multitenant (multi-customer) solutions 3. ERP backend integration 4. Feature expansion 5. Application extension
Bill of Materials: Complete service list at https://github.com/SAP-samples/partner-reference-application/blob/main/Tutorials/01-BillOfMaterials.md
Partner Reference Application Extension
Type: Customer-specific extension example
GitHub: https://github.com/SAP-samples/partner-reference-application-extension
Demonstrates:
- Enhanced catering management capabilities
- Seamless base application integration
- Granular tenant-specific configurations
- Consistent UX across extended and core features
- Secure multitenant architecture with data isolation
ABAP Sample Application
Music Festival Manager
Type: Reference application for multitenant ABAP SaaS
GitHub: https://github.com/SAP-samples/abap-platform-partner-reference-application
Demonstrates:
- Full-stack ABAP Cloud development using RAP
- Scalable, multitenant architecture
- SAP BTP Developer's Guide best practices
- ERP-agnostic design (side-by-side extensions)
- Compatibility with any SAP solution including S/4HANA Cloud ERP
Tutorial Structure: 1. Core Application Development: Business models, logic, UI, authentication, role-based authorization 2. Deployment & Provisioning: Building and deploying to consumers 3. SAP S/4HANA Cloud Integration: Connecting with enterprise systems 4. Feature Enhancement: Expanding application capabilities
Key Features:
- Uses ABAP RESTful Application Programming Model (RAP)
- Leverages SAP BTP services for enterprise-class standards
- Enables focus on business logic and domain functionality
Cost Estimation
Total Cost of Ownership Calculator
Location: SAP Partner Portal
Inputs:
- Expected tenant count
- Resource requirements
- Support level
- Region
Outputs:
- Monthly operational costs
- Per-tenant estimates
- Scaling projections
Development Workflow
SaaS Development Flow
1. Setup
├── Create global account
├── Configure Landscape Portal
└── Setup development system
2. Develop
├── Build software components
├── Implement business logic
├── Create Fiori apps
└── Configure multitenancy
3. Test
├── Unit testing (ABAP Unit)
├── Integration testing
├── Tenant isolation testing
└── Performance testing
4. Deploy
├── Build product
├── Register in Landscape Portal
└── Publish to SAP Store (optional)
5. Operate
├── Monitor via SAP Cloud ALM
├── Manage subscriptions
└── Handle support requestsAdd-on Development Flow
1. Develop
├── Create software components
├── Use registered namespace
└── Follow ABAP Cloud guidelines
2. Build
├── Assemble product via Landscape Portal
├── Run quality checks
└── Create release
3. Distribute
├── Register in SAP Store
├── Define pricing
└── Enable discovery
4. Support
├── Customer installation support
├── Update delivery
└── Issue resolutionKey User Extensibility (SaaS)
Available to customers:
- UI adaptations
- Custom fields
- Custom logic (BAdIs)
- Business configuration
Not available:
- Database schema changes
- Core code modifications
- Direct system access
Tenant Management
Subscription Lifecycle
Customer Subscription Request
↓
Tenant Provisioning (automatic)
↓
Tenant Configuration
↓
User Access Setup
↓
Operational Phase
↓
[Optional] Tenant OffboardingIsolation Guarantees
| Aspect | Isolation Level |
|---|---|
| Data | Complete (separate schemas) |
| Configuration | Per-tenant |
| Customizations | Per-tenant |
| Resources | Shared compute, isolated data |
Best Practices
Architecture
1. Design for multitenancy from the start 2. Implement proper tenant isolation 3. Use SAP-recommended patterns 4. Plan for scale (up to 1000 tenants per HANA instance)
Development
1. Follow ABAP Cloud guidelines 2. Use ATC for quality checks 3. Implement comprehensive testing 4. Document APIs and extensions
Operations
1. Monitor with SAP Cloud ALM 2. Automate deployments 3. Plan upgrade windows 4. Establish support processes
Pricing
1. Calculate TCO accurately 2. Consider scaling costs 3. Plan for support overhead 4. Offer flexible pricing tiers
Resources
| Resource | Location |
|---|---|
| Partner Portal | partner.sap.com |
| Discovery Center | discovery-center.cloud.sap |
| PartnerEdge Build | SAP PartnerEdge program |
| Reference Applications | github.com/SAP-samples |
Source Documentation
- ISV ABAP Guide: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/build-and-run-abap-applications-for-partners-who-are-independent-software-vendors-210db8e.md
- ISV SaaS Guide: https://github.com/SAP-docs/btp-developer-guide/blob/main/docs/build-and-run-multitenant-saas-applications-for-partners-who-are-independent-software-ven-9b5e06f.md
SAP BTP What's New Reference
Overview
This document tracks updates to the SAP BTP Developer's Guide organized chronologically.
2025 Updates
November 2025
| Date | Update |
|---|---|
| November 5, 2025 | New tutorials for partners developing ABAP-based applications introduce the Music Festival Manager reference app for scalable multitenant SaaS using RAP |
| November 3, 2025 | End-to-end observability guidance added combining SAP Cloud ALM (central) with SAP Cloud Logging (local) using OpenTelemetry |
October 2025
| Date | Update |
|---|---|
| October 31, 2025 | New SAP HANA Cloud content emphasizing TCO reduction best practices across ABAP, Kyma, and Cloud Foundry |
| October 30, 2025 | ABAP Cloud content enhanced with specific recommendations and hands-on materials |
| October 17, 2025 | New page for UX design and product compliance standards across all BTP environments |
| October 3, 2025 | Partner information expanded with TCO calculations for multitenant SaaS plus additional tutorials |
September 2025
| Date | Update |
|---|---|
| September 25, 2025 | Security information integrated throughout development phases (exploration → production) |
| September 15, 2025 | Guide restructured with new sections on runtime benefits (CF/Kyma with CAP, ABAP Cloud) |
| September 1, 2025 | Major restructuring into four main sections: technology, runtime benefits, CAP, ABAP Cloud |
Earlier 2025
| Date | Update |
|---|---|
| June 2, 2025 | New CI/CD chapter introducing fundamentals and SAP solutions |
| April 25, 2025 | New page for remote system connectivity approaches |
| January 3, 2025 | Partner reference application for multitenant SaaS development |
2024 Notable Additions
- Guide restructured to align with design-led development processes
- New missions for enterprise-grade and multitenant CAP applications
- Observability implementation guidance added
- Expanded tutorials for Cloud Foundry and Kyma runtimes
Key Feature Introductions by Date
Partner Development
- November 2025: Music Festival Manager (ABAP RAP)
- October 2025: TCO Calculator for SaaS
- January 2025: Poetry Slam Manager (CAP)
Observability
- November 2025: OpenTelemetry integration
- 2024: SAP Cloud ALM integration
Security
- September 2025: Phase-integrated security guidance
CI/CD
- June 2025: CI/CD fundamentals chapter
Connectivity
- April 2025: Remote system connectivity guide
Tracking Updates
To check for new updates: 1. Visit the source documentation 2. Compare with dates listed here 3. Update this reference file accordingly
Related skills
How it compares
Pick sap-btp-developer-guide over generic cloud skills when building SAP BTP side-by-side extensions with CAP, destinations, and XSUAA security.
FAQ
Does sap-btp-developer-guide cover CAP or ABAP Cloud?
sap-btp-developer-guide covers both CAP on Cloud Foundry or Kyma with Node.js and Java, and ABAP Cloud in the SAP BTP ABAP Environment, including Fiori UI deployment and HANA Cloud persistence.
What SAP systems can BTP extensions connect to?
sap-btp-developer-guide documents connectivity to SAP S/4HANA, SuccessFactors, and on-premise systems via SAP Destination Service, Connectivity Service, and OData integration patterns.