‎2006 Feb 14 7:28 AM
Hi ALL,
In BDC CALL TRANSACTION UPDATE
A - > Asynchronous
S - > Synchronous
L - > Local
What is Local Update, How it works
Plz guide me
Thanks & Regards
Raja Sekhar.t
‎2006 Feb 14 7:46 AM
Hi Raja,
just check the F1 help on call transaction,
you will be able to see the use of Local. i'm just giving the SAP help just check it.
The UPDATE addition determines the processing mode for batch input processing. You can specify a character-type object for upd. Its possible content and its effect are displayed in the following table. Without use of one of the additions UPDATE or OPTIONS FROM, the effect is the same as if upd had the content "A".
upd Effect
"A" Asynchronous update. Updates of called programs are executed in the same way as if in the COMMIT WORK statement the AND WAIT addition was not specified.
"S" Synchronous processing. Updates of the called programs are executed in the same way as if in the COMMIT WORK statement the AND WAIT addition had been specified.
<b>"L" Local update. Updates of the called program are executed in such a way as if the SET UPDATE TASK LOCAL statement had been executed in it.</b>
SET UPDATE TASK LOCAL
Syntax
SET UPDATE TASK LOCAL.
Effect
This statement specifies that the high-priority update function modules - registered during the current SAP LUW using CALL FUNCTION ... IN UPDATE TASK - are registered in the ABAP memory instead of the VBLOG database table. In addition, it specifies that the current work process and not the update work process run these modules during the current database LUW, when the COMMIT WORK statement is executed. This statement has no effect on low-priority update function modules.
At the beginning of every SAP LUW, the local update function is deactivated. If you wish to use it, you must reactivate it again before the first update function module is registered.
System fields
sy-subrc Meaning
0 The local update function is activated.
1 The local update function has not been activated, because the program has already registered at least one update function module for the normal updating procedure in the current SAP-LUW.
regards
vijay
‎2006 Feb 14 10:35 AM
Hai Sekhar,
You use the UPDATE parameter to specify how updates produced by a transaction should be processed. You can select any of the three modes.
L Local updating : If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program.
In a local update, the update program is run by the same work process that processed the request. The dialog user has to wait for the update to finish before entering further data. This kind of update is useful when you want to reduce the amount of access to the database. The disadvantage of local updates is their parallel nature. The updates can be processed by many different work processes, unlike asynchronous or synchronous update, where the update is serialized due to the fact that there are fewer update work processes (and maybe only one).
You switch to local update using the ABAP statement SET UPDATE TASK LOCAL. This statement sets a "local update switch". When it is set, the system interprets CALL FUNCTION IN UPDATE TASK as a request for local update. The update is processed in the same work process as the dialog step containing the COMMIT WORK. The transaction waits for the update to finish before continuing.
As an example, suppose you have a program that uses asynchronous update that you normally run in dialog mode. However, this time you want to run it in the background. Since the system response time is irrelevant when you are running the program in the background, and you only want the program to continue processing when the update has actually finished, you can set the SET UPDATE TASK LOCAL switch in the program. You can then use a system variable to check at runtime whether the program is currently running in the background.
By default, the local update switch is not set, and it is reset after each COMMIT WORK or ROLLBACK WORK. You therefore need to include a SET UPDATE TASK LOCAL statement at the beginning of each SAP LUW.
If you reset data within the local update, the ROLLBACK WORK statement applies to both the dialog and the update part of the transaction, since no new SAP LUW is started for the update.
Dont forget to reward pts, if it helps ;>)
Regards,
Rakesh.
‎2006 Feb 14 10:37 AM