How to set SAPUI5 Application to use different UI5 version than Portal in Cloud Foundry (2924069)

 Symptom

It is required to run custom SAPUI5 applications on a specific SAPUI5 version which is different than the Portal's SAPUI5 version.


Cause

Cloud Portal Service on Cloud Foundry always runs the latest available SAPUI5 version. Certain applications may require a different SAPUI5 version to work properly.

Resolution

Setting the SAP UI5 version for specific applications is not possible. What is possible, is to change the SAPUI5 Version for the whole Cloud Portal Site. This can only be done if you developed your own Launchpad Module.

Follow the below steps to set a specific SAPUI5 version to be used on your custom launchpad module deployed on Cloud Foundry:

  1. Open the Launchpad project on your IDE of choice;
  2. Open the CommonDataModel.json file of the Fiori Launchpad Module;
    The CommonDataModel.json file that is stored in the portal-site folder. See the example from BAS below:


  3. Search for sap.cloud.portal inside the sites entry;
  4. Under config, add "ui5LibraryUrl": "https://sapui5.hana.ondemand.com/<sapui5_version>"
  5. Save the changes;
  6. Build the MTAR;
  7. Deploy the Launchpad Module to Cloud Foundry.

See example below:

"sites": [{
    ...,
    "payload": {
        ...,
        "sap.cloud.portal": {
            "config": {
                "theme.id": "sap_fiori_3",
                "theme.active": ["sap_fiori_3", "sap_belize_hcb", "sap_belize_hcw"],
                "ui5LibraryUrl": "https://sapui5.hana.ondemand.com/1.96.9"
            }
        }
    }
}]

WARNING: If an invalid SAPUI5 version is set, the site will fail to open.

The available SAPUI5 versions can be found on the SAPUI5 versions Maintenance Status page.



No comments:

Post a Comment