Deploying your SAP Fiori elements app
Prerequisite: You have performed all previous exercises of this course.
In this unit, you will learn how to deploy the application that have been previously built to our SAP cloud account and run them together in the SAP Fiori launchpad.
Before we start adding the configurations, we make sure a terminal is open and we are logged into our cloud account.
-
Click in menu
Terminal->New Terminal -
This will open a new terminal. Next we make sure that we are logged into our cloud account by executing the following command ...
... for BTP trial region 🇪🇺 Europe:cf login -a https://api.cf.eu10.hana.ondemand.com... for BTP trial region 🇺🇸 US:
cf login -a https://api.cf.us10.hana.ondemand.com -
We need to provide the email address that we used when we signed up for the cloud account ...
-
... and also the password.
Before we deploy our applications, we add deploy and SAP Fiori launchpad configurations to each of our SAP Fiori elements applications bookinganalysis, travellist, and traveloverview.
-
In the terminal change to folder
bookinganalysisby executing commandcd bookinganalysis -
Start the interactive deployment config generator by executing command
npx fiori add deploy-config -
The fist prompt is
Please choose the target. Use the arrow up/down keys to selectCloud Foundryand hit enter. -
Next it asks for a
Destination name. Keep the selected entryabap-cloud-default_abap-trial(SCP)and hit enter. -
Answer the question
Add application to managed application router?withYfor yes. Hit again the enter key.
The deploy configuration will now be generated.
-
In the terminal in same folder execute following command to add a SAP Fiori launchpad configuration:
npx fiori add flp-configThis will start the interactive generator to add a SAP Fiori launchpad configuration.
-
For
Semantic Objectenter the valueBooking. -
For
Actionenter the valueanalysis. -
The
Titlecan be freely set, we useBooking Analysis. -
We can skip the
Subtitle (optional)by just hitting enter. This concludes the creation of the SAP Fiori launchpad.
Now we have added a deploy and SAP Fiori launchpad configuration and can continue to build and deploy the application bookinganalysis.
Now that we have the deploy and SAP Fiori launchpad configurations, we can build and deploy the application.
-
The artifact that is deployed to Cloud Foundry is call a Multi Target Application (MTA). To build this, we can execute following command in the terminal:
npm run build:mta -
This will build the file
bookinganalysis/mta_archives/archive.mtar. Now we can start the deployment using commandnpm run deploy
This will upload the mta we have build to the cloud account.
Because we want to deploy all 3 applications, we need to repeat these steps for application travellist and traveloverview.
-
In the terminal, change to the folder ../travellist by executing command
cd ../travellist -
Now add the deploy config by executing command
npx fiori add deploy-config -
Use the same values as we did for the application we configured previously:
Please choose the target: Cloud Foundry Destination name: abap-cloud-default_abap-trial(SCP) Add application to managed application router?: Yes
-
We add also a SAP Fiori launchpad configuration to the
travellistapplication by executing commandnpx fiori add flp-config -
For the
travellistapplication we use following values below. The subtitle can be set, but here we leave it empty.Semantic Object: Travel Action: manage Title Travel: List Subtitle: (optional)
-
As for the previous application, in order to deploy the
travellistwe need to build the mta first using commandnpm run build:mta -
Then we can deploy the application with command
npm run deploy
-
We also add a deploy and SAP Fiori launchpad configuration for the
traveloverviewapplication, but first we change to the folder by executing command:cd ../traveloverview -
Then we execute again the command to add the deployment configuration
npx fiori add deploy-config -
And again, we use the same values:
Please choose the target: Cloud Foundry Destination name: abap-cloud-default_abap-trial(SCP) Add application to managed application router?: Yes
-
In the same way as for the other applications, we also add a SAP Fiori launchpad configuration to
traveloverviewby running commandnpx fiori add flp-config -
For
traveloverviewwe use the values:Semantic Object: Travel Action: overview Title: Travel Overview Subtitle (optional):
-
As a last step in this section we build the mta for
traveloverviewand deploy it to our cloud account using the commands ...npm run build:mta -
... followed by command:
npm run deploy
In this part of the exercise we will enable the Launchpad service in your cloud account, create a SAP Fiori launchpad and add the previously deployed applications to it.
-
Navigate to https://account.hanatrial.ondemand.com and login to your cloud trial account.
-
Inside the cloud cockpit navigate to your
trialsubaccount.
-
In Cloud Cockpit in your sub account click on
Service Marketplace. -
Search for
launchpadand click the tile. -
Find the
Createbutton and click it. -
Keep the dropdown list boxes and click on
Create. -
In the confirmation popup click on
Close.
In order to manage SAP Fiori launchpads, you need to add the launchpad role to your user.
-
Expand
Securityin the navigation bar on the left and click onUsers. In the users list click on the row with your user name. -
In the section
Role Collectionsclick on the button with the three dots, then onAssign Role Collection. -
In the dialog search for
launchpad, check the checkbox atLaunchpad Admin, then click onAssign Role Collection.
In order to create a new launchpad we need to open the Site Manager.
-
In the menu of subaccount trial click on
Instances and Subscriptions. -
Find the
Launchpad Serviceand click onGo to Application.This will open the 'Site Manager'.
-
Click the button
+ Create Site. -
Give the new site a name, for instance
Traveland click buttonCreate. -
Click the back arrow to see the site directory.
-
In the navigation bar on the left click on
Provider Manager. -
Click the
Fetch updated contentbutton to refresh the HTML5 repository. -
In the navigation bar click on
Content Manager. -
Click on tab
Content Explorer. -
Click on tile
HTML5 Apps. -
Select all 3 application and click button
+ Add to MyContent. -
Switch back to
MyContenttab. -
Click
Everyone. -
Click on
Editbutton. -
Set the cursor into field
+ Search for items to assignand select 3 applications. -
Click button
Save. -
Click on
Back to content management. -
Click on
+ Newand selectCatalog. -
Enter for instance
Travel Catalogas title. -
Set the cursor into field
+ Search for items to assignand select all 3 applications. -
Click
Saveto assign the application to the catalog. -
Click on
Back to content management. -
Click on
+ Newand selectGroup. -
Enter as title for instance
Travel Apps. -
Set the cursor into field
+ Search for items to assignand select all 3 applications. -
Click
Save.
-
From the navigation bar select
Site Directory. -
In the Site Directory' view click on
Go to site.This should open the launchpad showing the 3 applications we have deployed.
-
You can test the apps and navigation, for instance by clicking on application
Travel Overview. -
In 'Travel Overview' you can click the chart.
-
This will trigger navigation to 'Booking Analysis'. From there you can go back.
Which brings you back to the 'Travel Overview'. You can also click an entry in card 'Travel List'.
-
This will navigate to 'Travel List' application.
You have completed the exercise! In this unit, you have learned
- How to add deploy and SAP Fiori launchpad configurations to applications
- How to deploy SAP Fiori applications
- How to create a SAP Fiori launchpad and add applications to it
Week 3 Unit 5: Building an SAP Fiori elements app with an external OData service



































































