Skip to Content
0
May 03, 2017 at 06:02 AM

Neo-app.json path in local webide for Re-Usable component of Std Fiori App

922 Views Last edit May 03, 2017 at 08:19 AM 2 rev

Hi All,

I have imported standard app "Manage Material Coverage" in my local webide. As can be seen from the fiori library(screenshot 1) , it consists of 2 components. 1) PP_MATSHORT_DT

2) Reusable Component PP_MRP_REUSE

So I imported both the applications in my local webide and my webide workspace now looks like follows(screenshot 2)

Now when I run the app PP_MATSHORT_DT in the fiori sandbox on local webide , quite obviously it gives error "Could not load app. Try again later" , because I need to explicitly set up the link to the re-usable component PP_MRP_REUSE inside my main app PP_MATSHORT_DT. In the error console (screenshot 3) , loading of library.js inside the reuse component is shown to be failed

As per my understanding, this broken path of reuse component needs to be rectified in neo-app.json of the main app . However I tried add a new path in my neo-app.json but not sure what exactly to add. The library.js in reuse component exists in the following path(screenshot 4)

Any hints will be appreciated..

PS: Just wanted to add one more observation (not sure if its relevant to the above). In the component.js file of the main app PP_MATSHORT_DT I could see the following code

/*
 * Copyright (C) 2009-2014 SAP SE or an SAP affiliate company. All rights reserved
 */
jQuery.sap.declare("i2d.pp.materialshortge.details.Component");
jQuery.sap.require("sap.ca.scfld.md.ComponentBase");
(function() {
var i = window.location.pathname.indexOf("/ui5_ui5/");
if (i !== -1) {
var p = window.location.pathname.slice(0, i + 8);
p += "/sap/pp_mrp_reuse/i2d/pp/mrpcockpit/reuse";
jQuery.sap.registerModulePath("i2d.pp.mrpcockpit.reuse", p);
}
}());

Now in the above code there is a condition which checks for the string "/ui5_ui5/" in the URL and if it finds then only it calls registerModulePath for reusable component. Now since we are running our app in fiori sandbox in local webide , the URL is not going to have /ui5_ui5 string in the URL and the if condition is bound to fail.

I am not sure if the neo-app.json will take care of the above

Regards

Attachments

reuse-1.png (13.8 kB)
reuse-2.png (6.3 kB)
reuse-3.png (69.2 kB)
reuse-4.png (12.3 kB)