Skip to Content

This blog demonstrates a scenario for updating a transparent table using (PERFORM ON COMMIT) and (CALL FUNCTION IN UPDATE TASK).

The main goal is to show what is most priority and the global variables flow.

I did this test in 2008 but only now am publishing with the creation of my blog.

Create transparent table

Create the table with fields bellow:

image

Create Function

Create the function module bellow with processing type in (update module):

image

Add the field parameter I_COUNTER

image

Put the source code in function.

Create report executable program

Create the program with the source code below:

Results of execution and Conclusion

Result in output list:

image

Result in table:

image

Looking the result above, you can note that (PERFORM ON COMMIT) is executed before the (CALL FUNCTION IN UPDATE TASK).

However, (CALL FUNCTION IN UPDATE TASK) the value parameter imported to execute the function module are those current at the time of the call.

The (PERFORM ON COMMIT) global data values takes the current at the time of the command COMMIT.

Related Content

http://help.sap.com/saphelp_nw04/Helpdata/EN/41/7af4e3a79e11d1950f0000e82de14a/content.htm

http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4e0a79e11d1950f0000e82de14a/content.htm

http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4dda79e11d1950f0000e82de14a/content.htm

 


 

Thanks to friends Fabricio Souza and Rodrigo Ferrari that needed this theory and decided to share with you the knowledge.

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Suhas Saha
    Hello Bruno,

    Creation of sub-routines are obsolete as of Release 702. So i feel this blog is a little too late!

    Anyway thanks for sharing the info.

    BR,
    Suhas

    (0) 
    1. Stephen Johannes
      You have to remember there are still a ton of people running 700 and will not even see 702 for many years due to testing/resource requirements to apply enhancement packs on their backend system.  So the blog might be late for some but I would assume for a vast majority of the people out here it is still relevant.

      Take care,

      Stephen

      (0) 

Leave a Reply