2015 Dec 30 7:48 AM
Hi,
I would like some ideas on how to modulerise code within an implicit enhancement?
I understand that implicit enhancements should be used wisely and only minimum code needs to be used, however i have come across many of our customers who have systems in which they have a lot of code written in an implicit enhancement. Of-course in most cases it starts as small piece of code but then over a period of time more and more code is added to the existing enhancement and it becomes un-maintainable.
I have been thinking of different options to modularise the code wihtin an implicit enhancement:
All of the above have some pros and cons. I am not sure if its a good idea to keep creating additional custom repository object for each implicit enhancement.
Any other suggestions? Which one do you thing is a good approach?
Thanks
2015 Dec 30 8:05 AM
Hi Sap Learner.
Point 1. You can only generate a finite number of subroutine pools per session. (38 I think although it's too long ago for me to remember exactly).
Point 3. You would not be able to use procedures in the include since an implicit enhancement (or an explicit one for that matter) occurs within a coding block such as a form or a function module. You cannot embed forms inside other forms.
So that just leaves point 2. You could also do the same thing with a function group but custom classes are a good idea which also provides you with encapsulation and a lower maintenance effort.
It's good to see someone thinking about good coding practices.
Good luck!
Regards
Rich
Hi,
I would like some ideas on how to modulerise code within an implicit enhancement?
I understand that implicit enhancements should be used wisely and only minimum code needs to be used, however i have come across many of our customers who have systems in which they have a lot of code written in an implicit enhancement. Of-course in most cases it starts as small piece of code but then over a period of time more and more code is added to the existing enhancement and it becomes un-maintainable.
I have been thinking of different options to modularise the code wihtin an implicit enhancement:
All of the above have some pros and cons. I am not sure if its a good idea to keep creating additional custom repository object for each implicit enhancement.
Any other suggestions? Which one do you thing is a good approach?
Thanks
2015 Dec 30 8:05 AM
Hi Sap Learner.
Point 1. You can only generate a finite number of subroutine pools per session. (38 I think although it's too long ago for me to remember exactly).
Point 3. You would not be able to use procedures in the include since an implicit enhancement (or an explicit one for that matter) occurs within a coding block such as a form or a function module. You cannot embed forms inside other forms.
So that just leaves point 2. You could also do the same thing with a function group but custom classes are a good idea which also provides you with encapsulation and a lower maintenance effort.
It's good to see someone thinking about good coding practices.
Good luck!
Regards
Rich
2015 Dec 30 8:32 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |