Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Parallel Updation

Former Member
0 Likes
524

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
479

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

3 REPLIES 3
Read only

Former Member
0 Likes
479

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

Read only

Former Member
0 Likes
479

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.

Read only

Former Member
0 Likes
480

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