Customize Save function for a module

I have to make some modifications in the save function of revenue line items module. What is the best way to achieve that on OnDemand Version.