In this section we will deploy the project to the Business Technology Platform (BTP).
Switch back to the Home tab.
Now that the project is developed, click Deploy on the "Home" screen. You are then asked to log on to a Cloud Foundry account in BTP.
Press the Log In button
Then in the new screen enter:
- the Cloud Foundry Endpoint https://api.cf.eu10-004.hana.ondemand.com . Note: that the system recommends the URL https://api.cf.eu10.hana.ondemand.com make sure you manually enter the -004 part behind eu10 !
- choose SSO Passcode as the authentication method
- press the link Open a new browser page to generate your SSO passcode
This opens a new page, with a temporary passcode created for you user.
- press the button right to it in order to copy the passcode to the clipboard as indicated here:
- paste the copies passcode into the field Enter your SSO Passcode back on the screen before.
- press Sign In
After a couple of seconds a new screen opens like this:
Here:
- choose the organization TechEdLCAP_lcapteched
- choose the space dev
- Press Apply
It is then confirmed in the lower right corner that you have logged on. Now the deployment starts and in the lower part of the screen a new tab Task: Deploy appears. It will now take several minutes for the application to be deployed.
While you are waiting for the project to be deployed to the BTP, we can use the time for another look behind the scenes. It is not necessary that you know any of this for developing our project, it is just meant to give you some more background and show you options how you can decide to work with code at any point also. We have covered some aspects of this in the previous exercise already. However, with the deployment there are additional aspects.
Up to the point until you pressed Deploy your project didn't include any artifacts to do with deployment. After all you might just have only wanted to try something out and never intended to deploy the test project. What's more, while at this point it is only possible to deploy the project to BTP's Cloud Foundry runtime, there will be other options in the future. These potential other options (e.g. BTP Kyma runtime) require different configurations and files for deployment. That's why it makes sense to only generate these when it becomes clear that a project is deployed and where.
One of the main files that is generated by the low code perspective on deployment is mta.yaml file. Let's open it.
After you have opened the Explorer the first time in the last chapter (via Burger Icon in the upper left -> View -> Explorer) you can now invoke a new icon in the side pane to open it:
Now open the mta.yaml file:
You can see that it contains almost 200 lines. This file was automatically created for you when you hit the deploy button just moments ago. This file contains important information for the deployment, what should be deployed and what depends on what, which services should instantiated on BTP and much more. Under normal circumstances a developer has to create this file manually or at best gets some parts of it generated by frameworks. Note that using the low code perspective of the Business Application Studio this is done for you behind the scenes and wouldn't it be for the background information of this current chapter you wouldn't even know that the file exists.
Meanwhile the deployment might be finished. If it is you will see a URL in the task tab. Also when you press the Deploy button at the top you will also see an entry View last deployed. This link will from now on always be available in your project.
Press either of them. This will take you to this page:
It looks very much like the preview page from last chapter. Indeed it is almost the same page, only that now everything is deployed to a an account in the BTP. Again you can click on the service links on the right and / or the UI application.
If you enter the My List Report application and press the Create button, you get the same features like in preview mode, only that the business partner is now always served from the S/4 HANA Cloud system in the back:
This concludes this hands on. In just a few chapters without having to code, you have created an OData service based on CAP and a corresponding UI application based on SAP Fiori elements and you have deployed it to SAP's Business Technology Platform. Your application complies to standard designs and comes with a lot of functionality out of the box.
There are a lot of features of the low code perspective in BAS that we haven't covered in this workshop. So, for completeness let's have a look what you could have also done on top:
- Use authentications for different user roles
- The service in our project is set up that it can be used for any CRUD operation by users that have a user and password for the corresponding BTP sub-account. However, this is not always what's wanted. While some users might only have read access to our applications others can read and write
- To support such scenarios one can define authorizations for the service entities and assign different privileges for different user roles. These roles then have to be assigned to users by an administrator after deployment
- Share you project
- You can enable sharing your project by assigning it to a Git repository
- You can then not only push your changes to the central Git repo but also allow others to collaborate on the project by sharing the project with them
- In case of conflicts when several people work on the same project, there are simplified processes to overcome this
- Create a mobile first application with MDK