Skip to Content
author's profile photo Former Member
Former Member

Calling Function Module in Update Task


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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2004 at 10:23 PM


    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2004 at 12:27 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.