In this exercise, you will create another app Display Customers in the existing CAP project. This app displays the detailed information of customers. The main entity is the Passenger entity. To create the app, you will use the SAP Fiori tools - Application Generator.
This app is used in the exercises of Unit 12 Discovering the Flexible Programming Model of SAP Fiori Elements for OData V4 and Unit 13 Illustrating the Navigation Concept in SAP Fiori elements for OData V4.
While there is a separate file for the annotations returned from the back end in SAP Fiori elements for OData V2, the
$metadata file in SAP Fiori elements for OData V4 includes both metadata and back-end annotations.
You have completed the exercise Clone the Initial Application Project, Set Up and Run the Application in SAP Business Application Studio in the unit Getting an Overview of SAP Fiori Elements for OData V4 (lesson: Getting Started). Alternatively, you can check out its solution branch: SAP-samples/fiori-elements-v4-cap-advanced at initial-app-state.
Watch the Simulation and Perform the Steps
This exercise contains a simulation that takes you through all the steps described below. You can follow the simulation and perform the steps using your own trial account.
Open your CAP project in SAP Business Application Studio.
Select the Menu icon, then File > New Project from Template, and then select SAP Fiori application to create another app based on the same CAP service.
On the SAP Fiori application page, select the template List Report Page.
On the Data Source and Service Selection page, perform the following steps:
From the Data source dropdown, choose Use a Local CAP Project.
From the Choose your CAP project dropdown, choose fiori-elements-v4-cap-advanced.
From the OData service dropdown, choose TravelService (Node.js).
On the Entity Selection page, perform the following steps:
From the Main entity dropdown, choose Passenger.
From the Navigation entity dropdown, choose to_Booking.
On the Project Attributes page, perform the following steps:
In the Module name field, enter customer.
In the Application title field, enter Customers.
In the Application namespace field, enter sap.fe.cap.
In the Description field, enter Display Customers.
From the Minimum SAPUI5 Version dropdown, choose 1.108.20.
Under Add FLP configuration select Yes.
On the Deployment Configuration page, keep the default settings.
On the Fiori Launchpad Configuration page, perform the following steps:
In the Semantic Object field, enter Customer.
In the Action field, enter display.
In the Title field, enter Display Passenger.
You can see that the Application Information page appears. It displays the details of the Display Customers app with useful links.
Open the preview of the application in the browser.
On the Application Information page, select Preview Application.
From the projects dropdown, choose watch-customer cds watch.
Navigate through the Display Customers app
Select Go. The page displays the customer details.
Select the required customer to view additional information.
You have created a Display Customers app utilizing the same CAP service. You have used SAP Fiori tools - Application Generator.