how will you go for row level locking of a z table
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / balraju
by using an function module enqueue_table name inside a loop
end loop
Is This Answer Correct ? | 6 Yes | 4 No |
What are AUTHORITY OBJECTS ?
What is the use of table maintenance allowed?
what is the differance b/w template and table in Smartforms?
What is the difference between the function module and a normal abap/4 subroutine? : abap modularization
What are the relational operations that can be performed on view in sap? : abap data dictionary
what is Tcode for Basic ALE configuration?
how many index created for table
What is abap work bench?
what is the exact code that shoud be implimented in sap note
what is Import and Export Memory?
what are conversion routines
When will the current screen processing terminates?