cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori deployment on ABAP server.

07-17-2024 8:48 AM
JakubG_2024 Explorer
1667 views 3 comments Go to solution
SAP Managed Tags
Labels
ABAPdeploymentDeploymentsFiori SAPUI5SAPUI5
Subscribe

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

sap/ui/core/Theming and sap/base/i18n/Localization

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!

View Entire Topic
JakubG_2024
Explorer
0 Likes

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  :(. 

JakubG_2024_1-1721294068818.png

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... 

JakubG_2024_0-1721307044298.png

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!

Noel_Hendrikx
Active Contributor
Good job!