Start by creating SAP® BTP Account if you don’t have one already. Log in to your SAP® Cloud Account, go to the SAP® BTP Console, and choose the SAP® BTP service.
Create Subaccount:
Subaccount is 1-to-1 associated with Org and Org acts like a Container for Space.
Assign Quota:
A quota is a set of limits that define the maximum amount of resources (e.g. memory, CPU, storage) consumed by an organization (Org) or a space within an Org.
Create a Space:
One Subaccount can have many spaces, it is the place where the Applications are deployed.
Create Services or Deploy Apps
Inside spaces, you have capabilities to Create Services and Deploy Apps.
The purpose of getting an S/4 HANA® On-Premise system is to learn and practice some of the new and upcoming technologies of SAP® Hands-on. Having access to a personal sandbox system allows you to learn multiple technologies at once with freedom. With S/4 HANA® On-Premise Systems you can learn not only S/4 HANA® Technical but also ABAP®, ABAP® RAP, CDS, Fiori®, UI5, Basis, BTP(SAP® Cloud Platform), HANA® DB and Many more such topics.
In this course, you will see how to use the image of S/4 HANA® 1909 On-Premise in Docker Hub(provided by SAP®) and install it on your personal computer or Cloud VM. We have kept all the steps very simple to understand and also shared our experience, so the installation would be a piece of cake for you.
3. Prerequisite and Architecture
We will be Using Google® Cloud Platform(GCP) to create our VM Instance which will be having our S/4 HANA® On-Premise Instance running in Docker Engine.
The S/4 HANA® Docker Engine will be acquired from Docker Hub where SAP® is providing the S/4 1909 system Docker images(based on updates the new version can change). You as a developer can access the Systems from local SAP® Frontend GUI or Eclipse with ABAP® ADT plugins. Prerequisite:
Account in Google® Cloud Platform(GCP) with Credit Card Added
Compute Engine API Enabled for GCP
SAP® Frontend Installed in Local Machine
Eclipse Installed in Local Machine with ABAP® ADT Plugins
Basic knowledge of installation with Linux(Ubuntu) Systems
Docker Hub Account
4. Create a VM Instance in GCP
Create a Linux(Ubuntu 18.04) based VM Instance in GCP with minimum specification as below
– 8 CPUs – 32GB RAM – 190GB Disk
Note: You can use other Operating Systems as well, but the Minimum specifications need to be as below for different OS types:
For Windows OS Machine:
– 4 CPUs for Docker Desktop -16GB RAM for Docker Desktop -170GB Disk for Docker Desktop
For Linux OS:
– 4 CPUs – 16GB RAM – 150GB Disk
For macOS:
– 4 CPUs for Docker Desktop – 16GB RAM for Docker Desktop – 170GB Disk for Docker Desktop
If you are installing the machine on a Personal Computer then you need to allocate the above resources to Docker Engine. As these specifications are higher than many of our personal computer specifications so we are using a VM instance in Cloud to install the machine.
In case you provide fewer system resources than the minimum requirement, then you will face issues while the installation of S/4 HANA® will go into a state where it will go out of memory and installation can fail or take too long.
5. Install Docker
Install Docker on Ubuntu Machine with the below commands:
For Frontend GUI: 3200 For Eclipse: 30213 For Cloud Connector: 8443 For oData Access HTTP: 50000 For oData Access HTTPS: 50001 For RFC: 3300
The flag -agree-to-sap-license is an optional flag, if you do not apply it then it will ask to accept the license after installation.
The Installation will first download the Docker image, then extract it and then Install it. It might take up to 1-2 hrs depending on your network speed and system configuration. As the Docker image is 23GB in size when compressed and 63GB when unzipped.
Note: For our setup below are time take to perform actions:
The download of 23GB Docker Image – Approx 15 min
Extraction of 23GB Docker Image to 63GB Image – Appx 20 min
Installation of S/4 HANA® when we run Docker Image for the first time – Approx 25 min
Total time taken: 1 hr(Approx)
The Initial screen at the start of Installation is below:
The Final Screen After Installation is below:
Congratulations! if you see this message, your System is now ready to be used. Also, if you want to learn Hands-on new SAP® Skills of Front-end or Backend you can check our course information here: https://www.ui5cn.com/collections
7. Monitor During/After Installation and Start/Stop System
At the time of System installation, you can monitor the progress and memory status to make sure the installation is not halted with the below commands.
Note: If you are performing the steps on your own personal computer then instead of using the IP of VM use the IP of Docker which you can find with the below command:
Note: Ldtf5432 is the default master password for your system.
Go to T-Code: SLICENSE
The other way is to also download your License and upload it to GCP Linux Machine. Then you can use the below command to apply the license to Docker Image:
Optional: Stop and Start the Docker engine again for a new License to work properly.
9. Connecting to SAP® Frontend and Eclipse
You must have a Firewall rule added to your VM Instances which will allow ports that you want to access from outside, which can be for SAP® GUI, Eclipse, or SAP® Cloud Connector, etc.
The list of Port to be opened are: For Frontend GUI : 3200 For Eclipse : 30213 For Cloud Connector: 8443 For oData Access HTTP: 50000 For oData Access HTTPS: 50001 For RFC: 3300
For SAP® Frontend Machine you can use the below setting:
conn=/H/<IP ADDRESS OR HOST OF VM>/S/3200
Or
Server: <VM IP Address> Instance: 00 System ID: A4H
For the database HDB, User: SAPA4H, Password: Ldtf5432
10. SAP® Cloud Connector
For Starting Cloud Connector in Docker VM:
sudo docker exec -it a4h bash# Inside the Docker a4h bash shell use below command to start Cloud Connector/usr/local/sbin/rcscc_daemon start
For Stopping Cloud Connector:
# Inside the Docker a4h bash use below command to stop Cloud Connector/usr/local/sbin/rcscc_daemon stopexit
You can Access Cloud Connector With Below Details:
URL: https://<IP Address of VM>:8443 Username: Administrator Password: manage
Note: Do not forget the s of HTTPS in the URL and click proceed even if it shows the warning in the initial screen. Also, the default username and password are case-sensitive.
In this blog, we will Summarise our Development Experience with SAP® BAS(Business Application Studio). You can also watch the detailed course of Learn SAP® Business Application Studio(BAS) Developmenthere with Hands-on Examples and In-Depth Topic Coverage.
1. What is SAP® BAS?
SAP® Business Application Studio also known as SAP® BAS, is a Service in SAP® Cloud for Integrated Development and Enhancement of Applications.
2. What SAP® BAS is made of?
SAP® BAS is a container that is Based out on Eclipse Theia which almost looks Like a VS Code Development Environment.
3. Is it Free to Use?
No, for productively using SAP® BAS you need to acquire SAP® Licence.
4. How Many kinds of SAP® BAS is Present?
SAP® BAS has different Flavours that are tailored for different types of development. For developing SAPUI5 or Fiori® App with BAS you select SAP® Fiori type, for developing CAPM App you select SAP® CAPM® type and so on. Also, with time you might see more development Flavour added to it.
You can also enable different packages like SAP® Workflow Package, CDS Viewer, HANA® Development Packages Which will allow you to develop the respective type of Project and Operate on Different File Types.
In our course of Learn SAP® Business Application Studio(BAS) Development here, we have covered details with SAP® Fiori®, SAP® CAPM and SAP® Workflow Dev Space Kind. In SAP® Fiori® Dev Space we have covered the new Standards and Format of SAPUI5 App Development in Details with Approuter, xs-app.json, SAPUI5 Tooling, Regular Expression, Connection Settings, Run Configuration, MTA.YAML and more.
5. What is the Operating System on Which SAP® BAS Runs?
SAP® BAS is a Virtual Container that runs on Ubuntu Based OS Architecture.
Developers will not have root access to the operating system but still, the additional packages and modules required for the project can be installed with the Terminal.
6. How good is Terminal experience in BAS?
SAP® BAS Terminal Provides an Integrated Experience of Development and Dev-Ops. You can switch back and forth between, editors, terminal, and explorer to get the development done fast. You can almost use all CLI(Command Line Interface) Command with SAP® BAS which you might be using with Linux Systems. But for commands which require any kind of Extra Permissions like root permissions will not be possible out of the box.
Terminal also allows you to do an operation in multiple ways.
Example 1. If you want to push an App to SAP® Cloud Foundry you can either use Explorer, right-click on MTA File, and Right Click on the Build and Deploy or You can also use BAS Terminal directly to use the respective CLI Commands.
In our course of Learn SAP® Business Application Studio(BAS) Development here, we have covered details of the MTA File Structure, also how to customize it for the Deployment to SAP® Cloud Foundry and On-Premise ABAP® Systems in Details, so make sure to check it out.
Example 2. You can use Yeoman Generator from CLI and create a Blank Application or Also you can use File>New Project from Template option to create a new Project.
One of the big advantage with BAS Terminal is it will allow you to use your existing knowledge about CLI Commands and get you out of difficult situations, for example chaining Terminal commands of npm install && npm build && cf push will allow you to chain 3 multiple commands together and you can take a coffee or tea break( depending upon your preference 😀 ) in between and not have to wait in front of the screen.
When you are developing a NodeJS Based Application you can quickly test a piece of Javascript code by just typing Node jsbasecode.js to see how it performs.
These are just the tip of the iceberg, over time with the usage of BAS you will want to use more Terminal, than the Menu Options Provided because most of the operations are fast with Terminals.
Additionally, you also get a Find Command Option which has a list of popular CLI commands and CLI Operations one can use, which makes it even more fun to use Terminal Based Commands
Also, our course of SAP® BAS here covers how you can chain multiple commands together, create a project, build the project, run it or deploy it using CLI.
7. What is new in SAP® BAS compare to SAP® Web IDE?
SAP® Full Stack Web IDE was removed from SAP® Cloud offering on 13th Nov 2020. SAP® Web IDE Personal Edition is still under downloads but it is not getting any more updates, the link can be reached from here https://tools.hana.ondemand.com/#sapui5
In our course of Learn SAP® Business Application Studio(BAS) Development here, we have shown how one can start from exiting the SAPUI5 project of SAP® Web IDE Personal Edition and Import it into SAP® BAS. Once you import the existing Project to SAP® BAS, we have also covered in a step-by-step manner how to change the structure to New Standard SAPUI5 App Structure, Customization of Approuter and YAML file.
Now, when we see the need to update from existing SAP® Web IDE to SAP® BAS, the main reason can be:
SAP® BAS Pros Compare to SAP® Web IDE
[Note: Below are personal opinions with our limited experience with Free Trial]
BAS have different flavors, so for example one who wants to only work with CAPM can select that kind of environment with BAS. This needs to be done at the beginning of the BAS setup.
In BAS the Underlying Eclipse Theia is designed to provide developers VS Code like development, experience which is one of the most popular developments IDE used. So you can use your existing knowledge of VS Code and Switch to BAS interface easily.
BAS provides powerful CLI Functionalities and even if you are new to Terminal you can still use the List Terminal Command Options and select from the List your Command Without remembering equivalent CLI Command.
VS Code Plugins can be also used with BAS and VS Code have a lot of nice Plugins.
Run Configurations are easy to create and edit as the run configuration or Launch files are a JSON file which one can edit. These launch.json files are also the same when it comes to VS code so prior knowledge of VS Code Development can be used here.
Theme Setting and Visual Setting like Editor’s Fonts, Spaces, etc are easy to change.
You can Add(or Bind) Services like Database, API’s to Test and Experiment Within the BAS environment.
More options are provided to Create Project from Template and also you can use Yeoman Generator from CLI and even Customize the Yeoman Generator to Autofill Fixed Values.
With Independent Git Tab developers can easily Track Changes, Amend Changes, Stage, Push, Pull, etc with Menu Options and the same can be also done with CLI.
Working With SAP® Cloud Foundry(SCF) seems to be more robust. For example: when you deploy your application to SCF and if it stops in between then you can resume or abort it after the failure. Also, the logs can be downloaded of the process and investigation can be done easily within the BAS.
And many new improvements, but these are the top 10.
SAP® BAS Cons Compare to SAP® Web IDE
[Note: Below are personal opinions with our limited experience with Free Trial]
When the BAS is kept inactive for a while it stops automatically and sometimes starting a stopped BAS takes a long time.
When you are working with a slow network, the BAS goes offline and the screen freezes, a good feature is the bottom colored bar shows you that you are offline.
With BAS a limited Amount of Space is provided to you, so when you are out of space, BAS will not allow you to create new folders, files, or installations. You can fix this by removing some files or folders.
8. How Can someone Add Local Run Configuration and Debug code in BAS?
Run Configuration is used to select the configuration and commands to test your code locally. When you add a new Run Configuration in BAS, it automatically suggests to you what are the files and configuration which can be used. When you select a suggested Run Configuration from the selected list a launch.json file is created and when you already have launch.json file then a new entry in the launch.json file is added.
This launch.json file has all the information of what commands need to be run, additional parameters, and multiple other information. You can edit the launch.json manually as well to customize.
When you want to debug, a breakpoint within the code can be easily set by clicking before the line number of the code. When the control passes the code where you have a breakpoint it stops execution and you also can see all the active variables and call stack, which is similar to other Eclipse Debugging Perspective.
In our course of Learn SAP® Business Application Studio(BAS) Development here, we have not only covered how you can add Run Configuration but also how to change the entry of launch.json files for customizing run.
9. How is SAPUI5/Fiori® App Development Changed in BAS Compared to SAP® Web IDE?
Now with the new pattern, a SAPUI5 App is a NodeJS App where the main SAPUI5 App goes inside a webapp folder and when you are creating an App targeting Cloud Environment then this webapp folder is inside the HTML5Module folder.
When you work with NodeJS based SAPUI5 App, you can use the Terminal for installation of dependencies inside node_modules, adding packages, adding and testing scripts inside package.json, etc. Also, the Terminal can be used to run many small experiments in between development to test the Code. You can also use the Run Configuration to Test the code locally which also abstracts many internal complexities required to run a code(or project) to developers, so developers can skip those if they do not want to be bothered with it. It provides quick debugging and test of the Application possible, which in turn speeds up the development process.
Also, when you are new to NodeJS App development, the concepts of package.json, node_modules and dependencies are totally new concepts. So in our course of Learn SAP® Business Application Studio(BAS) Development here, we have covered the basics in details before using the concepts in SAPUI5 App.
10. How is Workflow App Development Changed in BAS Compared to SAP® Web IDE?
Most of the SAP® Cloud Platform(SCP) Workflow based development is the same as it was with SAP® Full Stack Web IDE. Developers will find new changes when they work with SAPUI5 App and SCP Workflow together. The new changes will be the use of the XSUAA Token passing process for Authentication and Authorization.
You can also see the details of those in our course of BAS here, in Section 5.
11. How is CAPM App Development Changed in BAS Compared to VS Code?
SAP® BAS provides many nice features out of the box for CAPM based development. The New Project from Templates creates all the files which are required for a CAPM App with empty values that the developer can provide according to the project.
The CAPM NodeJS based application again because it is a Node App allows developers to use the powerful CLI experience within the development. The debugging can also be done easily and active variables can be investigated with different tabs provided in debugging panel.
BAS also provides a different tab to add Database Source which allows the developer to see the Database(Local or Remote) content and changes to it, which speeds up the development.
You can also see the details of CAPM App Creation, Running and Deploy in our course of BAS here, in Section 6.
12. How Difficult is it to Personalise Theme Setting in BAS?
SAP® BAS provides Dark Theme which many developers would appreciate. The change of Theme is immediate when you select the new Theme from Theme Setting, which allows you to select the theme based on your liking.
Similarly, the BAS UI Settings can be changed and Personalized easily with immediate feedback.
13. Can we use VS Code Plugin With BAS?
Yes once you accept SAP® Policies for 3rd Party Plugins(Initial Asked in Plugin Tab), it allows you to install additional Plugins from VS Code Library. Installation and Uninstallation both are fast and can be managed from Plugin tabs.
14. Does BAS have an integrated Version Control System like Git?
Yes, BAS provides an independent tab to allow developers to keep track of code changes. You can connect with your respective Git Repository and use standard features like Stage, Ammed, Push, Pull, etc within the same Tab.
One can also use CLI to run Git commands for carrying out the same operations and the respective changes in the Git tab are almost immediate. For example, if you have some changes in the Git tab and you went to Terminal and ran the git add <fileName> command then the respective changes also will appear in the stage section almost immediately in the Git tab.
You can also see the details of the use of Version Control System like GitHub in our course of BAS here, in Section 6.
Views are Projection over Data and are not Actual Data. Similarly, CDS(Core Data Services) are views which are projection over Database Tables.
With CDS View one can create a view by writing DDL Code which is easier to understand.
CDS Views can have a relationship with each other like association, composition, and also Join like Left outer Join, Inner Join, etc. Using this you can create complex data models.
In S/4 HANA® VDM is created with CDS Views. And it is one of the key selling points of S/4 HANA®.
VDM stands for Virtual Data Model, the concept is you do not expose a database directly to the outside world but you create views over the database and with the help of these views one can read data and update data.
Views are primarily used to read data and with the help of ABAP® code, you can update the data which is mostly in the case of Transactional Application.
The Update of data in Transactional Application in S/4 HANA® is done with AMDP, BOPF, ABAP® Restful Programming, etc.
If you want to see and learn CDS-Based Development Hands-on. You can also check out the CDS Professional Development course here. We have also other courses like ABAP® Restful here where we have covered the VDM in-depth and how one can create a transactional application with the Restful framework.
Advantage of CDS Views
The main advantage of CDS views is with the CDS view you can create full-fledged Data Models.
For example, imagine you have to create a data model for the Order to Cash process. Here let’s only consider Sales Order Part for now. In this case, you will have a Header and Item tables. Now in data modeling, you will be creating CDS view for Header Table and CDS view for the Item table. Then you will specify that they have a composition or association relationship. The CDS view which directly extracting data from the Database table is called Basic CDS View. These Basic CDS Views can remain the same for all the Projects. Developers can further extend the Basic CDS Views to create Composite CDS Views. This layer of CDS Views can be used in applications. One can again Create one more layer of CDS Views over Composite CDS Views called Consumption CDS view which will be Custom Build to be used in a specific application. The naming convention of the Basic CDS view is (I_*, example I_PurchaseDocHeader), composite is (I_*) and consumption is (C_*). These Hierarchies are referred to as VDM(Virtual Data Model) which is one of the key aspects of S/4 HANA®.
CDS Views are not dependent upon the database, so you can use CDS views over any SAP® Supported Database.
In CDS Views Client Handling is automatic, even if you want to ignore it in your code, it can be handled internally.
In CDS one can use Aggregation and Numeric Function.
In CDS View you can have a calculation field that can automatically calculate values-based upon every time an update of the value happens. This field can use Aggregation and Numeric Function as well. For example, if you want to Aggregate all the Item Price in Sales Order Header. This can be done with Aggregate functions. You can have a custom field in your Header CDS views with Aggregate functions to achieve this.
CDS views can be used in ABAP® Code to read data.
You can have complex Joins and Projection over the database with CDS View using CDS DDL Code.
CDS Views supports Open SQL Syntax. So, you can call CDS View with Open SQL in ABAP® Code.
CDS Views can also be viewed with SE11 T-Code Using CDS View’s SQL View Name.
CDS Views are Part of the ABAP® Data Dictionary.
CDS View can be easily exposed as oData Service by Just adding a single annotation as @odata.publish: true
And finally, the most exciting thing you can do is add semantic information to data, with information like how should the data appear in UI, what the data holds, is it a currency or timestamp, what should it be called in the UI layer, what is the sequence in which data need to be represented in UI, etc.
This semantic information is called Annotation. Annotations can be of different types and start with a @ symbol. With the CDS Views, one can also define the UI and Presentational aspects within the view. By adding the annotation to CDS View one can control how the data is represented in frontend logic irrespective of which application is using it.
To Learn CDS Development Professionally You can Enroll in our In-Depth CDS Professional Development Course here.
To learn how to use CDS in Transactional Application and Create Real-time Project with ABAP® RESTful you can enroll in our ABAP RAP Professional Development Course here.
In this 7 blog series, we are going to provide a small end-to-end scenario to work with SAP® CAPM. Here the usecase we are going to use is of Learning Management System(LMS) and build a Student List App and Deploy it to SCF.
Link to Master(or Main) Blog from which all the other blogs can be reached is Here.
If you wanted to check out the detailed course on SAP® CAPM the link is Here.
If you want to get learn SAP® Cloud Platform Development in Detailed then we have a 35hrs hands-on course Here.
For current offers and discounts check offer page Here.
In this section we are going to deploy our App to SAP® Cloud Foundry(SCF) in SAP® Cloud Platform(SCP)
Step 1: Building DB Artifacts
Till now, we were using sqlite3 Database in the local environment to test. Now we will use HANA® DB in Cloud or HDI Container(which comes with Free Trial of SCF).
To deploy our database artifacts i.e the cds which describe the structure and csv data. We need to first convert it to SQL, in which the HDI container/HANA® DB can process the creation of the table and loading of data.
For this we need to build our db artifacts, this we do by opening .cdsrc.json and adding the content as shown below
Note: In this case, we are telling the CAPM to create a build inside folder gen(which will get created once we run cds build/all command). And inside the gen folder, we will get db, srv and app build code.
For our purpose, we only need db artifacts so the above .cdsrc.json code can be just for db build as shown below
Now let’s start the build process which will read the .cdsrc.json file and create a gen folder and add all the build artifacts inside it
cds build/all
Step 3: Create the HDI Container in SCF
Now lets, create the HDI container in the cloud. We can do it manually with Cockpit UI or with CLI. Below us CLI Code which you can execute after you are logged in to your SCF account from CLI
cf create-servicehanatrial hdi-shared somedbname
In this case, the SAP® Cloud Foundry service is hanatrail, the plan is hdi-shared and somedbname is your HDI container name.
Step 4: Change package.json DB
Open the package.json file from the project directory and update the place we have sqlite to hana i.e. from "kind": "sqlite", to "kind": "hana",.
Here, we are telling CAPM App to use HANA® DB(or HDI) connection setting
Note: You can also run command to uninstall sqlite3 from the project if you face exit status 14 error while deploying the app to SCF with below command
npm uninstall sqlite3
or Just remove the sqlite3dependencies from package.json.
Step 5: Create YML
To deploy our App in cloud we can either use mta.yml or manifest.yml.
Note: .yml and .yaml are both extensions of YML descriptor file and are same. But mta.yml and manifest.yml are both different kinds.
You can think mta.yml as an advanced version of manifest.yml where you have more features like adding resource bundles, also when an app is deployed with mta.yml file then in client-side a compressed zip file is created with all Apps artifacts and then this zip file is deployed to Cloud. In the case of using manifest.yml file while deploying, all files are uploaded sequentially and no zip file is created locally as in the previous case.
In our case, we use manifest.yml file in the root of the project for simplicity as shown below
Create a new file named manifest.yml
touchmanifest.yml
Add Deployment information to manifest.yml file as below:
Here, we are first deploying the db artifacts which will create the tables in HDI container(or HANA® DB) and Add data. After that, we deploy the newApp, which will deploy our CAPM App.
Step 6: cf push and Test
For deploying App in Cloud you can use the command
cfpush
Which needs to be done in the root of the Project, where you see your manifest.yml file you created.
Output of the application will be
Fiori Launchpad:
Data of Students:
🙂 Congratulations! You have completed this series.
Before we end!
In this 7 blog series, we are going to provide a small end-to-end scenario to work with SAP® CAPM. Here the usecase we are going to use is of Learning Management System(LMS).
Link to Master(or Main) Blog from which all the other blogs can be reached is Here.
If you wanted to check out the detailed course on SAP® CAPM the link is Here.
If you want to get learn SAP® Cloud Platform Development in Detailed then we have a 35hrs hands-on course Here.
For current offers and discounts check offer page Here.