‎2008 Jul 12 2:18 PM
can anybody let me know the difference between class and function module?
Edited by: sateesh kumar on Jul 12, 2008 3:18 PM
‎2008 Jul 12 4:28 PM
Hi...
As KPN said... there is no similarity between them ...
Function Modules are just stand alone programs that take some input... do some processing and give you out put..
Classes and objects (Object Oriented Programming) is a programming paradigm ... that has brought revolutionary change in the modeling the real life scenarios into the computer programming world...
Check out the ABAP Objects tutorials in this link : http://www.abaplearning.com/index.php?option=com_content&view=category&id=8&Itemid=13
Here the author has tried to explain the OO principles using a real life problem... (an example from Matrix movie is taken)
this is some thing that you can never achieve using Function modules..
Regards,
Varun.
‎2008 Jul 12 3:19 PM
‎2008 Jul 12 4:28 PM
Hi...
As KPN said... there is no similarity between them ...
Function Modules are just stand alone programs that take some input... do some processing and give you out put..
Classes and objects (Object Oriented Programming) is a programming paradigm ... that has brought revolutionary change in the modeling the real life scenarios into the computer programming world...
Check out the ABAP Objects tutorials in this link : http://www.abaplearning.com/index.php?option=com_content&view=category&id=8&Itemid=13
Here the author has tried to explain the OO principles using a real life problem... (an example from Matrix movie is taken)
this is some thing that you can never achieve using Function modules..
Regards,
Varun.
‎2008 Jul 14 4:53 AM
Hii!
The basic difference between class and function module is that
classes can be instanciated while function module cannot be intanciated.
Regards
Abhijeet
‎2008 Jul 14 5:23 AM
Hi,
The main differences are,
1. CLASS can be instanceated, but FUNCTION MODULE can not.
2. CLASS can't contain SCREEN, FUNCTION MODULE can.
Regards,
Anirban Bhattacharjee
‎2008 Jul 14 5:30 AM
Hi Satheesh,
1. A function is an action to perform using a set of input arguments and returning a set of output arguments.
2. A class associates a chunk of data with a set of functions which operate on that data. The first argument to each function in a class (typically called a "method" in Python) is a reference to the data stored in that instance of the class.
Regards,
Sowmya
‎2008 Jul 16 9:02 AM
>
> Hi Satheesh,
>
> 1. A function is an action to perform using a set of input arguments and returning a set of output arguments.
>
> 2. A class associates a chunk of data with a set of functions which operate on that data. The first argument to each function in a class (typically called a "method" in Python) is a reference to the data stored in that instance of the class.
>
> Regards,
> Sowmya
Sowmya,
There have been a number of abuse reports that you are copy&pasting other people's work without (necessarily) putting any thought into it nor crediting the source.
In this case => http://markmail.org/message/l6ue5ih4cahahbof
If this continues, your points will be removed to correctly reflect that which was infact your work.
Please also read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]. There are not many rules, but they are good ones and we enforce them.
Thank you for your co-operation,
Julius
‎2008 Jul 14 5:34 AM
‎2008 Jul 15 7:24 AM
Hi Sateesh,
Please find major differences :
- Per program only one instance of Function Group is created, but using classes we can create as many instances as is needed.
- Every attribute in Function Group is public, but in classes we can declare either public/private/protected.
- Inheritance is not possible in case of Function Group.
etc...
Regards,
Zafar Ali
‎2008 Jul 15 11:12 AM
hi.
<copy&paste_removed_by_moderator>
Regards
Punit
Edited by: Punit Pawar on Jul 15, 2008 12:13 PM
Edited by: Julius Bussche on Jul 15, 2008 2:21 PM
‎2008 Jul 23 8:46 AM
Hi,
<copy and paste removed by moderator>
With thanks & regards,
Sravani yendru
Edited by: Julius Bussche on Jul 23, 2008 7:51 AM