In this section you will first create your development environment in SAP Business Application Studio. Then you will use the created environment to develop the sample application:
- Create data models
- Define relationships between the entities
- Upload test data
- Build a user interface to display the data
- Add role concept to define different authorizations
-
Go back to your subaccount in SAP BTP Cockpit and navigate to Instances and Subscriptions in the menu on the left side of the screen.
-
Find SAP Business Application Studio in the application section and choose the browser icon to open the app.
-
In home page of SAP Business Application Studio choose button Create Dev Space to start
A dev space in SAP Business Application Studio is a development environment with the tools, capabilities, and resources needed for developing your application.
-
Enter a name for your Dev Space for example, Riskmanagement and select Full-Stack Application Using Productivity Tools in menu.
-
Choose Create Dev Space
-
Your Dev Space is now being created and as soon as status change to Running you can open your Dev Space by clicking on the name
-
Click on Create Project under Project Explorer.
-
Select Full-Stack Project (Productivity Toolkit) and choose Start.
-
Enter a Project Name, for example, Riskmanagement and provide a Short Description and choose Finish.
Loading SAP Business Application Studio for low-code development can take some time, especially if it’s the first time you use it.
-
Once your project is created, you can see the Storyboard of SAP BAS .
Now you can start the development of your application. First you will model your application and define the database table and the relationship between the entities.
-
In this application two Data Models 'Risks' and 'Mitigations', to hold the data are needed. To create a Data Model open SAP Business Application Studio, look for the tile Data Models and choose the + icon to add a new entity.
-
A new entity is created for you. Click on the tile and choose Show Details to edit the entity
-
Change the Entity Name to Risks.
-
Retain the property
ID
and choose the + icon in the table to add the following properties:Property Name Property Type Max Length title string 100 prio string 5 description string 100 impact integer criticality integer -
Back in the Data Model Editor, choose the Add Entity button in the menu on the top to add another entity. Enter the Entity name Mitigations. Retain the property
ID
and choose the + icon in the table to add following properties:Property Name Property Type Max Length description string 100 owner string 100 timeline string 100 -
Now, you can see two entities in the Data Model Editor. In a next step you will describe the interconnection between those entities by defining a relationship, so each risk has a mitigation associated to it. Find the entry of Mitigations and click on the header of the table. Choose Add relationship Icon in the menu appearing on the right. Connect the appeared line to Risks entity, by clicking on table and configure the relationship in pop-up.
-
In the pop-up screen enter all the required details:
-
Choose Create button to save.
-
In the details section of Risks, choose Aspects and check entry for managed.
-
In the details section of Mitigations, choose Aspects and check entry for managed.
Now you will create service entities for Risks and Mitigations to define which parts of the data models you just have created should be exposed to the application.
-
Go back to the storyboard page of the application. Find the Services tile and choose the + icon to add a new service entity.
-
On the next screen, select Riskmanagement.Risks and choose Ok to finish.
-
Back in service editor, choose Add Entity and select Riskmanagement.Mitigations as type and choose Ok to finish.
Once the structure of your application is finished, you can add sample data to the application. You either can use the visual data editor or insert data using a CSV file.
-
Download the archive containing the sample data in CSV format and extract the files.
-
Go back to the storyboard of the application. Find the Risk entity in Data Models and choose Set Sample Data.
-
Select Risks in the Entity list then choose Import.
-
Import
Riskmanagement-Risks.csv
CSV file with the required data for risks.
Hint: SAP Business Application Studio might show an error in this step, which will be fixed while importing the mitigation csv file.
- Similarly, import
Riskmanagement-Mitigations.csv
file with the required data for mitigations.
You now have developed your first application with SAP Business Application Studio visual tools. In the next section you will create user interface and user roles.
Need help? Look at the Troubleshooting Guide or use mission support to connect with mission experts.