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

Avoid create two record with first key equal simultaneously.

Former Member
0 Likes
496

Hi, the problem is:

I've done a program that register in a custom table that have more than one key field, i want avoid that this program (used by more dependents simultaneously) register more than one record with the first key field equal. How? I don't think that the ENQUEUE DEQUEUE statement is the solution.

Thanks for the answers.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
458

Sure you can, just create a lock object via SE11, enter all of the keys fields in the lock object. Then when calling the ENQUEUE funciton module, only pass the fields of the key that you wish to lock.

Regards,

Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
459

Sure you can, just create a lock object via SE11, enter all of the keys fields in the lock object. Then when calling the ENQUEUE funciton module, only pass the fields of the key that you wish to lock.

Regards,

Rich Heilman

Read only

0 Likes
458

And the DEQUEUE statement is necessary to put in program?

Read only

0 Likes
458

I would suggest it. Its always a good idea to release the lock explicitly.

Regards,

Rich Heilman