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

ALV REPORTS

Former Member
0 Likes
567

hi all..

can any one tell whats the difference between the function module in alv reports and the class in alv reports..

thanks in advance..

1 ACCEPTED SOLUTION
Read only

p291102
Active Contributor
0 Likes
549

Hi,

Check this below link. It will helps to u.

Thanks,

Sankar M

hi all..

can any one tell whats the difference between the function module in alv reports and the class in alv reports..

thanks in advance..

4 REPLIES 4
Read only

p291102
Active Contributor
0 Likes
550

Hi,

Check this below link. It will helps to u.

Thanks,

Sankar M

Read only

Former Member
0 Likes
549

Hi Ashu,

Function modules 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.

You can declare methods in the declaration part of a class or in an interface. To declare instance methods, use the following statement:

METHODS <meth> IMPORTING.. [VALUE(]<ii>[)] TYPE type [OPTIONAL]..

EXPORTING.. [VALUE(]<ei>[)] TYPE type [OPTIONAL]..

CHANGING.. [VALUE(]<ci>[)] TYPE type [OPTIONAL]..

RETURNING VALUE(<r>)

EXCEPTIONS.. <ei>..

When you declare a method, you also define its parameter interface using the additions IMPORTING, EXPORTING, CHANGING, and RETURNING. The additions define the input, output, and input/output parameters, and the return code. They also define the attributes of the interface parameters, namely whether a parameter is to be passed by reference or value (VALUE), its type (TYPE), and whether it is optional (OPTIONAL, DEFAULT).

Unlike in function modules, the default way of passing a parameter in a method is by reference.

As in function modules, you can use exception parameters (EXCEPTIONS) to allow the user to react to error situations when the method is executed.

As in function modules, you can use the RAISE <exception> and MESSAGE RAISING statements to handle error situations.

Reward points if helpful.

Regards,

Hemant

Read only

Former Member
0 Likes
549

Hi,

function module displays the reports in stndard selection screen.

but if u want to create reports on screens(DYNPRO) use classes.

Rgds,

Prajith

Read only

Former Member
0 Likes
549

Hi,

Look at the below link

http://sap.niraj.tripod.com/id66.html

Regards

Sudheer