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

Conflict while updating database

Former Member
0 Likes
508

Hi,

We have a Z table. There is a lock object created for that table. So we are using ENQUEUE FM to lock the table before updating it. After modifying the table, DEQUEUE FM is being used to release the lock.

Now the problem is, we got an error "The database system detected a deadlock and avoided it by rolling back your transaction."

May be two people tried to modify the same record thats why we got this error.

After releasing the lock using the DEQUEUE FM, COMMIT statement is not used.

My question is, are we getting this problem due to the absence of COMMIT statement or is there any other reason?

We are unable to replicate this error.

Please reply.

Thanks,

Ibrahim.

2 REPLIES 2
Read only

Rushikesh_Yeole
Contributor
0 Likes
470

To replicate the sccenario, use program to update table in debugging in 1 session.

and update table through SE11 in maintainece table entries.

You can check with this.

Commit work will not create a problem.

Let me know any querries.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
470

Use SM21 to read actual error message, some database locks are not related to SAP lock concept, e.g. Oracle has some problem with insertion in certain configuration. Which message do you get via SM21.

Regards,

Raymond