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

difference between class and function module

Former Member
0 Likes
6,654

can anybody let me know the difference between class and function module?

Edited by: sateesh kumar on Jul 12, 2008 3:18 PM

1 ACCEPTED SOLUTION
Read only

former_member69765
Contributor
0 Likes
2,684

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.

10 REPLIES 10
Read only

Former Member
0 Likes
2,684

where did you get similarities between them?

Read only

former_member69765
Contributor
0 Likes
2,685

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.

Read only

Former Member
0 Likes
2,684

Hii!

The basic difference between class and function module is that

classes can be instanciated while function module cannot be intanciated.

Regards

Abhijeet

Read only

Former Member
0 Likes
2,684

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

Read only

Former Member
0 Likes
2,684

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

Read only

0 Likes
2,684

>

> 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

Read only

Former Member
0 Likes
2,684

Sateesh

please try to search yourself before posting a thread.

am sure this question has been asekd before.

just refer:

Amit.

Read only

Former Member
0 Likes
2,684

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

Read only

former_member8532
Participant
0 Likes
2,684

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

Read only

Former Member
0 Likes
2,684

Hi,

<copy and paste removed by moderator>

With thanks & regards,

Sravani yendru

Edited by: Julius Bussche on Jul 23, 2008 7:51 AM