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 |
how to added data in list box?
will where conditions in a sql query help improve performance?
Explain what is the purpose of sap script?
What is the structure of a BDC sessions.
What are the two different ways of building a match code object? : abap data dictionary
What is PAKEY structure, PSHD1 structure and what type of fields it contains
SmartForm : how to print a smartform layout having one portrait and one landscape?
How LSMW is advantageous than normal BDC?
Table events aNd table maintains generation
What are the uses of table pool or table cluster.
what is the difference between with initialization and with out initialization?
WHAT ARE THE MANDATORY FIELDS TO BE FILLED FROM TABLES BAPIITEMIN, BAPIPARTNR, BAPIITEMEX, BAPICUCFG, BAPICUINS, BAPICUPRT, AND BAPICUVAL IN BAPI 'BAPI_QUOTATION_CREATEFROMDATA