Sie sind auf Seite 1von 8

3/7/2016

CreatingLockObjectandUsingLockinProgram

CreatingLockObjectandUsingLockin
Program
Step 1.Go to TCODESE11, Provide the lock object name and Click on
Create Button.

[http://3.bp.blogspot.com/
iTFaytFY7MU/UeQvX_lOrJI/AAAAAAAABs8/Vj8oxVjw6uU/s1600/1.jpg]

Step 2.Provide the Short text and click on the Tables Tab.

[http://1.bp.blogspot.com/
snnPB6oW7Tg/UeQveOzZ9II/AAAAAAAABuM/7F7Oqn_YBOk/s1600/2.jpg]

Step 3.Provide the table name and Select the Lock mode as Write
Lock and Click on the Lock Parameter Tab.

http://freesapabap.blogspot.in/2013/07/creatinglockobjectandusinglockin.html

1/8

3/7/2016

CreatingLockObjectandUsingLockinProgram

[http://2.bp.blogspot.com/1_eI1SKoEjQ/UeQveT1
M_I/AAAAAAAABuQ/tNKBuCdhpDI/s1600/3.jpg]

Step 4.All the primary key fields of the given table are added under
the Lock parameter section.
Activate the Lock Object.

[http://4.bp.blogspot.com/
wPGkk2Cxdhg/UeQvfm2CDvI/AAAAAAAABuY/0mawCVm2vcc/s1600/4.jpg]

Step 5.When the lock object is activated it creates two function


modules 'Enqueue & Dequeue'.
Navigate along the below shown path to get the generated function
modules.

http://freesapabap.blogspot.in/2013/07/creatinglockobjectandusinglockin.html

2/8

3/7/2016

CreatingLockObjectandUsingLockinProgram

[http://4.bp.blogspot.com/
gE4525H4dT0/UeQvgZ5DSyI/AAAAAAAABug/yyuNcZq_Pg/s1600/5.jpg]

Step 6. FM names.

[http://1.bp.blogspot.com/
eKGLLxxtYeQ/UeQvhgSxTvI/AAAAAAAABuo/HKHcVfJSL7I/s1600/6.jpg]

Step 7.Let's use the generated function module in a program .


Go to TCODE SE38, provide a report program name and click on
create button.

http://freesapabap.blogspot.in/2013/07/creatinglockobjectandusinglockin.html

3/8

3/7/2016

CreatingLockObjectandUsingLockinProgram

[http://3.bp.blogspot.com/
cBquXF9IM_o/UeQviCYZVyI/AAAAAAAABuw/f9Fojp62BA/s1600/7.jpg]

Step 8.Call theEnqueueFunction Moduleto lock the Single record.

[http://1.bp.blogspot.com/ab0d
LzbwZY/UeQvjg9axWI/AAAAAAAABvA/ilrjqgbq6wo/s1600/9.jpg]

Step 9.In the program PF Status Create the Applicationtool


barbutton as shown below.

[http://1.bp.blogspot.com/
Ulz8gyZzXSg/UeQvikLnmgI/AAAAAAAABu4/vGWAPugWwKg/s1600/8.jpg]

Step 10.Activate the report. Open two different session at a time


http://freesapabap.blogspot.in/2013/07/creatinglockobjectandusinglockin.html

4/8

3/7/2016

CreatingLockObjectandUsingLockinProgram

and run the same report.

[http://3.bp.blogspot.com/
aSpZ5mL2HAc/UeQvZobHSKI/AAAAAAAABtQ/kxrWmHnLgn8/s1600/10.jpg]

Step 11.Provide the CARRID as 'AA' in both sessions.

[http://1.bp.blogspot.com/
DA9utijbE5s/UeQvZWw6VkI/AAAAAAAABtM/dRl6YZsUXNQ/s1600/11.jpg]

Step 12.Run the first session and we have the out put. Execute the
same report in second session,
now we have the error message given below as the same record is
locked in first session.

http://freesapabap.blogspot.in/2013/07/creatinglockobjectandusinglockin.html

5/8

3/7/2016

CreatingLockObjectandUsingLockinProgram

[http://4.bp.blogspot.com/
WEY2S_20PwE/UeQvbFap2KI/AAAAAAAABtY/hjmO3CP4PNU/s1600/12.jpg]

Step 13.Now again run the same report in two different sessions and
provide different inputs and execute it.

[http://3.bp.blogspot.com/iWqBQUS9d
M/UeQvbtl4I4I/AAAAAAAABtk/Vp0qJuYVyHM/s1600/13.jpg]

Step 14.Now no error message is there.

[http://2.bp.blogspot.com/
pNPAWqhlN_U/UeQvbxu8AoI/AAAAAAAABto/7rsBSt7LmJE/s1600/14.jpg]

Step 15.Now again run the same report in two different session and
provide the same input.
Run the program in first session.
http://freesapabap.blogspot.in/2013/07/creatinglockobjectandusinglockin.html

6/8

3/7/2016

CreatingLockObjectandUsingLockinProgram

[http://2.bp.blogspot.com/
KGA1bWX_3f0/UeQvcaVbwFI/AAAAAAAABtw/VWmmqe0rz4s/s1600/15.jpg]

Step 16.Now the record is locked. Now Unlock the Record By clicking
on the Application toolbar button that is created in the program PF
Status. Now run the Report in the Second session.

[http://2.bp.blogspot.com/
QXei757plJU/UeQvdioKfGI/AAAAAAAABuA/A7OsJ8w8_G8/s1600/16.jpg]

Step 17.The same record is shown in the second session without


error.

[http://3.bp.blogspot.com/
yx7mbKUBgxg/UeQvczuANTI/AAAAAAAABt4/Y9VnUdJ9iWg/s1600/17.jpg]

Posted 15th July 2013 by SPrasad

View comments

http://freesapabap.blogspot.in/2013/07/creatinglockobjectandusinglockin.html

7/8

3/7/2016

CreatingLockObjectandUsingLockinProgram

1 comment

Add a comment

Top comments

raghu guru 1 year ago - Shared publicly


Thank you so much....
1 Reply

http://freesapabap.blogspot.in/2013/07/creatinglockobjectandusinglockin.html

8/8

Das könnte Ihnen auch gefallen