‎2014 Mar 31 1:10 PM
Hi friends,
I have a requirement where I need to modify FM HR_MAINTAIN_MASTERDATA
at a certain place. And there is no enhance-point or section available which I can use.
This requirement can not be met thru implicit enhancement.
Can anyone help me how to create source code plug-in thru explicit enhancement
for my requirement.
I want to create enhancement-section (for a particular logic) in this FM. As when I try to
create enhancement in this, I get the following message " In this mode, you can create implementations only".
I have tried various things but not working. Seen links where it is shown in the Z program but it does not
work in real problem like mine i.e. standard sap code.
Those who have created such source code plug-in can answer this. Looking forward for your help.
Thanks,
Pradeep
‎2014 Mar 31 2:38 PM
Hi Pradeep,
I think you might be a bit confused about explicit/implicit enhancement options. An explicit enhancement option will be created only by SAP in standard SAP code for you to implement them. They are pretty much like a BADI. You can as you mentioned, create your own within your own custom code.
If there are no suitable enhancements, you can add your own code to SAP standard using a modification. When you try and edit the object, you will get a popup with details about the object. You can use those details to register the object in the SAP service marketplace. Once registered you will recieve a key which can be entered in the popup so you can add your own code to the FM using SAP's modfication tools.
Try and limit performing modications, as unlike enhancements, you are modifying standard SAP code. So you should have a valid business justification for doing this and ensure you have exhausted all options for enhancement .
A word of advice on enhancements. Implicit enhancement options are at the top and bottom of all subroutines (class methods, includes, etc). If there is a subroutine call just before you need the change to occur, you could add your enahncement into that subroutine instead knowing that the next logic to be called will be the code it impacts.
Hope that helps you out..
Cheers,
Katan
‎2014 Mar 31 3:02 PM
Hi Katan,
I know that Explicit enhancement are created by SAP but if I have to take an access key for
changing the source code, then why would I need (enhancement-point or enmancement-section)
I can directly code where I would like to.
Though I have read many blogs, and I believe we can insert our custom code thru explicit enhancement by defining and implementing them.
Thanks,
Pradeep
‎2014 Mar 31 3:14 PM
Hi Pradeep,
Unfortunately your assumption is not correct about adding code anywhere. SAP do not enable you to add custom code completely freely within their standard logic. It's also the same reason they have a modification framework, for those situations where you need to change SAP standard code.
Explicit enhancements can only be added to custom code. I.e customer programs, within other enhancements or even within a modification.
Thanks,
Katan
‎2014 Apr 01 6:06 PM
Hi Katan,
So what option I am left with. Request an access key for this particular object and make necessary changes.
Kindly correct me, if I am wrong.
Thanks,
Pradeep
‎2014 Apr 01 10:26 PM
If you want to modify that FM then you need to request an access key for this purpose.
‎2014 Apr 01 10:59 PM
Hi Pradeep,
Yes, but on the basis that you have covered off all the points in my original post and that you truly believe that you have no other options to make this change via an enhancement.
Thanks,
Katan