Application Development 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: 

What are the parameters of Function Module

Former Member
0 Kudos

Hi,

What are the parameters of Function Module?

4 REPLIES 4

Former Member
0 Kudos

Function Modules are special external subroutine stored in a central library. The R/3 system provides numerous predefined function modules that you can call from the ABAP/4 programs.

All the function Modules are created under the Function Groups. Function Groups are nothing but the related group of function modules.

The function modules can be maintained through T.CodeSE37 and T.Code SE80.

In general the function module has the following components.

Documentation:

This is the place where you can find the discription/purpose of the function module.

Import & Export Parameters.

Import parameters correspond to the formal input parameters of subroutines. They pass data from the calling program to the function module.

Export parameters correspond to the formal input parameters of subroutines. They pass data from the function module back to the calling program.

Table Parameters.

Table parameters are internal tables. Internal tables are treated like changing parameters and are always passed by reference.

Exceptions.

Exceptions are used to handle error scenarios which can occur in the function modules. The function modules checks for any type of error and raise exception and returns SY-SUBRC value to the calling program.

Source Code:

the programming logic of the function module is written in this source code.

Rewards if useful.

former_member386202
Active Contributor
0 Kudos

Hi,

Import Export changing and exceptions are the parameters of FM

Regards,

Prashant

matt
Active Contributor
0 Kudos

There are four types of parameters to a function module. They are used to get information into the module and get information out. Collectively, the parameters are known as the function module interface.

The four types are:

IMPORTING -> data going into the function module, that it will perform some action on

EXPORTING -> data returned by the function module

CHANGING -> data sent to the function module that maybe/is modified by the function module and returned to the caller

TABLES -> Tables sent to the function module - these are handled the same way as CHANGING parameters.

With recent ABAP, you can use table types with IMPORTING/EXPORTING/CHANGING parameters. You are not forced to use TABLES. With RFCs, however, it is better to use TABLES to pass table parameters.

matt

Former Member
0 Kudos

With recent ABAP, you can use table types with IMPORTING/EXPORTING/CHANGING parameters. You are not forced to use TABLES. With RFCs, however, it is better to use TABLES to pass table parameters.

The four types are:

IMPORTING -> data going into the function module, that it will perform some action on

EXPORTING -> data returned by the function module

CHANGING -> data sent to the function module that maybe/is modified by the function module and returned to the caller

TABLES -> Tables sent to the function module - these are handled the same way as CHANGING parameters.