‎2011 Jul 18 3:14 AM
Hi Experts,
I have an abap program that, updates a ztable as follows :
LOOP AT t_tb INTO wa_tb.
UPDATE ztab SET zfield = x
WHERE keyfield EQ wa_tb-keyfield.
ENDLOOP.
I would like to confirm that if I run parallelly (or simulataneously) 2 or more batch jobs based on same program that updates the same ztable there will be no problem and
the update will be the same result as if I run these batch jobs one after another.
Please throw me some clues which I would appreciate a great deal.
Best regards
M Russo
Hi Experts,
I have an abap program that, updates a ztable as follows :
LOOP AT t_tb INTO wa_tb.
UPDATE ztab SET zfield = x
WHERE keyfield EQ wa_tb-keyfield.
ENDLOOP.
I would like to confirm that if I run parallelly (or simulataneously) 2 or more batch jobs based on same program that updates the same ztable there will be no problem and
the update will be the same result as if I run these batch jobs one after another.
Please throw me some clues which I would appreciate a great deal.
Best regards
M Russo
BUMP**
Edited by: Mirella Russo on Jul 23, 2011 3:31 PM
‎2011 Jul 24 7:21 PM
Hi,
if you are running jobs parallely to update the same DB table, it will cause locking issues. to avoid it, create lock objects for your ZTAB in SE11, then use the FMs ENQUEUE_<lockobjectname> ....... DEQUEUE_<lockobjectname> and write your update logic in between these FMs.
Regards
arun
‎2011 Jul 23 6:34 PM
Please go through the locking concept.
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eed9446011d189700000e8322d00/content.htm
Based on the need device the lock mechanism.
Tables accessed simultaneously and one after the other in batch jobs has some differences.
Edited by: Vighneswaran CE on Jul 23, 2011 7:35 PM
‎2011 Jul 24 5:50 PM
Hi,
There wont be a problem if key fields are different in different job. It will better if you update the DB table in one step rather than doing it in loop.
Regards,
Alok.
‎2011 Jul 24 7:21 PM
Hi,
if you are running jobs parallely to update the same DB table, it will cause locking issues. to avoid it, create lock objects for your ZTAB in SE11, then use the FMs ENQUEUE_<lockobjectname> ....... DEQUEUE_<lockobjectname> and write your update logic in between these FMs.
Regards
arun