Online Tutorials & Training Materials | STechies.com
Register Login

Update Work Process

02 Feb 2006 11:08 pm || 0

Update

The update is an asynchronous (not simultaneous) Bundling all updates for one SAP transaction into a single database transaction ensures that the data that belongs to this SAP transaction can be rolled back completely.

The Update Process

Transaction SM13 (update requests)

If a user wants to change a data record in an SAP transaction, he/she first calls the corresponding transaction (dialog), makes the appropriate entries
on the screens, then finally initiates the update process by saving the data.

Related: Work Process: Types in SAP


This process triggers the following steps:

1. The program locks the data record for other users. The program does this by addressing the enqueue work process (via the message server if appropriate). The enqueue work process makes the relevant entry in the lock table or (if another user has already locked the data) informs the user that the data record cannot currently be changed.

2. If the enqueue work process succeeded in writing the lock entry to the lock table, then it passes the lock key it created to the user, the program reads the record to be changed from the database and the user can change the record on the screen image of the SAP transaction.

3. In the active dialog work process, the program calls a function module using CALL FUNCTION ... IN UPDATE TASK and writes the change request to database update tables. These are also called VB* tables, because their names begin with .VB.. They act as temporary memory and store the data to be changed until it can be collected and written to the target tables in the database (in a single database transaction).

4. At the end of the transaction (for example, when the user saves the data . possibly after completing other dialog steps), the program initiates the close of the transaction with the statement COMMIT WORK. The work process that is handling the active dialog step triggers an update work process.

5. On the basis on the information transferred from the dialog work process, the update work process reads the log records that belong to this SAP transaction from the VB* tables.

6. The update work process passes the changes marked and collected in the VB* tables to the database as a change request and evaluates the database response. If the changes were successfully written to the target tables, the update work process triggers a database commit after the last change to the database and deletes the entries from the VB* tables. If an error occurs, the update work process triggers a database rollback, leaves the log records in the VB* tables and marks them as defective.

7. The lock entries in the lock table are reset.

Hint:
· V1 modules refer to time-critical changes. They are relevant to objects that have a controlling function in the SAP system, such as a change to the material stock or an order creation.
· V2 modules refer to less time-critical changes, for example, purely statistical updates such as creating a change document.