ENQUEUE/DEQUEUE

Question:
Hi,
I am using the enqueue and dequeue as following
PERFORM db_lock_it.
CALL SCREEN '400' STARTING AT 10 10.
PERFORM db_unlock_it.
My problem is the call screen is a modal dialog box with ok and cancel options. When i say cancel the subroutine unlock is not functioning and if i run the transaction and i again call the screen i get a message with my name as i am editing.
CAn any body tell me where the probelm is.
Thankx in advance.
quelle
Answer:
Sorry i forgot to inform u that i am running the trasaction again using /o functionality. i.e first i start the transaction two times and in the first screen i say change the screen 400 appears and now i say cancel and then go to the second one and i say change now i get a message user with my username is editing.
Answer:
Is the problem only happening when the Cancel button is pressed? Is there any processing specified for the Cancel button in the AT EXIT-COMMAND? What could be happening is that there is an explicit LEAVE TO SCREEN statement being executed on Cancel, which would mean that control would not be returned to the unlocking subroutine after the call to screen 400. Try debugging screen to see what happens when Cancel is pressed.
Answer:
Hi,
Thankx for ur reply. I have checked it in the debugging mode. When i say cancel it is returning to the subroutine perform db_unlock_it where the dequeue function is.
Answer:
You might be suffering from an update lag. SAP does not use physical record locking, rather it uses logical locks which exist in a database table. It just might be the case that you are retrying before the previous lock has been removed by the update task.
R

More Articles:

OBJECT Initialitationcl_gui_alv_tree?
asdfasdf?
Add button to Menu for PO (ME21N/ME22N/ME23N)?
Uploading/Processing Multiple External Files?
ABAP Command to add Fields of Internal Table?
Reading a line with two checkboxes?