You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Have a look at [this tutorial](appstudio-devspace-fiori-create) if you are unsure how to get here or how to create a dev space.
26
26
27
27
28
+
[DONE]
29
+
[ACCORDION-END]
30
+
[ACCORDION-BEGIN [Step : ](Create a UI5 destination)]
31
+
32
+
[Create a new destination](cp-cf-create-destination) of the name "ui5" that points to the URL `https://sapui5.hana.ondemand.com/`. This is where we'll pull the standard UI5 libs from later.
33
+
28
34
29
35
[DONE]
30
36
[ACCORDION-END]
@@ -47,59 +53,173 @@ Make sure you are connected to a Cloud Foundry endpoint to which you will deploy
47
53
48
54
[DONE]
49
55
[ACCORDION-END]
50
-
51
56
[ACCORDION-BEGIN [Step : ](Create a new project)]
52
-
1. Click on the link **New project From template** on the *Welcome* screen.
57
+
1. Click on the link **Start from template** on the *Welcome* screen.
53
58
54
59
!
55
60
56
-
2. Select **SAP Fiori Freestyle - Project Generator** as the template category you want to use and click **Next**.
61
+
2. Select **SAP Fiori freestyle SAPUI5 application** as the template category you want to use and click **Start**.
57
62
58
63
!
59
64
60
-
3. Specify the target environment ( **Cloud Foundry**) and the template (**SAPUI5 Application** ) and go to the **Next** screen.
65
+
3. Specify the application type **SAPUI5 freestyle** and the floor plan**SAPUI5 Application** and go to the **Next** screen.
61
66
62
-
!
67
+
!
63
68
64
-
4.Name the project **`tutorial`** and proceed by clicking**Next**.
69
+
4.Now you have the option to connect your SAPUI5 application to a data source. As we won't need a data source in this tutorial, select **None** and click**Next**.
65
70
66
-
!
71
+
!
67
72
68
-
4.Choose **Standalone Approuter** for the runtime and click **Next**.
73
+
4.Keep the default view name and click **Next**.
69
74
70
-
!
75
+
!
71
76
72
-
4. Name of the module **`webapp`** and the namespace **`sap.cp`** and turn authentication off. Go to the **Next**screen.
77
+
4.Name of the module **`sapui5`**, use the application title **`Tutorial`**, define the namespace **`sap.btp`**, and **Add deployment configuration**. Keep the default values for the other parameters and select **Next**to go to the next step.
73
78
74
-
!
79
+
!
75
80
76
-
4.Keep the default view name and go for no data service on this screen. Click**Next** to create the new project.
81
+
4. Choose **Cloud Foundry** as the target runtime and type in any value for the destination as it is a mandatory field. Press**Finish** to create the new project.
77
82
78
-
!
83
+
!
79
84
80
85
81
-
4. Once the project has been created, the Business Application Studio will prompt you to open the project in a new workspace. Click **Open in New Workspace**.
86
+
4. Once you see the success message, click **Files & Open**to find the new project.
82
87
83
88
84
89
!
85
90
86
91
92
+
4. Select **user/projects/sapui5** and confirm with **Open**.
87
93
88
94
89
-
[DONE]
90
-
[ACCORDION-END]
91
-
[ACCORDION-BEGIN [Step : ](Redirect incoming traffic to the SAPUI5 app)]
92
-
95
+
!
93
96
94
-
The generated code comes ready-to-deploy. By default, the web app will be available at `https://<approuter-url>/<app/id>` and the application router will not redirect traffic that hits the root URL. In this step, you will change this.
95
97
96
-
1.**Open** the file `webapp/webapp/manifest.json` and find the property `sap.app>id`. The value of this property should be `sap.cp.webapp` but can vary depending on the names you choose in the previous step.
97
98
98
-
!
99
-
100
-
2.**Open** the file `tutorial-approuter/xs-app.json` and add a new property to define the redirect.
99
+
[DONE]
100
+
[ACCORDION-END]
101
+
[ACCORDION-BEGIN [Step : ](Configure the managed application router)]
102
+
103
+
The project is already deployable as it. But there is one thing missing in order make it accessible from your browser: [The managed application router](https://blogs.sap.com/2020/10/02/serverless-sap-fiori-apps-in-sap-cloud-platform/#serverless)
104
+
105
+
1. Add a service name in `webapp/manifest.json`.
106
+
107
+
```JSON[15-17]
108
+
{
109
+
"_version": "1.29.0",
110
+
"sap.app": {
111
+
"id": "sap.btp.sapui5",
112
+
"type": "application",
113
+
"i18n": "i18n/i18n.properties",
114
+
"applicationVersion": {
115
+
"version": "1.0.0"
116
+
},
117
+
"title": "",
118
+
"description": "",
119
+
"resources": "resources.json",
120
+
"ach": "ach"
121
+
},
122
+
"sap.cloud": {
123
+
"service": "basic.service"
124
+
},
125
+
"sap.ui": {
126
+
...
127
+
```
128
+
129
+
1. Create a configuration file for the `UAA` service with `xs-security.json`.
130
+
131
+
```JSON
132
+
{
133
+
"xsappname": "tutorial",
134
+
"tenant-mode": "dedicated"
135
+
}
136
+
```
137
+
138
+
1. Add the needed services instance to connect the manager application router with your SAPUI5. To do this, add the following module and resources to `mta.yaml`
@@ -112,11 +232,9 @@ Build (aka package) the project to a `mtar` archive to deploy it to Cloud Foundr
112
232
113
233
!
114
234
115
-
2. Check the console output to make sure the process started.
116
-
117
-
!
235
+
3. Once the build is complete, you can see a message in the log. You can now find the generated `mtar` archive in the project tree under `mta_archieves`.
118
236
119
-
3. Once the build is complete, you can see a message in the log. You can find the generated `mtar` archive in the project tree now.
237
+
!
120
238
121
239
122
240
@@ -136,16 +254,16 @@ Now that you created a `mtar` archive, you are all set to deploy the application
136
254
137
255
!
138
256
139
-
> You can also see the URL of the deployed app when running `cf apps` in a new terminal session.
257
+
> You can also see the URL of the deployed app when running `cf html5-list -d -u` in a new terminal session.
140
258
141
-
> !
259
+
> !
142
260
143
261
[DONE]
144
262
[ACCORDION-END]
145
263
146
264
[ACCORDION-BEGIN [Step : ](Test to the application)]
147
265
148
-
1.**Open** the started application in your browser. You might need to log in with your SAP ID (the same credentials you use for the SAP Cloud Platform Cockpit).
266
+
1. **Open** the started application in your browser. You might need to log in with your SAP ID (the same credentials you use for the SAP BTP Cockpit).
149
267
150
268
151
269
2. See that the sample application consists of a header and an empty page. So you should see something like this:
0 commit comments