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

Please advise on when to use enqueue

Former Member
0 Likes
1,862

Hiii

i know for sure that when we are updating an entry in a database table, it's better to use the ENQUEUE and DEQUEUE process.

But when we will be inserting data in a ZXX database table should we also use the enqueue and dequeue concept??

1 ACCEPTED SOLUTION
Read only

Subhankar
Active Contributor
0 Likes
1,718

Hi..

If you ensure that this only used by one program then you can ignore this ENQUEUE and DEQUEUE process. But ideally tables are used in more than places.(Different program). Better to use ENQUEUE and DEQUEUE process.

Thanks

Subhanakr

Hiii

i know for sure that when we are updating an entry in a database table, it's better to use the ENQUEUE and DEQUEUE process.

But when we will be inserting data in a ZXX database table should we also use the enqueue and dequeue concept??

6 REPLIES 6
Read only

Former Member
0 Likes
1,718

Hi,

If it is updated by mulituser it is better to use enqueue to avoid data inconsistancy.

Regards

Nehruu

Read only

Subhankar
Active Contributor
0 Likes
1,719

Hi..

If you ensure that this only used by one program then you can ignore this ENQUEUE and DEQUEUE process. But ideally tables are used in more than places.(Different program). Better to use ENQUEUE and DEQUEUE process.

Thanks

Subhanakr

Read only

Former Member
0 Likes
1,718

Even when we use insert new entries in the database table. Coz how come the enqueue will lock entries that does not exist in the Zxxx database table?

Read only

0 Likes
1,718

Hi,

enqueue locks the table which u r modifying. we use enqueue to maintain consistency in the table. in that period of time nobody else can modify the table

Edited by: Sarang Gujrati on Feb 26, 2010 7:23 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,718

>

> Even when we use insert new entries in the database table. Coz how come the enqueue will lock entries that does not exist in the Zxxx database table?

Hello,

The SAP Lock Objects are not Database Locks. They don't lock the DB entries, but create a lock argument in the Lock Table ( which resides in the Enqueue Server ).

What you are talking about is DB Locks. How do you handle the scenario when 2 users are trying to insert records with the same key field values in the same DB table ?

Please read this SAP documentation on the [Lock Mechanism|http://help.sap.com/saphelp_nw04/Helpdata/EN/c2/2d7037ecc92a7ee10000009b38f8cf/frameset.htm] which will clear you doubts.

BR,

Suhas

Read only

Former Member
0 Likes
1,718

If one program can be used by a number of users then it will be better to give enque and deque. This process will save you from data inconsistency.

Regards,

Subhasish