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

regarding Lock Objetcs

Former Member
0 Likes
325

Hi Experts,

i created a lock object for my ztable and this ztable is using in ZFM.

when i create, SAP generates two FM's ENQUEUE_* and DEQUEUE_*

can any one give me some idea how to use these FM's in my ZFM whic access tables directly

Giri

1 REPLY 1
Read only

Former Member
0 Likes
304

Hi,

Use enqueue FM before updating the table and After updation use dequeue FM.

DO.

Use ENQUEUE_E_TABLE FM to lock the table

IF sy-subrc = 0.

EXIT.

ENDIF.

ENDDO.

UPDATE statement.

IF sy-subrc <> 0.

Error Handling.

ENDIF.

Use DEQUEUE_E_TABLE FM to unlock the table for others to modify.

Do enddo is used to ensure that there are no locks apart from yours on the table before you update it.

Thanks,

Kartavya