update techniques and SET UPDATE TASK LOCAL statement

In order to obtain data consistency SAP provides an infrastructure containing a different type of processor and a few ABAP commands. By this infrastructure you are bundling all your database update requests in a single LUW in order to obtain database consistency.
Actually SAP provides three techniques for assuring database consistency these are asynchronous,synchronous and local update types and each of them has some advantages and disadvantages.

  • Asynchronous Update

In a typical SAP installation at least one update work process is reserved for asychronous processing of database updates. They are responsible for updating database after COMMIT WORK is relased after an implementation of CALL FUNCTION … IN UPDATE TASK in a program executed by a dialog process. Here dialog process does not wait update process to finish its work.

  • Synchronous Update

Unlike asynchronous update synchronous one waits update process to finish. It achives this using COMMIT WORK AND WAIT instead of using just COMMIT WORK. Actually synchronous update is identical to using PERFORM … ON COMMIT statement plus it exploits update processors.

  • Local Update

This type of update is closer to synchronous update in terms of their synchronization. In local update before implementing CALL FUNCTION …IN UPDATE TASK statement you also have to activate local update. You do it by SET UPDATE TASK LOCAL statement because by default local update is deactivated.You can use this functionality if you are executing mass operations like batch background jobs or tRFC and qRFC processing as you don’t need to omit database update time in a mass background job.

Below figure shows an overview of update types.

sap update techniques

figure reference : SAP Press – SAP Performance Optimization Guide

You may also like