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: 

Types of Function Modules

Former Member
0 Kudos

Types of Function Modules

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Function modules are one element. There are no types. However sometimes an RFC enabled function module is referred to as RFC Function module, but really it is just a function module. Also BAPIs are function modules, but are usually referred to as just BAPI as opposed to BAPI Function module.

There is no different function module types , but calling the function module will be different.

check this function calls syntax

1. Calls a function module:

- CALL FUNCTION func.

2. Call a function module in a different mode (asynchronous Remote Function Call):

- CALL FUNCTION func STARTING NEW TASK taskname.

3. Call a function module in the update task:

- CALL FUNCTION func IN UPDATE TASK.

4. Call a function module in a remote system (Remote Function Call, RFC 😞

- CALL FUNCTION func DESTINATION dest.

5. Asynchronous call to a function module with transactional processing (transactional Remote Function Call):

- CALL FUNCTION func IN BACKGROUND TASK.

qRFC with output queue

6. Call a function module that can be activated in the context of enhancements:

- CALL CUSTOMER-FUNCTION func.

Regards

4 REPLIES 4

Former Member
0 Kudos

<b>FUNCTION MODULE:</b>

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,Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library,Unlike subroutines, you do not define function modules in the source code of your program.

<b>REMOTE FUNCTION MODULE (RFC):</b>

RFC (Remote Function Call) is an extension of CALL FUNCTION in a distributed environment. Existing function modules can be executed from within a remote system (R/2 or R/3) via an RFC Call. Adding a Destination clause to the CALL FUNCTION statement does this.

The destination parameter displays an entry in the RFCDES table (which is defined with t.code SM59). This entry contains all necessary parameters to conect to and log in the destination system. The RFC API on OS/2, Windows, Windows NT and all R/3 based UNIX platforms makes it possible to use the RFC functionality between an SAP System and a non SAP System.

<b>UPDATE FUNCTION MODULE:</b>

These function modules are used to update the database tables. Using the function module in updating the database table helps in updating the database without any irregularities.

<b>BAPI:</b>

BAPI (Business Application Programming Interface) is an API method of a business object which intern is a RFC enabled Function Module.

Business Objects are the Objects which has business sence associated to it. Ex. Sales Orders, Purchase Orders etc.

The Properties of BAPI are:

  • Every BAPI name should start with letters 'BAPI'.

  • It is an API method of a Business Object.

  • it does not contain a internal COMMIT statement in the Function Module.

  • It does not contain "CALL TRANSACTION" statements.

  • BAPI do not raise 'EXCEPTIONS'.

paruchuri_nagesh
Active Contributor
0 Kudos

hi

there are 3 types of function modules

1) normal function modules

2)remote unction modules

3)update function modules

reward if u find useful

Nagesh.Paruchuri

Former Member
0 Kudos

Hi,

There are three types of function modules

1>Normal

2>Remote enabled

3>Update

plz go through the below links

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm

Former Member
0 Kudos

Hi,

Function modules are one element. There are no types. However sometimes an RFC enabled function module is referred to as RFC Function module, but really it is just a function module. Also BAPIs are function modules, but are usually referred to as just BAPI as opposed to BAPI Function module.

There is no different function module types , but calling the function module will be different.

check this function calls syntax

1. Calls a function module:

- CALL FUNCTION func.

2. Call a function module in a different mode (asynchronous Remote Function Call):

- CALL FUNCTION func STARTING NEW TASK taskname.

3. Call a function module in the update task:

- CALL FUNCTION func IN UPDATE TASK.

4. Call a function module in a remote system (Remote Function Call, RFC 😞

- CALL FUNCTION func DESTINATION dest.

5. Asynchronous call to a function module with transactional processing (transactional Remote Function Call):

- CALL FUNCTION func IN BACKGROUND TASK.

qRFC with output queue

6. Call a function module that can be activated in the context of enhancements:

- CALL CUSTOMER-FUNCTION func.

Regards