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.
Showing results for 
Search instead for 
Did you mean: 

Calling Function Module in Update Task

Former Member
0 Kudos


I am calling a function module in update task.

This function module is a Z function module, and I have set the attributes as an UPDATE FUNCTION MODULE.

Inside this Z function module, it calls another function module (lets say FUNCTION_A) and this function module runs in normal mode. In the Z function module, there are many updates to the database as well as there are some updates in the function module in FUNCTION_A.

My question is : If I call the the Z function module in update task mode ,

1) Will all the updates in this function module as well as in function module FUNCTION_A happen concurrently

2) If any update fails, will all the updates that should be carried out while calling the Z function module fail ?

This is a matter of things being carried out as a single atomic transaction, hence the doubt

Thanks a lot for reading through it patiently and a zillion for responding to it.


Subramanian V.


Former Member
0 Kudos


Just a question to understand the scenario better:

Can you tell why would you write update statements inside the second function module (Type: NORMAL), when the way to go is to write that piece of code in an update function module?

This situation, what u face will not arise if you stick on to this.

Former Member
0 Kudos

I think that all your updates will take place concurrently, or be backed out concurrently. I haven't tried this, though! However, what an Update FM does is to be loaded into an Update Work Process. Think of it as a regular Work Process. If this piece of ABAP calls another FM, the new FM (and it's entire Function Group) load into the same Work Process. It's all one happy LUW.

The danger: watch out for ABAP commands that will cause premature termination of the LUW. These include issuing an E or W type error, CALL TRANSACTION, CALL FUNCTION with any remote or asynchronous options, etc. See help on CALL FUNCTION...IN UPDATE TASK for a complete list.

I think that SAP syntax checks these in an Update FM, but probably not in the called FM.