Skip to Content

Cannot extend HCM_EMP_LOOKUP

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 01, 2015 at 08:57 AM

    A bit more head scratching and search and found the solution here:

    Extending HCM People Profile Fiori app | SCN

    Add comment
    10|10000 characters needed characters exceeded