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

Application log

former_member799868
Participant
0 Likes
563

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
509

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

3 REPLIES 3
Read only

Former Member
0 Likes
509

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.

Read only

former_member799868
Participant
0 Likes
509

HOW DO I CREATE LOC OBJECTS IN SE11?

Read only

Former Member
0 Likes
510

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