Creating 'Lock Object'.


Creating a 'Lock Object'.

Step 1 :

Go to Tcode SE11.

you will see following Screen.

Select 'Lock Object' Radio button on the Screen and Provide a 'Lock Object name' (starting with 'EZ' or 'EY' , here Type group name is 'EZLobj').

















Click on 'Create' button, then you will see below screen. 

Step 2 :

Provide Short Description and if you want to use a remote function call then select 'Allow RFC'.




















Step 3 :

Select 'Table ' tab. you will see following screen.
Provide the 'Table Name' that you want to lock and the 'Lock mode' .

























Step 4 :

Select 'Lock parameter' ' tab. you will see following screen.
Select the Fields on which you want apply the Lock mechanism .





















Then Click on 'Save '  (or )  '(CTRL+S)'.





















Provide 'Package' Name where we want to Save.(Click here How to Create a Package).(or) If you want to store it on Local System then Click on 'Local Object'

Compile(CTRL+F2) then Activate(CTRL+F3) the Object.  

Using the Created Lock Object :

Step 1 :

Go to Tcode - 'SE38'.















Provide a Program name Starting with 'Z' (here it is 'ZL_OBJ'). Click on 'Create'.


























Provide Description and Select the Type as 'Executable Program'. Click on 'SAVE'.

Select the 'Package' or 'Local Object' where we want  Save the the Program.



You will see the following Abap Editor. Provide the Code as Below.






















Checking  the Lock Entries through Tcode 'SM12' :

Go to Tcode 'SM12'.

You will see the following Screen.

















Provide the Table Name on which we have Created the Lock Object then Click on List .


You will see the Lock Entries related to that table.






No comments: