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

Locking issue

Former Member
0 Likes
1,209

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
977

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.

7 REPLIES 7
Read only

naimesh_patel
Active Contributor
0 Likes
977

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

Read only

0 Likes
977

Thanks for your response Namiesh

Are you aware of any documentation which would help me in implementing the ENQUE and DEQUE mechanism.

Read only

0 Likes
977

Can anyone please give their inputs to my concern/question ?

Read only

0 Likes
977

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

Read only

Former Member
0 Likes
977

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.

Read only

Former Member
0 Likes
978

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.

Read only

0 Likes
977

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.