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: 

REGARDING functionmodules

Former Member
0 Kudos

Hi All,

How many types of function modules are there in sap.what is the use of when u select the update function module,

Thanks&Regards,

phani

3 REPLIES 3

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

Update Techniques

The main update technique for bundling database changes in a single database LUW is to use CALL FUNCTION ... IN UPDATE TASK. This section describes various ways of updating the database.

A program can send an update request using COMMIT WORK

· To the update work process, where it is processed asynchronously. The program does not wait for the work process to finish the update (Asynchronous Update).

· For asynchronous processing in two steps (Updating Asynchronously in Steps.)

· To the update work process, where it is processed synchronously. The program waits for the work process to finish the update (Synchronous Update).

· To its own work process locally. In this case, of course, the program has to wait until the update is finished (Local Update.)

Regards,

Former Member
0 Kudos

Hi

There are three types of function modules

Normal

Remote enabled

Update

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

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.

<b>Open any FM in SE37.</b>

Select the Attributes Tab:

in The Processing Type you can see the Types of FMs

1.Normal FM - Can be called within the Same SAP System

CALL FUNCTION '<NAME>'

2. Remote Enable FM : Can be called from External (SAP or NON SAP) system.

CALL FUNCTION '<NAME>' DESTINATION '<RFC DESTINATION>'

3. Update Module: Only for Updating database tables . processed in Update work process.

CALL FUNCTION '<FM>' IN UPDATE TASK.

Former Member
0 Kudos

Function Modules:



Function modules are ABAP routines that are administered in a central function library. They apply across applications and are available throughout the system.

We must assign function modules to a function pool that is called a function group. A function group is nothing but a container for the function modules.

Function Module types:



Normal, Remote enabled & Update

Creating Update Function Modules



To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to one of the following values:

Update with immediate start
Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions can be restarted by the update task in case of errors.

Update w. imm. start, no restart
Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions may not be restarted by the update task.

Update with delayed start
Set this option for low priority ("V2") functions that run in their own update transactions. These functions can be restarted by the update task in case of errors.

To display the attributes screen in the Function Builder, choose Goto ® Administration.

Defining the Interface

Function modules that run in the update task have a limited interface:

Result parameters or exceptions are not allowed since update-task function modules cannot report on their results.

You must specify input parameters and tables with reference fields or reference structures defined in the ABAP Dictionary.

Regards,

Maha