Skip to Content
0
Former Member
Nov 30, 2009 at 03:33 PM

Lock specific number of records using ENQUEUE & DEQUEUE

613 Views

Hi,

Is it possible to lock a group of records in R/3?

My requirement is to update a set of records in VBAP table. I'm not using a BAPI here. Instead, I use a direct UPDATE.

In this case, i know i can lock individual records by passing VBELN and POSNR. But what if i have to lock 10 records?

Is this possible in any way?

Thanks in advance.

The current solution is:

1) LOOP at ITAB

2) LOCK each entry

3) UPDATE VBAP for that entry

4) UNLOCK the entry

5) Endloop

I thought this solution might work: (Assume 10 records are present in ITAB)

1) LOOP at ITAB (Lock all 10 entries)

2) LOCK that entry

3) ENDLOOP

4) UPDATE VBAP from ITAB (Updates all 10 entries in one databae access)

5) LOOP at ITAB(Unlock all 10 entries)

6) UNLOCK that entry

7) ENDLOOP

Any help will be appreciated.

Tabraiz.