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

How effective is a Function Call Inside a Method

Former Member
0 Likes
539

Friends, please correct me if I am wrong here, its just out of curiosity that I am asking this question.

Methods are better than FM bcoz when you call the FM the instance of the function group plus its data is loaded into the memory and which does not happen when call a method of the class.

So my question is how effective is calling a FM inside a method, does OOPS loses some of its advantage when we do so?

3 REPLIES 3
Read only

Former Member
0 Likes
508

Hi

No the same logic is valid when an object is instanced all data of class are loaded, the main difference is the function-group can be instanced once

Max

Read only

ThomasZloch
Active Contributor
0 Likes
508

You'de be surprised how many methods in standard SAP classes are calling function modules inside, e.g. look at CL_SALV_TABLE. I've also seen web dynpro components (strictly OO) call BAPIs to obtain the data to be displayed.

Nothing wrong with encapsulating proven, "classical" technology in "modern" classes, in my opinion.

Thomas

Read only

0 Likes
508

Thank you for answering my question.