Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Code Optimization

Former Member
0 Likes
409

Hi

I have a Function Group with a list of Function Modules. All these function modules use another Function Module 'ABCD' for their processing. Now Is it wise to have this Function Module 'ABCD' written as a subroutine inside an Include program and keep calling this Function Module 'ABCD' from all the places within the Function Modules of this Function Group.

Suggestions are welcome.

Murali.

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
378

Hi Murali,

I think there wont'be much difference. At the first call of any function module of your function group, the whole group including all functions modules in the group and all includes used will get loaded to memory. If Function Module 'ABCD' is in the same group, it is loaded too. If it is in another group, this other group will be loaded when called.

Everything will remain in memory until end of processing if not swapped due to memory restrictions.

Regards,

Clemens

2 REPLIES 2
Read only

Clemenss
Active Contributor
0 Likes
379

Hi Murali,

I think there wont'be much difference. At the first call of any function module of your function group, the whole group including all functions modules in the group and all includes used will get loaded to memory. If Function Module 'ABCD' is in the same group, it is loaded too. If it is in another group, this other group will be loaded when called.

Everything will remain in memory until end of processing if not swapped due to memory restrictions.

Regards,

Clemens

Read only

sridhar_k1
Active Contributor
0 Likes
378

If it's ok to delete fm ABCD after creating as a subroutine in the function group u already have, then it's code optimization.

If yout keep fm ABCD after creating subroutine, and use ABCD in other programs, you have same functionality duplicated and need to maintain both, then it's not code optimization

Regards

Sridhar