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

work process for database updation

Former Member
0 Likes
603

hi ,

   how to make queue for database update based on priority,

  for example, program 1 and program 2 are updating same database table  at same time,

i want to update db table based on queue request thats after completing update from program 1,program 2 has to update,

how to achieve the same.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
571

Hi,

I suggest you to do table lock while doing updating the DB table.

This will prevent another program or another transaction to modify the same table.

Please check the below link for more details.

SAP Database Locking - ENQUEUE and DEQUEUE

You may check in your second program whether your table is locked or not. According to that you

may write the logic.

3 REPLIES 3
Read only

Former Member
0 Likes
572

Hi,

I suggest you to do table lock while doing updating the DB table.

This will prevent another program or another transaction to modify the same table.

Please check the below link for more details.

SAP Database Locking - ENQUEUE and DEQUEUE

You may check in your second program whether your table is locked or not. According to that you

may write the logic.

Read only

nishantbansal91
Active Contributor
0 Likes
571

Hi,

Prog A.

Lock the table before updating and unlock the table after updating.

PROG B.

Check If the table is locked wait for 2 second or as per your requirement and check the same,

Thanks
Nishant

Read only

Former Member
0 Likes
571

thanks for ur reply.