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

How can a lock object be called in the transaction?

1019


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

1145


BDC program to migrate data to SAP R/3 database. The data will be uploaded using transaction ME11. (Session Method) plz mention the detail coding Tahnks, Rahul

2268


what is friend class

1379


What are the system table used in abap?

1126


Explain the different types of mode (run code) in call transaction method?

1084


How to copy table across clients?

1064


Can anyone done BDC/LSMW/BAPI for F-02 and F-04.If yes let me know the processs

2476


What are the differences between transparent tables, pooled tables & cluster tables? : abap data dictionary

1202


Explain the inside concept in select-options?

974


Give few names of pooled tables in sap ?

2008


Explain what is the difference between sy-tabix and sy-index? Where it is used?

1033


What is the table & field to identify the no of items (bottles) stored in one case?

2444


What is full form of bdc session? : abap bdc

1171


Write special commands of list?

1027