Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

SAP freezing due to SQL lock under transaction

$
0
0

Hello everyone.

 

Our addon have a form which contains a "Finish" button that can be used when the form is in ADD or UPDATE mode. When the user clicks on it, the addon creates some documents. I did it under a transaction because it's more than one document, so I must ensure that all of them or nothing will be created.

 

The thing is, sometimes when the "Finish" routine is done succesfully, SAP wont let the user add or update the register because of closed period or any other issue, so I have a few documents created by my form but the data was not added/updated on the database. If the user tries again, it will create the documents again and again..

 

To solve this issue I've changed the code to end the transaction on After Form Add/Update event. When the ActionSuccess is true, I commit the transaction, if it's false then I rollback. The problem is that I have created another issue. Sometimes it works fine, but sometimes SAP freezes after clicking on Add/Update button.

 

I did some tests in the database and the issue seems to be ONNM table that gets locked.

 

Any toughts?


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>