Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
lusine_stepanyan
Explorer

Recently I was extending the Fiori People Profile app and came across several issues which I haven't had before with other apps, so I have  decided to share my experience with you...maybe it will be useful for some of you :smile:

Issue 1: After creating an extension project in Web IDE and running the extended app, I was getting a blank page with the following error.

Uncaught Error: failed to load 'sap/hcm/lib/common/library.js' from resources/sap/hcm/lib/common/library.js: 404 - Not Found

Solution : Putting the following code in the Component.js file of the extended app solved the issue:


(function() {
jQuery.sap.registerModulePath("sap.hcm.lib.common", "/sap/bc/ui5_ui5/sap/hcm_common/sap/hcm/lib/common/");
}());





Issue 2: When creating controller extensions with Extensibility Panel in WEB IDE, the controller name was  showing still the original controller name. Usually the name of the extended controller is automatically changed to the custom controller name.

Below is the example of the extended QualificationsExpandedControllerCustom.js...as you can see the name is still QualificationExpandedController.

Solution: The Controller name should be changed to the custom controller name :


Issue 3: After creating the extension for QualificationsExpandedController from Extensibility Panel in WEB IDE (replacing the controller with the copy of the original controller)and running the app without doing any changes, I could see that the qualification list was doubled up…

Solution: Commenting  the onInit() function  in the extension project and leaving only the buildUI:function()  solved the issue.

Issue 4: After deploying the app from WEB IDE to SAPUI5 ABAP repository, the app was not working from Fiori Launchpad. I was getting an error that the Component.js was not found.  The problem was that the URL in Component.js was the following:

url: jQuery.sap.getModulePath("hcm.people.profile.hcmpeopleprofileExtension") + "/../../HCM_PEP_PROFILE"


(I don't know why it was changed to this...never had that with other apps...)


Solution : Changing the above mentioned url in Component.js to url: “/sap/bc/ui5_ui5/sap/HCM_PEP_PROFILE” solved the issue.


I hope this will be helpful :smile:

1 Comment