Start of Content Area

Procedure documentation Using Queues to Lock and Unlock Units  Locate the document in its SAP Library structure

Use

Units are always locked and unlocked when the COMMIT WORK is performed.

 

Procedure

Using the classes CL_QRFC_LOCK_INBOUND, CL_QRFC_LOCK_OUTBOUND and CL_QRFC_LOCK_NOSEND, you can use queue locks to prevent the processing of units, and you can also cancel a queue lock.

ExampleLock Methods

This graphic is explained in the accompanying text

 

 

Result

Example

 

Operation on the Queue

Content of the Queue

Creation of Unit 1

 

Creation of Unit 2

 

COMMIT WORK

Unit 1 – Unit 2

Creation of Unit 3

 

Setting of lock A at current position

 

COMMIT WORK

Unit 1 – Unit 2 – Lock A – Unit 3

Setting of lock B at the beginning

 

Processing of unit 1 by the  scheduler

Unit 2 – Lock A – Unit 3

COMMIT WORK

Unit 1 – Unit 2 – Lock A – Unit 3

 

 

End of Content Area