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

Shall we use function module in OOPs ???

Former Member
0 Likes
1,093

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


1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
939

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.

5 REPLIES 5
Read only

matt
Active Contributor
0 Likes
940

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.

Read only

Former Member
0 Likes
939

Hi Matthew,

Thank you for your reply. Is there any way we can find a class/method for a specific task ?

Regards

Sameer

Read only

matt
Active Contributor
0 Likes
939

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

Read only

0 Likes
939

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

Read only

Former Member
0 Likes
939

Hi Matthew,

The suggestion for using where used list is nice. Thanks.

Regards

Sameer