Hello all!
I have successfully deployed applications to abap server using fiori tools. Unfortunately I have some small problems, but I can't find a solution.
After deployment the application launches, but I get an error in the console that “getBindingContext” is null which is strange to me because when I launch the application locally everything works without a problem.
The second issue is the application has a problem loading
Could this be because the SAPUI5 version on the ABAP server is old, 1.108.22 to be exact?
The third issue is that the metadata isn't loading. I don't know why because everything is working perfectly fine on local.
The partly solution for the second issue was disabling those two liblaries. When I run this app locally evertyhing is working fine.
I'm using the newest version of https://hub.docker.com/r/sapse/abap-cloud-developer-trial.
Cheers!
Request clarification before answering.
Hello Noel!
I have solved 1st and 2nd issue with changing the UI5 version in fiori tools for version what I have on the server and changing script in index.html from
<script
id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
></script>
to
<script
id="sap-ui-bootstrap"
type="text/javascript"
src="https://ui5.sap.com/resources/sap-ui-core.js">
</script>
with hat change all resources are loading perfectly fine!
The third issue is still unresolved
the $metadata?sap-client=001&sap-language=PL is loagind fine with url: http://192.168.1.124:50000/sap/opu/odata/SAP/SERVICE_SRV/$metadata?sap-client=001&sap-language=PL
but the $metadata is not loading because it have wrong request url http://192.168.1.124:50000/SERVICE_SRV/$metadata and I'm getting 404 Not found error.
The correct url is http://192.168.1.124:50000/sap/opu/odata/SAP/SERVICE_SRV/$metadata. Don't know why is requesting http://192.168.1.124:50000/SERVICE_SRV/$metadata :(.
Everything is working perfectly fine when I run app locally.
UPDATE:
After adding to Component.ts to onInit function:
const oODataModel = new ODataModel(
'/sap/opu/odata/SAP/SERVICE_SRV/');
this.setModel(oODataModel, 'odata');
The metadata is loading but only at first time...
UPDATE2:
Finally! I found where was the problem. I had to change my formatter.ts functions from
const model = new ODataModel('SERVICE_SRV/');to
const model = new ODataModel('/sap/opu/odata/SAP/SERVICE_SRV/');
manifest.json:
"dataSources": {
"ticketService": {
"uri": "/sap/opu/odata/SAP/SERVICE_SRV/",
"type": "OData",
"settings": {
"annotations": [],
"localUri": "localService/SERVICE_SRV/metadata.xml",
"odataVersion": "2.0"
}
}
}
ui5.yaml:
specVersion: '3.1'
metadata:
name: com.service
type: application
server:
customMiddleware:
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
ui5:
path:
- /resources
- /test-resources
url: https://ui5.sap.com
backend:
- path: /SERVICE_SRV/
url: http://192.168.1.124:50000/sap/opu/odata/SAP
client: '001'
- path: /sap/opu/odata/SAP/SERVICE_SRV/
url: http://192.168.1.124:50000
client: '001'
Please leave this post for other user. Maybe it will help!
Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.