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

Call Function

Former Member
0 Likes
1,068

Hi,

Can any one detail the exact difference between Call Function and Call Function in Update Task.

Regards,

Sreedhar

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
821

CALL FUNCTION will fire the function module in the same dialog process as your current session. CALL FUNCTION in UPDATE TASK, will be fired in a totally separate process, specifically an UPDATE process.

Regards,

Rich Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
822

CALL FUNCTION will fire the function module in the same dialog process as your current session. CALL FUNCTION in UPDATE TASK, will be fired in a totally separate process, specifically an UPDATE process.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
821

CALL FUNCTION func IN UPDATE TASK.

Extras:

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

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

During updating processes of function modules, you may not make any calls using the language statements SUBMIT, CALL DIALOG, CALL SCREEN, CALL TRANSACTION, COMMIT WORK or ROLLBACK WORK . All other language elements that trigger a database Commit (for example, a screen change using the MESSAGE statement) also lead to a runtime error during updating.</b>

Read only

Former Member
0 Likes
821

Hi,

When u call a function it is called when the stetament is encountered.

When u call function in update task :- that particular function is called only when data is committed .

that is at the time of SAVE only.

<b>Reward Points if solved.</b>

Read only

Former Member
0 Likes
821

Hi,

call function normally will be in the same process,after call function finish then rest of the process continues...

but call function update task will start different thread , with out disturbing the main process.

Regards

vijay