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 are the parameters of Function Module

Former Member
0 Kudos
2,308

Hi,

What are the parameters of Function Module?

6 REPLIES 6
Read only

Former Member
0 Kudos
1,930

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.

Read only

former_member386202
Active Contributor
0 Kudos
1,930

Hi,

Import Export changing and exceptions are the parameters of FM

Regards,

Prashant

Read only

0 Kudos
1,134

it seems that there is a typo in line 12, instead of 'formal OUTPUT parameters' 'formal INPUT parameters' is written.

according to the terminology the Export parameters must be the other way round of Import parameters.

Read only

matt
Active Contributor
1,930

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

Read only

Former Member
0 Kudos
1,930

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.

Read only

Samar_05
Explorer
0 Kudos
570

IMPORTING

EXPORTING

CHANGING

TABLES

EXCEPTIONS