Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Nov 07, 2016 at 02:21 PM

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

    Regards,

    Jamie

    SAP - Technology RIG

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Nov 07, 2016 at 12:34 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 14, 2016 at 01:33 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • "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.
  • Nov 16, 2016 at 01:33 PM

    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>
    
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Nov 21, 2016 at 08:45 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded