Analyze PERFORM ON COMMIT vs. CALL FUNCTION IN UPDATE TASK
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:
Create Function
Create the function module bellow with processing type in (update module):
Add the field parameter I_COUNTER
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:
Result in table:
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.





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
Take care,
Stephen
In our customer base we have only one client with version 7.02. Who migrated recently 4.6C to EHP05 7.02.