cancel
Showing results for 
Search instead for 
Did you mean: 

sap.ushell.Container.getServices undefined while calling CrossApplicationNavigation

I am facing issue in calling sap.ushell.Container.getServices("CrossApplicationNavigation") from a SAPUI5 application deployed in BTP Cloud Foundry and accessed through SAP BTP Launchpad service.

I understand, as it is being called from Fiori launchpad, all modules within sap.ushell library should work.

Error coming in Console is below

Current sap.ushell content is -

Expected sap.ushell content is -

Index.html -

<code><html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'>
<meta http-equiv="X-Xss-Protection" content="1; mode=block">
<meta http-equiv="X-Content-Type-Options" content="nosniff">
    
<title>OpenText Vendor Invoice Management</title>
<script src="https://ui5.sap.com/1.84.18/resources/sap-ui-core.js" 
    id="sap-ui-bootstrap" 
   data-sap-ui-frameOptions="allow"
    data-sap-ui-resourceroots='{"otbcwui": "./otbcwui/"}'
    data-sap-ui-xx-bindingSyntax="complex"
            data-sap-ui-compatVersion="edge"
            data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
            data-sap-ui-async="true"
            data-sap-ui-preload="async"         
    data-sap-ui-libs="sap.m, sap.ushell, sap.f, sap.ui.commons, sap.suite.ui.commons, sap.f,  sap.ui.export"
    data-sap-ui-theme="sap_fiori_3">
    
</script>

<script>
    sap.ui.getCore().attachInitEvent(function() {
        jQuery.sap.registerModulePath("ot.approve.requests03", ".");
        var oComp = sap.ui.getCore().createComponent({
            name: "ot.approve.requests03",
            id: "OtBcComp",
            height: "100%"
        });
        var oComponentContainer = new sap.ui.core.ComponentContainer({
            component: oComp
        });
        oComponentContainer.placeAt("content");
    });
</script>

</head>
<body class="sapUiBody" role="application">
    <div id="content"></div>
</body>
</html>

Manifest.json - dependency also declared

    "sap.ui5": {
        "dependencies": {
            "minUI5Version": "1.52.0",
            "libs": {
                "sap.ui.core": {},
                "sap.m": {},
                "sap.ui.layout": {},
                "sap.ushell": {},
                "sap.collaboration": {},
                "sap.ui.comp": {},
                "sap.uxap": {}
            }
        },
         "services": {
			"ShellUIService": {
				"factoryName": "sap.ushell.ui5service.ShellUIService"
			}
		},
   },
"sap.platform.cf": {
	   "ui5VersionNumber": "1.84.18"
    }
}<br>

Accepted Solutions (1)

Accepted Solutions (1)

WouterLemaire
Active Contributor
0 Kudos

this should work fine in the Launchpad service of BTP. We have apps running that use this without any problem.

How is your tile configured? It should not point to the index.html. You have to use the HTML5 content provider for adding the tile.

0 Kudos

Hi Wouter,

Thanks for your response. Yes, the tile is pointing to index.html.

This Fiori app is having 2 modules. A UI modules which has multiple views and other utility js files. And a standalone approuter which has routers configured in its xs-app.json for various components of UI Module. A destination is maintained in BTP cockpit for approuter module.

In BTP launchpad service I have tiles configured pointing to index.html of UI module via approuter destination.

Is usage if index.html in tile configuration responsible for not showing all sap.ushell modules ? If yes, what is the workaround I can use to fix this. Changing the whole architecture of application usage may not be possible at this stage for me.

Regards,

Anubha

krishnan-jr
Explorer
0 Kudos

Hi c3d1947136cd4c748a7aa794001af496 ,

What if we want to access the ushell of Launchpad if the App UI Technology is URL.

In my case i am trying to access the shellbar of the launchpad from a ui5 application deployed on CF bundled inside an approuter. so i am proving the url to my application in here there are multiple ui5 apps inside the approuter.

Thank you.

0 Kudos

Hi anubhpan , c3d1947136cd4c748a7aa794001af496 sathriyan.in
Did you guys find any work-around for the same?
I am also facing similar issue.screeshotissue.png
Your suggestions would be of great help.

Regards,

Aditya
8971104488
adi.jais13@gmail.com

Answers (1)

Answers (1)

0 Kudos

Hi anubhpan,

I think you are running application directly from SAP BTP HTML5 Application list, it does not contain sap.ushell.Container.

Create Launchpad service, Catalog and Group then assign the application then try. it will work.

Thank you

0 Kudos

Hi Sathriyan,

Thanks for response. I am using tile in BTP Launchpad service which is pointing to UI component index.html file.

Regards,

Anubha