Skip to Content
0
Former Member
Apr 12, 2010 at 03:28 AM

Lock object not working

1971 Views

Hi Experts,

I tried to create a program that locks the database table BKPF by using lock object EFBKPF.

I only called the FM like this:

call function 'ENQUEUE_EFBKPF'

exporting

mandt = sy-mandt.

if sy-subrc eq 0.

....

endif.

I executed the program, breakpoint at sy-subrc ( = 0), and I can also see in SM12 that the table BKPF was successfully locked. However, when I try to create and post an FI document (FB01) (while it was still locked), I can still save and post the document, and an entry in BKPF was inserted.

I wonder if I'm doing something wrong here. ABAP Geniuses, please advise.

Regards,

Joyie