Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Re: Row level locking - Lock objects

$
0
0

Hello Aspire,

 

The most important thing to know is SAP Locking mechanism doesn't physically lock the record, but does it logically.

 

It does not matter what values you pass to the ENQUEUE module params, the lock mechanism uses them to build a logical key and stores it in the lock table. Further lock requests are checked against this key.

I am passing junk data as 999999***... for Cont Account in lock parameter along with other fields & still see that SUBRC after FM call is set as 0.

 

Try doing this -

 

  • Pass the junk values to the enqueue module & set the lock mode as "write"  - (E)xclusive.
  • After the ENQUEUE module has been executed successfully, go to SM12(trxn). You will see the lock entry.
  • In the sample code, try to set the 'E' lock again using the same params. You'll get an exception now! Why?

 

The answer to the "why" is the logical lock mechanism used by SAP

 

BR,

Suhas


Viewing all articles
Browse latest Browse all 9164

Trending Articles



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