how will you go for row level locking of a z table
Answer Posted / kubera naidu
Hi Swapna,
1)Create a lock object, suppose EZLOCK in SE11 for the table
ZLOCK (having fields..field1, field2, field3).
2)Activate it, system will automatically generates two
function modules for locking and unlocking.
3) How to use them in program ?
Here you go..
loop at itab into wa_tab.
* For Locking the table ZLOCK
CALL FUNCTION 'ENQUEUE_EZLOCK'
EXPORTING
mode_ZLOCK = 'E'
mandt = sy-mandt
field1 = wa_zlock-field1
field2 = wa_zlock-field2
field3 = wa_zlock-field3
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
* For Unlocking the table ZLOCK
CALL FUNCTION 'DEQUEUE_EZLOCK'
EXPORTING
mode_ZLOCK = 'E'
mandt = sy-mandt
field1 = wa_zlock-field1
field2 = wa_zlock-field2
field3 = wa_zlock-field3
endloop.
Regards,
Kubera Naidu.
| Is This Answer Correct ? | 19 Yes | 2 No |
Post New Answer View All Answers
How can a lock object be called in the transaction?
What is the use of dequeue function module? : sap abap data dictionary
BDC program to migrate data to SAP R/3 database. The data will be uploaded using transaction ME11. (Session Method) plz mention the detail coding Tahnks, Rahul
what is friend class
What are the system table used in abap?
Explain the different types of mode (run code) in call transaction method?
How to copy table across clients?
Can anyone done BDC/LSMW/BAPI for F-02 and F-04.If yes let me know the processs
What are the differences between transparent tables, pooled tables & cluster tables? : abap data dictionary
Explain the inside concept in select-options?
Give few names of pooled tables in sap ?
Explain what is the difference between sy-tabix and sy-index? Where it is used?
What is the table & field to identify the no of items (bottles) stored in one case?
What is full form of bdc session? : abap bdc
Write special commands of list?