‎2008 May 01 8:58 PM
Would the usage of TRY and CATCH can prevent the locking issue in the below case ?
We had an issue where we were doing the mass data load and seems that it has taken all the resources. Meanwhile an another function module was trying to update an article and it got locked and function module terminated.
~ Peeru
‎2008 May 05 9:12 AM
hii,
the try ..end try blocks are used for the fields for exception handling.
for locking purpose you have to use 2 fm---
enqueue and dequeue.
in the enqueue fm you have to specify the field names which you want to be locked with the scope,funcionality,locking tries etc.
if you dont even call the dequeue fm ,then also all the fields used in the enqueue fm for locking are released after 1 luw(logical unit of work).
hopefully ths will hepl...if not plz revert back and i can give a detailed descp abt it..
thanks...
reward points if helpful.
‎2008 May 01 9:18 PM
I don't think TRY .. CATCH will help you.
You need to have the ENQUE and DEQUE mechanism on that table or transaction to avoide the "Locks" from other calls.
Regards,
Naimesh Patel
‎2008 May 01 9:59 PM
Thanks for your response Namiesh
Are you aware of any documentation which would help me in implementing the ENQUE and DEQUE mechanism.
‎2008 May 02 2:19 PM
‎2008 May 02 4:37 PM
Hi
here is the link for documentation of Enqueue and Dequeue
[https://www.sdn.sap.com/irj/sdn/wiki]
Reward points if helpful.
Thanks
Prashanth
‎2008 May 02 6:36 PM
Hi Peru!!
Hope this helps
http://help.sap.com/saphelp_nw04/helpdata/en/f4/670f9b9d62f94db4ea7361b34ea214/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eebf446011d189700000e8322d00/content.htm
Enqueue Service Locate the document in its SAP Library structure
Definition
The enqueue service is used to manage logical locks. The tried and tested Sap lock concept is used for this (see Functions of the SAP Lock Concept).
Note
The terms enqueue server and enqueue service are used synonymously here. The correct expression is that the enqueue server is the program or process that provides the enqueue service.
Use
The enqueue service has the following tasks:
· Internally it is used for synchronization within the Java cluster.
· The applications can lock objects and release locks again. The enqueue service processes these requests and manages the lock table with the existing locks.
Structure
The enqueue service runs on the Central Services instance of the Java cluster. It manages the lock table in the main memory and receives requests for setting or releasing locks.
It maps the logical locks to the database.
See also:
Architecture of the Locking Adapter Service
Deployment of a New Application
Integration
The enqueue service can be configured for high availability, by setting it up with the replication server and a platform-independent high availability solution.
kindly reward points.hope it helps u.
‎2008 May 05 9:12 AM
hii,
the try ..end try blocks are used for the fields for exception handling.
for locking purpose you have to use 2 fm---
enqueue and dequeue.
in the enqueue fm you have to specify the field names which you want to be locked with the scope,funcionality,locking tries etc.
if you dont even call the dequeue fm ,then also all the fields used in the enqueue fm for locking are released after 1 luw(logical unit of work).
hopefully ths will hepl...if not plz revert back and i can give a detailed descp abt it..
thanks...
reward points if helpful.
‎2008 May 05 2:45 PM
Thanks for the response.
Would the enqueue and dequeue FMs work in case of the sudden program exit( as explained below) ?
e,g There are two processes, processA and processB. ProcessA ran and took whole CPU capacity and meanwhile the processB was trying to get some data and because of lack of the CPU capacity; it locks the resource.