08-01-2007 2:21 PM
Hi,
Im generating an application log when some field values are changed.
I'm locking the DB using BAL_DB_ENQUEUE when 1 user is performing updates.
When another user is trying to update the same records he is unable to do so till the lock is released.
The program waits for the lock to be released and does not proceed till the lock is released.
I want to display a message in the log saying "records locked" instead of waiting for the lock to be released . how do i do this?
Please help me.....
regards
Kranthi
08-01-2007 2:47 PM
If you call function module ENQUEUE_E_APPL_LOG directly, rather than using BAL_DB_ENQUEUE you can use parameter WAIT to influence whether to wait. You can then code your own response when the exception FOREIGNLOCK is raised.
Regards,
Nick
08-01-2007 2:35 PM
Hello,
have you tried to work with lock objects (SE11) in your program ?? Create a lock object for you database and then, you can use the generated object in your program.
The first user that works with the table blocks it automatically. Any other user that tries to access the table will get a message from the system indicating that the table is blocked.
08-01-2007 2:41 PM
08-01-2007 2:47 PM
If you call function module ENQUEUE_E_APPL_LOG directly, rather than using BAL_DB_ENQUEUE you can use parameter WAIT to influence whether to wait. You can then code your own response when the exception FOREIGNLOCK is raised.
Regards,
Nick