cancel
Showing results for 
Search instead for 
Did you mean: 

Redefine method in DataManger.js file

0 Kudos

Hi Experts,

How can I redefine a method of DataManager.js / Formatters.js file in SAP FIORI wave 2 applications?

Regards,

Puneet Jain

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Puneet,

I hope you are referring to Fiori My Leave Request Application.

These files are not generic across all Fiori applications.

How to override any function in DataManager.js?
You can do this oninit() of your extended controller.

example, you can define like:

hcm.emp.myleaverequests.utils.DataManager.somefunctionName = function(){

          //your function logic..

}

Please make sure that overrides will not have adverse effects on the application.

Best Regards,

Sunil B N

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Puneet,

There's also another way to override functions in DataManager.js.

Basically what I did was

  1. Copy the standard DataManager.js file to my extended application.
  2. Updated the jQuery declare statement in my copied DataManager.js file to refer to my extended app.
  3. Referred to my copied DataManager.js file and made changes as I needed.

You can find more detail in my blog post here

Hope this gives you another alternative to overriding functions in your DataManager.js file.

Regards,

Ben