‎2013 Apr 10 7:16 AM
Hello Experts,
I want to know that is it ok to use function module instead of methods, if we are developing our report using OOPs ? Because sometimes we dont get method name for a particular task and we easily get the function module for the same, so in that case shall we use function module in OOPs?
For Example : I want to Read Classification Information on Object and to get it done we have a function module BAPI_OBJCL_GETDETAIL, but I am developing my report using OOPs so I want to use an available class and its method instead of this function.
Please tell me any way to find the method against a function module or against a particular task we want to perform or let me know that shall I stick to the use of function module in OOPs like procedural programming ?
Regards
Sameer
‎2013 Apr 10 9:53 AM
If an existing function module is encapsulated in a class method, then use the method. If there are two choices - either FM or class/methods, use class/methods.
Aside from this, there is no problem whatsoever in using function modules in methods.
‎2013 Apr 10 9:53 AM
If an existing function module is encapsulated in a class method, then use the method. If there are two choices - either FM or class/methods, use class/methods.
Aside from this, there is no problem whatsoever in using function modules in methods.
‎2013 Apr 10 10:00 AM
Hi Matthew,
Thank you for your reply. Is there any way we can find a class/method for a specific task ?
Regards
Sameer
‎2013 Apr 10 10:23 AM
You can search the repository from SE80, or via the specific transactions like SE24 - search for a method/class/function module that contains relevant words in their name or description. Or you can do a whereused on a function module to see if it is embedded in a class/method. Or you can find a transaction that does what you're trying to do programmatically, and debug it to see what it calls.
matt
‎2013 Apr 10 1:49 PM
Hi Sameer,
instead of starting the Repository Information System in the SE80 you can also start it directly with SE84.
There you can search the class library for classes/interfaces or methods.
Regards,
Dominik
‎2013 Apr 11 5:56 AM
Hi Matthew,
The suggestion for using where used list is nice. Thanks.
Regards
Sameer