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 are the arithmetic operators in the sap abap?
Does sap handle multiple currencies?
Sal abap on hana interview
Is it possible to pass data to and from include programs explicitly? : abap modularization
Explain sap abap 3-tier architecture?
What is screen flow logic? What are the sections in it?
What is PS structure
Write an abap program for creation of customer enquiry using BAPI 'BAPI_INQUIRY_CREATEFROMDATA'.
How to insert a line into abap internal tables?
Hi! I want to join SAP ABAP course in Hyderabad, can any one tell me where should I join? and Which is the best institute for SAP WORKSHOP? Thank you...
What are the client dependant objects in abap / sap?
Have you worked with support? How ticket comes to you? What were the timings for resolving tickets types of severity?
What are pooled tables? : abap data dictionary
What is hotspot?
pls if any one have idea ,reply as soon as possible 1.Allied solution group inc. is a genuine company or not ? 2.what is update module. 3.Transaction: scc3 what it is?