The implementation you have here is in the partner namespace /SAPMP/
. Unless you happen to be working for the organization which manages that namespace, you might run into various problems when trying to use it. For example when you install an update which changes that implementation.
So it's usually a better idea to create an own enhancement implementation in the Z
namespace.
Regarding the question of composite vs, stand-alone enhancements: I would recommend composite enhancement when you are implementing a larger feature which consists of many smaller features which are each implemented through an own enhancement. A composite enhancement allows you to logically group those enhancements together. That way a developer who looks at your implementation later will recognize that there is more than one enhancement which plays a role for this feature. It is also possible to enable and disable this feature by enabling and disabling your composite enhancement. With multiple regular enhancements, another developer or consultant can't be that sure that they really toggled all the enhancements they needed.
But when the feature you are implementing only requires a single enhancement, then there is usually no reason to assign it to a composite enhancement.
Also, just because two enhancement insert code at the same place does not necessarily mean that they are about the same feature. So that alone is no reason to logically group them into one composite enhancement.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…