Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
327 views
in Technique[技术] by (71.8m points)

abap - Create new or add to standard composite enhancement point: pros and cons?

I want to implement an enhancement point in the include: LMRMPF1R

It seems that there is already one existing enhancement /NFM/MM_SAPLMRMP:

Click here for image

After clicking on "create enhancement implementation" following screen is shown, where I can see the /NFM/MM_SAPLMRMP again, which is part of the composite enhancement implementation /SAPMP/EC.

Click here for image

When I create a new one I can choose if I want to add the implementation to an existing composite enhancement implementation. As it is in the same place, it is recommended to add it to the same composite enhancement implementation?

Click here for image

If I do so, I am mentioned as the user who changed the "standard" composite enhancement implementation /SAPMP/EC. Originally SAP is mentioned there. After I add it, I am.

This SAP documentation just says "Select a composite enhancement implementation, or create a new one" but does not tell me the pros and cons.

While browsing the web, I read a lot of "HowTos" and everyone just leaves the field empty, so they do not add it to a composite enhancement implementation

As I want to code along BestPractices, your input is highly appreciated.

Thanks in advance

question from:https://stackoverflow.com/questions/65845541/create-new-or-add-to-standard-composite-enhancement-point-pros-and-cons

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...