Dear All,
My colleague had developed an extension project to standard fiori app "Approve Purchase Contract" using local trial Web IDE. I imported his project using the licensed Web IDE tool from SAP gateway server to make some more changes. The folder structure in Web IDE and My index.html looks like below. Whenever I run using index.html or Component.js I'm getting below error. I went through several threads talking about similar issue but I couldn't make it work. Please advise.
Uncaught Error: failed to load 'ui/s2p/mm/purcontract/approve/MM_PC_APVExtension/Component.js' from ./Component.js: Error: failed to load 'ui/s2p/mm/purcontract/approve/Component.js' from /sap/bc/ui5_ui5/sap/MM_PC_APV/Component.js: 404 - Not Found.
Component.js
jQuery.sap.declare("ui.s2p.mm.purcontract.approve.MM_PC_APVExtension.Component");
// use the load function for getting the optimized preload file if present
sap.ui.component.load({
name: "ui.s2p.mm.purcontract.approve",
// Use the below URL to run the extended application when SAP-delivered application located in a local cloud environment:
//url: jQuery.sap.getModulePath("ui.s2p.mm.purcontract.approve.MM_PC_APVExtension") + "/../MM_PC_APV"
// Use the below url to run the extended application when SAP-delivered application located in a cloud environment:
//url: jQuery.sap.getModulePath("ui.s2p.mm.purcontract.approve.MM_PC_APVExtension") + "/../file/700369-OrionContent/MM_PC_APV"
url: "/sap/bc/ui5_ui5/sap/MM_PC_APV"
// we use a URL relative to our own component
// extension application is deployed with customer namespace
});
this.ui.s2p.mm.purcontract.approve.Component.extend("ui.s2p.mm.purcontract.approve.MM_PC_APVExtension.Component", {
metadata: {
includes: ["css/styles.css"],
version: "1.0",
config: {},
customizing: {
"sap.ui.viewReplacements": {
"ui.s2p.mm.purcontract.approve.view.S3": {
viewName: "ui.s2p.mm.purcontract.approve.MM_PC_APVExtension.view.S3Custom",
type: "XML"
},
"ui.s2p.mm.purcontract.approve.view.ItemDetails": {
viewName: "ui.s2p.mm.purcontract.approve.MM_PC_APVExtension.view.ItemDetailsCustom",
type: "XML"
},
"ui.s2p.mm.purcontract.approve.view.AccountAssignmentTable": {
viewName: "ui.s2p.mm.purcontract.approve.MM_PC_APVExtension.view.AccountAssignmentTableCustom",
type: "XML"
}
},
"sap.ui.controllerExtensions": {
"ui.s2p.mm.purcontract.approve.view.S3": {
controllerName: "ui.s2p.mm.purcontract.approve.MM_PC_APVExtension.view.S3Custom"
},
"ui.s2p.mm.purcontract.approve.view.ItemDetails": {
controllerName: "ui.s2p.mm.purcontract.approve.MM_PC_APVExtension.view.ItemDetailsCustom"
}
}
}
}
});