‎2011 Nov 30 10:40 AM
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?
‎2011 Nov 30 10:55 AM
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
‎2011 Nov 30 11:00 AM
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
‎2011 Dec 03 10:53 AM