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

lock table entries

Former Member
0 Likes
346

Hi everybody,

Suppose in a table for certain selection criteria, there are 20 records. I am creating a Ztransaction where i have to display the first 6 records.If I run the same transaction, in a different session , then I have to display the next 6 records(the first 6 records should not appear here) and so on.Can anybody please tell me how to achieve this thing.

Thanks in advance,

Anil

2 REPLIES 2
Read only

Former Member
0 Likes
324

Hi Anil,

if the table is a customer table, I would add a field i.e. selcheck (char1). Then insert in your program a select statement like select .... up to 6 rows

where selcheck is initial. After the select run a loop and move a 'X' into field selcheck of the customer table. The next transaction would than take record 7 to 12 because 1 to 6 have an X in selcheck. But don't forget to lock the customer table during this operation and to unlock after the modify. And think of removing the X at the end of the program.

I hope that this doesn't sound too confusing!

Regards

Nicola

Read only

Former Member
0 Likes
324

Hi,

Create a lock object in SE11..

Then use the ENQUEUE Fm to lock the record and DEQUEUE to unlock the records..

Thanks

Naren