I have a situation where I have to go and revise about 20 Update Rules that all use the same 25 lines of ABAP code.
Looking to reduce future maintenance efforts, rather than cut and paste this code into all the updates rules, I want to be able to reuse the code so that it only needs to be maintained in once.
I looked at custom defined functions for the formula builder, but that means I need to change the current update rules to a formula and then specify some parameters in the formula. This doesn't save me any time or really give me the reusability I am looking for in this case.
So now I am leaning towards having one of our App Dev folks create an Include Program so the 25 lines of code can be copied into each update rule by simply placing an INCLUDE stmt in the update rule.
I also considered creating the code as a function module and calling it, but the Include program seems more straight forward, and someone else once cautioned me about some problems they had calling an FM in an update rule (didn't work right for them, but don't know any other details).
I like the Include Program approach, allowing me to just change the Include program and reactivate the rules when a change is needed.
Are there any other options to consider or issues to conerned about?