‎2007 Jul 16 6:43 AM
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
‎2007 Jul 16 5:08 PM
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
‎2007 Jul 16 5:18 PM
Hi,
Create a lock object in SE11..
Then use the ENQUEUE Fm to lock the record and DEQUEUE to unlock the records..
Thanks
Naren