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

update and background

Former Member
0 Likes
1,954

hi

what's the difference between calling a func mod in update task and in a background task.

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,562

If calling in Update Task, then it runs in an UPdate Work process, if you call in background task, it is running in a background task.

The update task is a little special though.

REad on.....

<i>

CALL FUNCTION

Variant 3

CALL FUNCTION func IN UPDATE TASK.

Additions:

1. ... EXPORTING p1 = f1 ... pn = fn

2. ... TABLES p1 = itab1 ... pn = itabn

Effect

Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task. Update function modules must be flagged as such in the Function Builder

The return value is not set.

Addition 1

... EXPORTING p1 = f1 ... pn = fn

Effect

Values of fields and field strings specified under EXPORTING are passed from the calling program to the function module. In the function module, the formal parameters are defined as import parameters. In the interface definition, default values must be assigned to all import parameters of the update function module.

Addition 2

... TABLES p1 = itab1 ... pn = itabn

Effect

TABLES passes references to internal tables. All table parameters of the function module must have values.

Note

With update function modules, both import parameters and exceptions are ignored when the call is made.

Administration transaction

Related

COMMIT WORK, SET UPDATE TASK LOCAL

</i>

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,562

If you say the background task, seperate work process is allocated .

Read only

manuel_bassani
Contributor
0 Likes
1,562

Hi,

in background task the FM is executed in asyncronous: the FM is executed but the main program does not wait for the FM termination (it continues immediately after the call of FM)

in update task (often used with update/insert/modify of DB tables) the FM is not executed immediately, but when a commit work is called (only then the update task is executed).

Regards, Manuel