05-18-2015 7:16 PM
Hi
I am new to programming in ABAP, with Java background. When I was learning ABAP, I understand that SAP has the intention to shift programing from the traditional procedural programming paradigm using report program, BAPI, function module, sub-routine to the more modern Object Oriented Programming (OOP) with ABAP objects. As the adopter of the latter concept, I wonder if there is a corresponding class method for all the pre-existing function modules?
05-18-2015 8:01 PM
05-18-2015 9:40 PM
Hi Francis,
I don't believe there are exactly corresponding classes/methods for all existing function modules. But there are lots of classes that can replace old FMs.
I always try to find classes whenever I need one. But sometimes I still have to use some old FMs. But maybe that's just lack of knowledge from me.
Regards,
Thales Schmidt
05-23-2015 4:02 AM
Hi Thales and saroj das
Thanks for your answer. Pardon for asking this "newbie will ask" question: How then can I try to find the corresponding class/ method for the function module?
I have been using the following methods, but I am unaware if they are sufficient, or even correct to begin with:
1. Google online
This is the most useful thus far, as many of the SCN topic give me a hint of the method that I can use, and with a bit of research I get the suitable method I want.
2. Try to search for the class that it will represent using the wild card
For example 'cl*zip*' get me to find out more about the 2 zip class, "CL_ABAP_ZIP SAP" and "CL_ABAP_GZIP". I get lucky with this for once or twice, but most of the time I know the functionality of the method, but I don't know which class contain such methods.
05-25-2015 1:43 PM
Hi Francis,
Yeah, I think this is the best way to search for the methods. I do the same thing.
Regards,
Thales Schmidt
05-25-2015 2:11 PM
You could also search thru OSS notes (https://support.sap.com/notes) also sometimes classes are in same package (or another package of same application, SE80 is your friend) and often the class call the FM (*) or share some common sub-objects (so where-used search)
Regards,
Raymond
(*) Long (long) time ago I discovered CL_GUI_FRONTEND_SERVICES thru a where-used of GUI_UPLOAD...
05-19-2015 4:45 AM
NO, there are no corresponding class and methods for every function module.. but there a many number of class and methods which could achieve the same work instead of function module.