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
What is an interface? In what scenario we use interface? What is the difference between abstract class and interface?
Define infotype ? : abap hr
What is the significance of the screen number ‘0’?
What is update task
While doing bdc exp va01 transaction sometime in the item level data shows only 4 items and other times it will show 6 line items, how will you maintain this kind of screen resolutions scenerio? : abap bdc
What are control tables? : abap data dictionary
What are base tables of an aggregate object?
What are the fields in a bdc_tab table? : abap bdc
What are base tables of an aggregate object? : abap data dictionary
what are the main technical differences between oracle and sap? it would be more helpful to me if get this answer...
How do you do bdc for a table control? : abap bdc
What is search help exit? : sap abap data dictionary
What is the difference b/t Session method and call transaction method ??
What is lock object ? : abap data dictionary
identify valid statement when coding a field exit ? a) submit RSCA101X b)MESSAGE E101 C)MESSAGE I101 d)BREASK-POINT