Hi there,
I'm trying to extend the HCM_EMP_LOOKUP app (Employee Lookup) but it fails to load.
My extended component ("Component.js" in HCM_EMP_LOOKUPExtension) has this code:
jQuery.sap.declare("hcm.employee.lookup.HCM_EMP_LOOKUPExtension.Component"); // use the load function for getting the optimized preload file if present sap.ui.component.load({ name: "hcm.employee.lookup", url: "/sap/bc/ui5_ui5/sap/HCM_EMP_LOOKUP" }); this.hcm.employee.lookup.Component.extend("hcm.employee.lookup.HCM_EMP_LOOKUPExtension.Component", { metadata: { version: "1.0", config: {}, includes: ["css/hcm_emp_lookupextension.css"], customizing: {} } });
However, I get a File not Found error when loading the extended app:
http://<server:port>/sap/bc/ui5_ui5/ui2/ushell/resources/sap/hcm/lib/common/library.js
The SAP component ("Component.js" in HCM_EMP_LOOKUP) has this code:
(function() { var p = jQuery.sap.getModulePath("hcm.employee.lookup"); if (p.indexOf("/hcm_emp_lookup") !== -1) { if (p.lastIndexOf("/") !== p.length - 1) { p += "/"; } jQuery.sap.registerModulePath("sap.hcm.lib.common", p + "../hcm_common/sap/hcm/lib/common/"); } }());
I don't get any errors when launching the standard HCM_EMP_LOOKUP app, only when launching my extended app. Could the code in the standard app make my extended app look for the file in the wrong location? And if so, how can I fix that?
Any help appreciated,
/Thomas