Skip to Content

How to load SAPUI5 App resources from Launch Pad (not HCP)

Aug 01, 2017 at 04:09 PM


avatar image


I have my app deployed in HANA server and in the relative launch pad,

The app loads images and local resources from my project folders perfectly fine , when the app is launched from a direct url or in a web ide.

When the same is launched from fiori launch pad , to access the resources a different relative path is needed, it can be constructed by"myAppName");

for example:

var sRootPath ="myCustomApp");

var initConfigPath = sRootPath + "/res/config.json";

and then access that file the way you prefer (also a simple Ajax GET)
as answered here:

But this approach does not work if the LaunchPad is served by an onPremise HANA server ( so not the Cloud version);
in this scenario URLs pointing to resources like CSS, contain some dynamic ID and look like:

I am able to access my local resources using an URL like that, but hardcoding the ~A806223978F756GNEBF537E84E553247~C part

Is there a way to retrieve this generated string?

or at least, wich is the right way (that works every time for sure) to access local resources of any kind in every enviroment?

It should be an easy task of every web application, but I cannot find someone that knows how to do it in SAPUI5.

Please Help!!!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers