Way to enhance the Function module to have additional logic. Functional enhancement can also be used for adding additional optional parameters in the FM Signature.
Enhance the Function Module logic
Function module logic enhancement is achieved via Source code enhancements. There are couple of implicit enhancement points available in every FM. These enhancement options can be implemented to enhance the functionality of the FM
To implement the enhancement point in the FM:
1 Display the FM in SE37
2 Make sure you are in the Source Code of the FM, Tab Source Code
3 From menu Select Function Module > Enhance Source Code
4 Select menu Edit > Enhancement Operations > Show implicit Enhancement
5 Once you see the implicit points, you can implement the implicit enhancement as described in Implementing Implicit Enhancement
Enhance the Function module Signature
Many times the enhancement in the source code is not quite enough. You may need to add the new parameters in the FM signature, either Importing or exporting.
Enhancement to FM Signature allows you to add new parameter to the FM signature. You can use this new parameter to make decision in your source code enhancements.
You might think – If you add the new parameter as importing parameter and what if callers wont pass that parameter, which is true in most of the cases. As you are extending the standard FMs and those FMs would be called somewhere in the system. Ignoring that parameter would lead to runtime time errors in the std FM calls. To avoid this Enhancement Framework, would create the new parameters as Optional. You can’t make them as mandatory.
To be able to create the Enhancement to the FM signature,
1 Display FM in SE37
2 Go to the tab where you want to add the new parameter
3 Select Menu Function Module > Enhance Interface
4 Provide the Implementation Name
You can’t select the same implementation which you have used for the source code enhancements. However, you can collect all the FM Interface enhancements within same Function Group in one Function Module.
Once you Enter the name of the Implementation and if it is successfully created, you would notice a new column with Enhancement Implementation in the signature table controls.
5 Create the new Parameter. When you create the new parameter, it is by default set to Optional which is not changeable.
6 Finally you can use this new parameter in the source code enhancements.
Next Article
Enhancement Framework – Table Enhancement Category
Table of Content – Enhancement Framework
- Enhancement Framework – Introduction
- Enhancement Framework – Explicit Enhancement-POINT Implementation
- Enhancement Framework – Debugging Implementation
- Enhancement Framework – Explicit Enhancement-SECTION Implementation
- Enhancement Framework – Implicit Enhancement Options
- Enhancement Framework – Class Enhancement
- Enhancement Framework – Class Enhancement – How designed
- Enhancement Framework – Function Module Enhancement
- Enhancement Framework – Table Enhancement Category
- Enhancement Framework – Table Enhancement – Append Structure
- Enhancement Framework – Append Search Help
- Enhancement Framework – Extension Index
- Enhancement Framework – Fixed Value Append
Thank you.
Hi Naimesh
Could you please explain in deeper about this topic data dictionary and bdc session method as well as background job scheduling and if have a time bapi. Or otherwise send me to any good pdf’s for me. I am new to sap.
Please help me.
email : phani.pbtech99@gmail.com.
sorry ask this kind of issues. don’t feel any thing bad.
Your blog is very good.
Hello Naimesh,
great “enhancement series” 🙂 I wonder about this FM interface. It can by very usefull, but..
I guess there is no way to enhance FM calls by adding these new parameters?