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

Re: how can we use lock objects in programs?

$
0
0

Hi,

 

You can have search in SCN,

 

When the lock object is created, the following function modules are generated from its definition:

    • ENQUEUE_ E_BOOKING (set locks)

 

  • ENQUEUE_ E_BOOKING (release locks)

 

These function modules can now be linked to ABAP programs.

 

The following example shows how function module ENQUEUE_ E_BOOKING is called.

 

 

With this call, flight LH 400 on Nov. 29,1998 is exclusively (lock mode E) locked in table SFLIGHT together with all the bookings entered in table SBOOK for this flight (since the initial value 0 is transferred for BOOKID and CUSTOMID). The lock is sent to the update program (_SCOPE = ‘2’). If there is a lock conflict, another attempt is made to set the lock after a certain time (_WAIT = ‘X’).

 

The set locks can be removed by calling the function module DEQUEUE_E_BOOKING as follows:

 

 

The existing exclusive lock entries for flight LH 400 are deleted in table SFLIGHT and the bookings for this flight are deleted in table SBOOK. The request to delete the lock entries is passed on to the update program (_SCOPE = ‘3’).


Viewing all articles
Browse latest Browse all 9091

Trending Articles



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