Hi all,
we have a requirement to extend the good ol' "Approve Purchase Orders" fiori app with an ECC (Business Suite) backend and a hub server based on FES for S4H 2021.
Within there lives a formatter called "accountingFormatter". My goal would be to prefix the normal outcome, say "Cost Center 123" with the internal type so say the result would be "K - Cost Center 123".
I followed this guide. My own /util/Conversions.js file looks like this
jQuery.sap.declare("ui.s2p.mm.purchorder.approve.MM_PO_APVExtension.util.Conversions");<br>jQuery.sap.require("ui.s2p.mm.purchorder.approve.util.Conversions");<br>// now actually redefining / overriding the standard formatter<br>ui.s2p.mm.purchorder.approve.util.Conversions.accountingFormatter = function(oHeaderInfo) {<br> // exit when not yet ready<br> if (!oHeaderInfo) {return;};<br> // Debug<br> return 'This is from the new custom formatter, but how to call the original one?';<br>}
However... now that I seemed to have bulldozered over the original implementation by jQuery.sap.declare/require I fail to call the original implementation.
Ideally I would like to have some "call super / parent" within my implementation and then only prefix the result from standard with my own calculation.
Currently, everything I tried resulted in calling my own implementation so I currently ended with basically duplicating all the code from the standard formatter and adjust to my own likings. However I would rather prefer just a "call super".
Is this possible? If so, was my general approach the way this should be done or would I need to do something completely different?
Many thanks and kind regards
Jens
Request clarification before answering.
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.