Create an Empty SAPUI5 Project
- How to create a new SAPUI5 project that is connected to a data source
- How to run the project in the SAP Business Application Studio
- Tutorials: Create a Dev Space for SAP Fiori Apps
- Step 1
- Step 2
Make sure you are connected to a Cloud Foundry endpoint to which you will deploy the SAPUI5 application later.
First, you need to log on to Cloud Foundry. To do that, start the command palette from the menu View > Find Command, search for cf:login, and select the command CF:Login to Cloud Foundry.
Enter the Cloud Foundry endpoint you want to use. Enter your email and your password to proceed.
Next, you need to select the Cloud Foundry Organization and space you want use. You will see messages in the lower right hand corner indicating that you are connected to the endpoint once these prompts have been answered.
- Step 3
SAP Fiori tools includes an Application Generator that provides a wizard-style approach for creating applications.
First, you need to select the workspace for your project by choosing from menu File > Open Workspace and select projects folder.
To launch the Application Generator, start the command palette from the menu item View > Find Command, search for
fiori generator, and select the command Fiori: Open Application Generator
Specify the application type SAPUI5 freestyle and the floor plan SAPUI5 Application and go to the Next screen.
Now you have the option to connect your SAPUI5 application to a data source. Select Connect to an OData Service and enter the following service URL
https://services.odata.org/V2/Northwind/Northwind.svc/before you click Next.
Keep the default view name (i.e.
View1) and click Next .
Name the module
sapui5, use the application title
Tutorial, and define the namespace as
sap.btp. Choose the Yes option for Add deployment configuration. Keep the default values for the other parameters and select Next to go to the next step.
Choose Cloud Foundry as the target runtime and type in the name of the destination you created before:
Northwind. Press Finish to create the new project.
After the project is generated, the Application Information page will be shown for the project you created. The Application Information page gives you a quick overview of the most essential information for your project. You can find more information on the Application Information page here: https://help.sap.com/viewer/17d50220bcd848aa854c9c182d65b699/Latest/en-US/c3e0989caf6743a88a52df603f62a52a.html.
You can keep the Application Information page open as it will be needed later. In case you close it, you can open the Command Palette from menu View > Find Commands, type
Application Info, and select Fiori: Open Application Info.
- Step 4
To run the pre-generated run configuration, switch to the Run Configuration panel on the left-hand bar. Click on the ▶ icon of the first run configuration to add start the SAPUI5 app.
Now the SAP Business Application Studio will start the app. When the toast message appears in the lower right hand corner, click Open to make the local port accessible for debugging.
A new tab should open that displays the following page.
- Step 5
Now you should see your (blank) SAPUI application. Right-click on the web page, and choose Inspect
The inspector will appear. Click on the Network tab to view the network traffic for the application.
To view all the network traffic, reload the page. The network traffic will appear as the page is loading.
Scroll down until you find the $metadata item - or use the filter box to search for it.
NOTE Typing in
metadatato the filter box in the upper right corner will make it easy to find the correct row.
Click on $metadata, then click the Preview tab.
This will show you the data coming from the server to the browser. If you see this, the OData request is working. You are ready to move on to the next step of the tutorial.
Expand the nodes
<edmx: DataServices>and the
first <Schema> nodein the Chrome Network trace.
Which entity types do you find in the network trace after expanding the mentioned nodes?