cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble deploying apps to the Fiori Launchpad

rhightower13
Participant
0 Kudos

I'm deploying apps that I've created with the template wizard in the WebIDE to the Fiori launchpad in a HCP trial account.  Some of the applications work and some do not (the application opens but it doesn't retrieve data).  They both use the same destination based on the sample Northwind service at oData.org.  I've discovered the problem is the URL used to retrieve the service metadata.

This is the URL that does not work (returns a 404 error).

https://flpportal-sXXXXXXXXXXrial.dispatcher.hanatrial.ondemand.com/destinations/northwind/V3/Northw...

This is the URL that does work.

https://flpportal-sXXXXXXXXXXtrial.dispatcher.hanatrial.ondemand.com/sap/fiori/northwindorders001/destinations/northwind/V3/Northwind/Northwind.svc/$metadata

Both applications run from the HCP Cockpit successfuly.

I was as consistent as is possible when deploying the application to HCP and registering it with the Fiori launchpad though there doesn't seem to be any step that would cause this difference.

What could cause this difference and is there anything I can do to edit the configuration for the app that doesn't work to fix the URL?

Thanks,

Ross

Accepted Solutions (1)

Accepted Solutions (1)

rhightower13
Participant
0 Kudos

Turns out when you use the single page template wizard the code in the init function in the Component.js that references the service will not work when you deploy to the launchpad.  The generated code is:

        // always use absolute paths relative to our own component

        // (relative paths will fail if running in the Fiori Launchpad)

        var sRootPath = jQuery.sap.getModulePath("Employee_Orders_002");

        // The service URL for the oData model

        var oServiceConfig = this.getMetadata().getConfig().serviceConfig;

        var sServiceUrl = oServiceConfig.serviceUrl;

But it should be:

        // always use absolute paths relative to our own component

        // (relative paths will fail if running in the Fiori Launchpad)

        var sRootPath = jQuery.sap.getModulePath("Employee_Orders_002");

        // The service URL for the oData model

        var oServiceConfig = this.getMetadata().getConfig().serviceConfig;

        var sServiceUrl = sRootPath + oServiceConfig.serviceUrl;

Ross

Answers (1)

Answers (1)

0 Kudos

Hi Ross,

Could you please explain  what is  "Employee_Orders_002" in

var sRootPath = jQuery.sap.getModulePath("Employee_Orders_002");

Thanks in advance.

Regards,

Gaurav.

rhightower13
Participant
0 Kudos

It's the name of the project so sRootPath represents the root folder of the project.

Ross

0 Kudos

Thank you