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

what's the difference between FM and Method?

Former Member
0 Likes
1,085

We can layout a list by using FM (reuse_alv_grid_display) or Method cl_gui_alv_grid.

can anybody tell me the difference?Thanks

We can layout a list by using FM (reuse_alv_grid_display) or Method cl_gui_alv_grid.

can anybody tell me the difference?Thanks

5 REPLIES 5
Read only

Former Member
0 Likes
982

Slam,

Methods are used when you want to add additional functionalities in the ALV ouput.For example,adding a button on the status bar.

FM is used only for standard display and is always preferable when you do not really want any additional functions.

Regards,

Sandip.

Read only

0 Likes
982

thanks a lot~

Read only

Former Member
0 Likes
982

Hi Slam,

Functionally speaking they both have the same functionality. The only difference being, the way each of them do it. The Method cl_gui_alv_grid uses object oriented concepts whereas FM (reuse_alv_grid_display) uses a more procedural oriented approach.

HOwever, you can use any one of them irrespective of your style of coding(Procedural or Object oriented).

The method cl_gui_alv_grid will have more options, when compared to the FM , as it is released later than the FM.

Regards,

Ravi Kanth

Read only

Former Member
0 Likes
982

Hi Slam,

<b>Function modules</b> are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.

Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library. The R/3 System contains a wide range of predefined function modules that you can call from any ABAP program. Function modules also play an important role in database updates and in remote communications between R/3 Systems or between an R/3 System and a non-SAP system.

Hope u understood.

Thanks&Regards,

Ruthra

Read only

Former Member
0 Likes
982

Hi Slam

I think class frameowork for alv grid control is more powerful than the FM.

You can see some documentation about ALV GRID CONTROL here

http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f601d2fe11d2b467006094192fe3/frameset.htm

bye

enzo