We are using class alv and function alv, what is the difference between those options?
Asked
Active
Viewed 3,659 times
1 Answers
4
Some of the differences:
- You can create screens using function modules however classes have to call separate program to generate screens.
- Classes are more secure than FMs.
- Class type increases the performance.
- Class type is OO, it allows more flexibility. Can have multiple ALVs in one screen.
- Classes will allow reusability better than FM because being Object Oriented.
- Classes are instantiable while function groups are not.
- Objects are the instance of class but FMs are not instances of a Function Group.
- Function modules can be executed asynchronously and can be called by other systems remotely also.
- A program can work with instances of several function groups at the same time however it cannot work with several instances of a single function group.
*This referance could be helpful too.
Hope it was helpful
Talha

Mtu
- 643
- 10
- 18
-
This is very useful answer, thanks. I have another question too actually, how can i understand is the code written with functions or with class? Is there an obvious difference between the code writing? Like, is there a class definition into class alv's code? – Merve Gül Jul 10 '12 at 13:18
-
1Those are written in code differently, for functions you can use REUSE_ALV_* methods and for Classes it would be like "CL_SALV_TABLE", get this [link](http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP+-+Developing+Interactive+ALV+Report+using+OOABAP) as an example for OO SALV Classes. [HERE IS AN EXAMPLE](http://wiki.sdn.sap.com/wiki/display/ABAP/ALV+grid+control+with+2+different+approaches%21) for ALV grid control with 2 different approaches. Hope its helpful. – Mtu Jul 10 '12 at 13:28