This blog aims to provide guidance for all ABAP developers on creating a CAP application, along with a fundamental understanding of SAP BTP.
BTP:
SAP Business Technology Platform (SAP BTP) is a cloud-based platform designed to improve SAP applications. SAP Business Technology Platform (SAP BTP) brings together application development and automation, data and analytics, integration, and AI capabilities in one unified environment.
SAP BTP Environments:
In SAP BTP, “Environments” are like Platform-as-a-Service spaces.
They help us build, run, and manage applications and services. Think of BTP environments as different playgrounds, each made for specific tasks and technologies, providing the right space for different types of software work.
Each environment in SAP BTP provides the specific tools, technologies, and runtimes needed to build applications.
SAP BTP offers three main environments: Cloud Foundry, ABAP, and Kyma. There’s also another environment called Neo, but it’s being phased out.In SAP BTP, an “environment” is like a digital workspace where you can create and run different types of software applications.
Think of it as having different rooms in a house for various tasks:
One room for building web apps (like Cloud Foundry)Another room for working closely with SAP systems (like ABAP)And another room for creating small, interconnected software pieces (like Kyma).
( Kyma is a cloud-based platform that combines Kubernetes with tools and open-source components to help develop, run, and manage secure, scalable cloud-native applications. )
Each environment is designed with the right tools and resources for different kinds of software projects, so businesses can easily pick the best fit for their needs within SAP BTP.
Cloud Foundry Environment (2017):
Think of this as a space for building modern, cloud-based applications. It’s like a workshop where you can create web and mobile apps using popular programming languages and tools. This environment is perfect for developers who want to build flexible and scalable software that runs on the internet.Cloud Foundry includes the SAP BTP Cloud Foundry runtime service, which is based on an open-source platform managed by the Cloud Foundry Foundation. It allows you to build new business apps and services, supporting multiple programming languages, libraries, and services.
Example use-case:
You could use the Cloud Foundry environment to build a web app with Node.js or the SAP Cloud Application Programming Model. The app could connect to an SAP HANA database to pull and display real-time sales data.
ABAP Environment (2018):
SAP added the ABAP Environment to SAP BTP, known as SAP BTP ABAP Environment or “Steampunk.”This environment is based on the latest version of the ABAP platform used in SAP S/4HANA Cloud.It supports the ABAP RESTful Application Programming Model, which includes SAP Fiori and Core Data Services (CDS).The ABAP environment can also connect with other SAP BTP services, like SAP Destination service, SAP Build Work Zone, SAP Workflow Management, and SAP Interactive Forms by Adobe.
Example use-case:
You can use the ABAP environment to create custom reports or build extensions for SAP S/4HANA, such as a specialized app for processing sales orders.
Kyma Environment (2020):
The Kyma environment is a fully managed Kubernetes runtime based on the open-source project “Kyma.” Kubernetes is the core technology behind Kyma, and Kyma adds extra features to make it more powerful.Kyma combines Kubernetes with a set of top-notch tools and open-source projects, helping developers build, run, and manage secure and scalable cloud applications.Kyma offers additional features like Serverless, Eventing, Observability, Security, Service Mesh, and Application Connectivity. It can integrate with other SAP services and products, like SAP BTP, SAP S/4HANA, and SAP SuccessFactors.With Kyma, there’s no need to worry about infrastructure management or maintenance, freeing up developers to focus on building applications.
Neo Environment – Phasing Out in 2028:
· The Neo environment has been around since 2012 and is the oldest SAP BTP environment.
· However, it no longer offers the best technology for building cloud solutions. Cloud Foundry, ABAP, and Kyma now cover all the use cases Neo once did.
· SAP has announced that the Neo environment will be phased out on December 31, 2028, depending on customer or partner contracts.
History of SAP BTP:
2012 – SAP entered the PaaS market with SAP NetWeaver Cloud, initially code-named “Neo” (short for NetWeaver On-Demand).
2013 – SAP NetWeaver Cloud was rebranded as SAP HANA Cloud Platform.
2017 – The Cloud Foundry environment was integrated alongside Neo.
2017 – The “HANA” branding was dropped, and the platform was renamed SAP Cloud Platform.
2018 – The ABAP environment was introduced within SAP Cloud Platform.
2020 – The Kyma environment was added to SAP Cloud Platform.
2021 – SAP Cloud Platform was retired, and the new brand, SAP Business Technology Platform (BTP), was launched.
Introduction to Cloud Application Programming Model (CAP):
The SAP Cloud Application Programming Model is a set of tools and resources that helps developers create strong business applications. It shows them the best ways to do things, making it easier to follow proven methods. This means they spend less time on repetitive tasks and can focus more on solving their specific problems. The model uses popular open-source tools.
As previously mentioned, the SAP Cloud Application Programming Model includes various tools, languages, and libraries that assist in creating high-quality business services and applications. Here are some key components:
Business Application StudioCore Data Services (CDS)REST ODataSAP FioriSAP HANAJavaNode.jsEclipse VS Code CLI
In the realm of design principles, there exists a concept that is both flexible and subjective. It is flexible as it allows for a variety of choices. You have the freedom to select the technology you wish to employ, determine your architectural pattern, and choose the components of the programming model that align best with your development requirements.
Front Ends:
SAP FioriAngularReactVue
Toolsets:
SAP Business Application StudioEclipseVS Code
Data Sources:
SAP HANASQLite
Environments:
Cloud FoundryKubernetesXSALocal
Note: Before creating application we need to install package for CDS in BAS
Steps to create Cap Application:
Create a account in BTP CockpitClick on Trail Home
Click SAP Business Application Studio
Open BAS ApplicationLogin to BTP AccountClick on Dev i.e., Development Space
Click on menu and select Terminal and open new terminal
Type command cds init Employee_app
Now employee app is successfully created
Create a file in DB folder data-model.cds
Should give unique name ex: cap_app1Creating a entity called Employee
Now we need to expose the created data-model using serviceCreate a file in SRV cat-service.cds
We are now creating OData service
Now we need to install node module npm install
Build the cds using cds build
To run the application use command cds watch
Now you can check the metadata
In DB folder create a folder “data”
Create a CSV file for the data to the applicationCSV file name should be according to namespace + Entity
cap_app1-Employee.csv
Please feel free to share your thoughts in the comments section below.
If you enjoyed reading this blog post about Clean ABAP and would like to receive similar content in the future, please consider following my profile. By following my profile gaddamarunkumar , you will receive updates on new blog posts and other content related to ABAP development best practices.
Follow the SAP ABAP environment Topic page: SAP ABAP
This page is a great resource for staying up-to-date on the latest news and developments in the SAP HANA environment. You can follow the page to receive updates, post and answer questions, and read other posts on the topic
If you have any queries related to SAP and ABAP Developments you can post here https://answers.sap.com/tags/73554900100700000996, you can also find many topics related to your query.
This blog aims to provide guidance for all ABAP developers on creating a CAP application, along with a fundamental understanding of SAP BTP. BTP:SAP Business Technology Platform (SAP BTP) is a cloud-based platform designed to improve SAP applications. SAP Business Technology Platform (SAP BTP) brings together application development and automation, data and analytics, integration, and AI capabilities in one unified environment. SAP BTP Environments: In SAP BTP, “Environments” are like Platform-as-a-Service spaces. They help us build, run, and manage applications and services. Think of BTP environments as different playgrounds, each made for specific tasks and technologies, providing the right space for different types of software work.Each environment in SAP BTP provides the specific tools, technologies, and runtimes needed to build applications.SAP BTP offers three main environments: Cloud Foundry, ABAP, and Kyma. There’s also another environment called Neo, but it’s being phased out.In SAP BTP, an “environment” is like a digital workspace where you can create and run different types of software applications.Think of it as having different rooms in a house for various tasks:One room for building web apps (like Cloud Foundry)Another room for working closely with SAP systems (like ABAP)And another room for creating small, interconnected software pieces (like Kyma).( Kyma is a cloud-based platform that combines Kubernetes with tools and open-source components to help develop, run, and manage secure, scalable cloud-native applications. )Each environment is designed with the right tools and resources for different kinds of software projects, so businesses can easily pick the best fit for their needs within SAP BTP.Cloud Foundry Environment (2017):Think of this as a space for building modern, cloud-based applications. It’s like a workshop where you can create web and mobile apps using popular programming languages and tools. This environment is perfect for developers who want to build flexible and scalable software that runs on the internet.Cloud Foundry includes the SAP BTP Cloud Foundry runtime service, which is based on an open-source platform managed by the Cloud Foundry Foundation. It allows you to build new business apps and services, supporting multiple programming languages, libraries, and services.Example use-case:You could use the Cloud Foundry environment to build a web app with Node.js or the SAP Cloud Application Programming Model. The app could connect to an SAP HANA database to pull and display real-time sales data.ABAP Environment (2018):SAP added the ABAP Environment to SAP BTP, known as SAP BTP ABAP Environment or “Steampunk.”This environment is based on the latest version of the ABAP platform used in SAP S/4HANA Cloud.It supports the ABAP RESTful Application Programming Model, which includes SAP Fiori and Core Data Services (CDS).The ABAP environment can also connect with other SAP BTP services, like SAP Destination service, SAP Build Work Zone, SAP Workflow Management, and SAP Interactive Forms by Adobe.Example use-case:You can use the ABAP environment to create custom reports or build extensions for SAP S/4HANA, such as a specialized app for processing sales orders.Kyma Environment (2020):The Kyma environment is a fully managed Kubernetes runtime based on the open-source project “Kyma.” Kubernetes is the core technology behind Kyma, and Kyma adds extra features to make it more powerful.Kyma combines Kubernetes with a set of top-notch tools and open-source projects, helping developers build, run, and manage secure and scalable cloud applications.Kyma offers additional features like Serverless, Eventing, Observability, Security, Service Mesh, and Application Connectivity. It can integrate with other SAP services and products, like SAP BTP, SAP S/4HANA, and SAP SuccessFactors.With Kyma, there’s no need to worry about infrastructure management or maintenance, freeing up developers to focus on building applications.Neo Environment – Phasing Out in 2028:· The Neo environment has been around since 2012 and is the oldest SAP BTP environment.· However, it no longer offers the best technology for building cloud solutions. Cloud Foundry, ABAP, and Kyma now cover all the use cases Neo once did.· SAP has announced that the Neo environment will be phased out on December 31, 2028, depending on customer or partner contracts.History of SAP BTP: 2012 – SAP entered the PaaS market with SAP NetWeaver Cloud, initially code-named “Neo” (short for NetWeaver On-Demand).2013 – SAP NetWeaver Cloud was rebranded as SAP HANA Cloud Platform.2017 – The Cloud Foundry environment was integrated alongside Neo.2017 – The “HANA” branding was dropped, and the platform was renamed SAP Cloud Platform.2018 – The ABAP environment was introduced within SAP Cloud Platform.2020 – The Kyma environment was added to SAP Cloud Platform.2021 – SAP Cloud Platform was retired, and the new brand, SAP Business Technology Platform (BTP), was launched.Introduction to Cloud Application Programming Model (CAP):The SAP Cloud Application Programming Model is a set of tools and resources that helps developers create strong business applications. It shows them the best ways to do things, making it easier to follow proven methods. This means they spend less time on repetitive tasks and can focus more on solving their specific problems. The model uses popular open-source tools.As previously mentioned, the SAP Cloud Application Programming Model includes various tools, languages, and libraries that assist in creating high-quality business services and applications. Here are some key components:Business Application StudioCore Data Services (CDS)REST ODataSAP FioriSAP HANAJavaNode.jsEclipse VS Code CLIIn the realm of design principles, there exists a concept that is both flexible and subjective. It is flexible as it allows for a variety of choices. You have the freedom to select the technology you wish to employ, determine your architectural pattern, and choose the components of the programming model that align best with your development requirements.Front Ends:SAP FioriAngularReactVueToolsets:SAP Business Application StudioEclipseVS CodeData Sources:SAP HANASQLiteEnvironments:Cloud FoundryKubernetesXSALocalNote: Before creating application we need to install package for CDS in BASSteps to create Cap Application:Create a account in BTP CockpitClick on Trail Home Click SAP Business Application Studio Open BAS ApplicationLogin to BTP AccountClick on Dev i.e., Development Space Click on menu and select Terminal and open new terminal Type command cds init Employee_app Now employee app is successfully created Create a file in DB folder data-model.cds Should give unique name ex: cap_app1Creating a entity called Employee Now we need to expose the created data-model using serviceCreate a file in SRV cat-service.cds We are now creating OData service Now we need to install node module npm install Build the cds using cds build To run the application use command cds watch Now you can check the metadata In DB folder create a folder “data” Create a CSV file for the data to the applicationCSV file name should be according to namespace + Entity cap_app1-Employee.csv Please feel free to share your thoughts in the comments section below.If you enjoyed reading this blog post about Clean ABAP and would like to receive similar content in the future, please consider following my profile. By following my profile gaddamarunkumar , you will receive updates on new blog posts and other content related to ABAP development best practices.Follow the SAP ABAP environment Topic page: SAP ABAPThis page is a great resource for staying up-to-date on the latest news and developments in the SAP HANA environment. You can follow the page to receive updates, post and answer questions, and read other posts on the topicIf you have any queries related to SAP and ABAP Developments you can post here https://answers.sap.com/tags/73554900100700000996, you can also find many topics related to your query. Read More Technology Blogs by Members articles
#SAP
#SAPTechnologyblog