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 UPDATED FUNCTION MODULES

Former Member
0 Kudos

Hi Friends,

Can anybody explain me about UPDATED FUNCTION MODULES (types of function modules)

1 ACCEPTED SOLUTION
6 REPLIES 6

Former Member
0 Kudos

Hi

Update Function Module

Unlike transactions and executable programs, dialog modules do not start a new SAP LUW. Calls to update-task function modules from a dialog module use the same update key as the ones in the calling program. The result is that calls to update function modules from a dialog module are executed only if a COMMIT WORK statement occurs in the calling program.

If you place a COMMIT WORK in a dialog module, it does commit changes to the database (for example, with UPDATE).However, it does not start the update task. The function modules are not actually executed until a COMMIT WORK statement occurs in the calling program.

If you use dialog modules, try to avoid including calls to update function modules in subroutines called with PERFORM ON COMMIT. In general, any occurrence of PERFORM ON COMMIT(with or without update-task function calls) in a dialog module can be problematic.

This is because dialog modules have their own roll area, which disappears when the module finishes. Consequently, all local data (including data used for parameter values when calling an update function module) disappears as soon as the commit in the main program is reached.

If you must use this method in a dialog module (i.e. include the call to an update-task function in a subroutine), you must ensure that the values of the actual parameters still exist when the update-task function actually runs. To do this, you can store the required values with EXPORT TO MEMORY and then import them back into the main program (IMPORT FROM MEMORY) before the COMMIT WORK statement

Creating Update Function Modules

To create a function module, you first need to start the Function Builder. Choose Tools ® ABAP Workbench, Function Builder. For more information about creating function modules, refer to the ABAP Workbench Tools documentation.

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.

http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4daa79e11d1950f0000e82de14a/frameset.htm

Regards,

Harish

Former Member
0 Kudos

Hi Venkat

Check the below link to know about updated Function modules

http://www.geocities.com/victorav15/sapr3/abapfun.html

Regards,

Syfulla

Former Member
0 Kudos

Hi,

Go through the Links-

Types of Function module-

Former Member
0 Kudos

Hi sravanthi,

Thnaks for u r replay.

even though it is somewhat helpfull,

but i want to know what is exactly updated function modules,

and where we use them.

0 Kudos

Hi Venkat,

As per my knowledge updated Function module is used to Update the database changes.

Regards,

sujit