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: 

Function modules in Update task

Former Member
0 Kudos

Hi Folks,

What is the difference between

1.If a function module contains in attributes 'Update mode ' and run( without 'update task - keyword).

2.call function ' fun2' in update task.

In this case, do we need to set the attributes must be 'Update task'?

Please help me.

Thanks in advance

Bhavani

2 REPLIES 2

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

From F1 Help...

<i>

This statement registers the update function module specified in update_function. update_function must be a character-type field, which during execution of the statement contains the name of an update function module in uppercase letters.

<b>An update function module is a function module, for which in the Function Builder the property update module is marked. The registration of an update function module is an essential part of the update task.</b>

The function module is not executed immediately, but is scheduled for execution in a special work process (update work process). For this purpose, the name of the function module including the passed actual parameters is stored as a log record in the database table VBLOG. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.

</i>

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Bhavani ,

1.If a function module contains in attributes 'Update mode ' and run( without 'update task - keyword).

<b>It will behave as a normal FM . The update mode in attribute has no effect .</b>

2.call function ' fun2' in update task.

In this case, do we need to set the attributes must be 'Update task'?

<b>Yes the attribute 'Update Task' must be set . Otherwise you will get a run time error CALL_FUNCTION_NO_VB. In this way the function will be executed when your program hits a commit work statement and will be executed in a sepaarte task ( not in the dialog task in which your program was running ) called update task.</b>

Cheers.

( Dont forget to reward if answers were helpful )