Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

The commands through which an abap/4 module can “branch to “ or “call” the next screen are?

1089


Did you create help views?

939


How to handle errors in call transaction bdc method without using bdcmsgcoll internal table? : abap bdc

1124


Do we create table fields with out data elements and domains?

1034


dynamic programming in sap abap

1410


when are objects are passed from task to the change request?

2053


What is the use of f4if_shlp_exit_example function module ? : sap abap data dictionary

1811


What is tmg?

1076


What is the structure of bdcmsgcoll? : abap bdc

1289


What is the difference between collect and sum?

1096


What is sap script? Describe its components.

1021


out bound process code for quotation?

2014


Work most on which module: name a few tables?

991


How do you execute the payroll

2265


What are the disadvantages of using explicit enhancement?

1958