cancel
Showing results for 
Search instead for 
Did you mean: 

Loading a SAPUI5 app with specific UI5 version in SAP web ide

Former Member
0 Kudos

Hi Experts,

Is there a way I can load an app with a specific UI5 library version. I am developing sapui5 apps that are deployed onto HCP Portal site. I want to load an SAPUI5 app with a specific version inside the portal.

Any help is appreciated.

Thanks in Advance.

Deepak

Accepted Solutions (0)

Answers (8)

Answers (8)

junwu
Active Contributor
Former Member
0 Kudos

Hi Jun,

I want to declare this in the manifest file rather than the index.html so that this particular SAPUI5 app runs with this specific version everytime.

Thanks,

Deepak

junwu
Active Contributor
0 Kudos

i really doubt if it is possible for your scenario.

jamie_cawley
Advisor
Advisor

Right click on the project and choose project settings. Within the window you should see a SAPUI5 version option.

Regards,

Jamie

SAP - Technology RIG

Former Member
0 Kudos

Thanks Jamie,

I checked that out. But when I deploy the app inside the HCP Portal site, it runs with the SAPUI5 version mentioned for the site. I need to run a app at version "1.40.10" but the stable version of SAP HCP Portal site is "1.38.10". Is there a parameter that I can mention in the manifest file for loading a "1.40.10" when the user navigates to that particular Application.

Can I do that somehow?

Best Regards,

Deepak

Hi,

I agree that i am answering more than 3 years after this question was asked, i was looking to use a downgraded version of sapui5 due to an issue when deploying on the SAP Cloud platform and came across this blog that describes the process to alter the index.html file to load the desired version of sapui5 .

In the index.html file, mentioning the below will point to the most recent version supported by SAP cloud platform (which is good as it removes the overhead from the developers)

src="/resources/sap-ui-core.js"

However, if needed we can specify an older version explicitly :

Note the answer provided by jun.wu5 points to the version currently supported by SAP Cloud platform

src="https://sapui5.hana.ondemand.com/<Old version>/resources/sap-ui-core.js"

Hi,

We have run configurations available. Right click on the index. html or on project folder and then u will find the Run -> Run configurations, if u go inside that, u can select the default ui5 version in the 3rd tab on right hand side and click on save and run.(u need to select a html file on the left hand side and on the right hand side, u will find 3 tabs and on the 3rd tab advanced settings)

Or

other way is to change the manifest file UI5 version along with the run configurations(Please check it once after changing the manifest file ).

In manifest file, check for dependencies as shown below, u can mention the version here:

"sap.ui5": {
		"_version": "1.2.0",
		"rootView": {
			"viewName": "sap.test.XXXXXX.view.App",
			"type": "XML",
			"id": "app"
		},
		"dependencies": {
			"minUI5Version": "1.36.0",
			"libs": {
				"sap.ui.core": {
					"minVersion": "1.36.0"
				},
				"sap.m": {
					"minVersion": "1.36.0"
				},
				"sap.ushell": {
					"minVersion": "1.36.0"
				},
				"sap.collaboration": {
					"minVersion": "1.36",
					"lazy": true
				}
			}
		},

Thanks & Regards,
Mahesh

junwu
Active Contributor
0 Kudos
"minVersion" is information only, it won't force anything.

I believe he wants his ui5 to be loaded with specific version when it is getting called, I don't think it is possible.
0 Kudos

Thank you for your input Karthik, From the SAP webIDE's index file i can force a lower version of sapui5 library. But I think on the portal, the portal launchpad is running the Component.js file directly. So is there a way I can load the ui5 library from the component.js?

0 Kudos

Hi All,

I have an app which was built on 1.38.40 sapui5 version. I want it to be configured on the portal which is on the latest version 1.67. There are several apps on the portal which are find with the latest version and i want to keep the overall version of the portal as the latest version 1.67.

Its a lot of work to upgrade the old app from 1.38.40 to higher version as there is a lot of custom extensions which was built as per the 1.38.40 library and they have discrepancies on the higher version.
I would really appreciate if you can provide me the solution to force the loading of a lower version of sap ui5 library when the app is launched on the portal at a higher version.
Thanks to all you experts.
Adam

karthikarjun
Active Contributor
0 Kudos

Hi Ransome, I agree Jun view here. By the way below steps may help you to force your app to run on lower version.

-> As you said, your app is quite old. Hopefully it has not follow component approach, if yes below points may help you

Copy below src url -> go to index page-> replace with this url

src: https://sapui5.hana.ondemand.com/1.38.40/resources/sap-ui-core.js

Note: Your version is out of date, there is no maintenance from SAP at the moment. We recommend you to propose the upgrade!
Running apps on lower version is an individual/org risk.

Regards,

Karthik Arjun

0 Kudos

Sorry I have missed the part where you explained that it shall be included into a HCP portal. Same like with Fiori, your application is bound to the version the including app is using.

If you need newer components, you could try and download the bits from a newer UI5 version, rename the parts like sap.m.ControlName to sap.140.ControlName. Define this copied and modified version in your resourceroots definition.

It is far away from an ideal solution. But if your cannot influence the loaded UI5 version often the only option. But be aware that controls often depend on other UI5 standard controls and you might run into unexpected side effects. Example could be that a new control is depending of a newly added internal API belonging to a old API.

0 Kudos

If you are deploying as a HTML5 App, use the neo-app.json to define the version:

"routes": [
    {
        "path": "/resources",
        "target": {
            "type": "service",
            "name": "sapui5",
            "version": "1.40.12",
            "entryPath": "/resources"
        },
        "description": "SAPUI5"
    }
],

In the index.html you can now use it like:

<script id="sap-ui-bootstrap" src="/resources/sap-ui-core.js"></script>
Former Member
0 Kudos

Thanks Ulrich,

I tried the same approach, it works fine when I run the app standalone. But when add the application to HCP Portal site, my application version is always defaulted to SAPUI5 version of the site which is 1.38.10. I am using dual combination charts (info_dual_combination) which are not included in that particular version of the library but are present in version 1.40.10.

I have attached the neoApp.json, manifest.json and .user.project.json file for my SAPUI5 Application in the below link as I couldn't upload json files here (Please let me know if you cannot access the files). Kindly let me know if you see anything missing.

Files

Thanks in Advance.

Any help is appreciated.